
Android
快雪时晴天
IT行业新手,菜鸟,Rookie...等等称谓。浅尝辄止于 Java,OC,HTML5,Hadoop,Python。怀着谦虚谨慎的精神,向各位同行帅哥美女学习。
展开
-
关于win 8.1 平台打开ADT虚拟手机导致蓝屏重启问题解决
情况描述:Android Eclipse 打开ADT虚拟手机,开了没多久,突然蓝屏并且报错:Critical_Structure_Corruption 。然后自动重启系统。这种情况会在开发中反复多次。最后通过小伙伴的指点,是因为我使用了“英特尔 硬件加速插件 Intel HAXM 1.0.3”,如果升级为“Intel HAXM 1.0.5”以上版本,这个问题就可以解决。到目前为止我的电脑都没再原创 2015-02-09 15:25:26 · 496 阅读 · 0 评论 -
android spinner的使用
1、创建布局: android:layout_width="wrap_content" android:layout_height="wrap_content" android:entries="@array/books" />2、创建spinner条目,在values文件夹中创建 array.xml:原创 2015-02-26 09:43:51 · 470 阅读 · 0 评论 -
android 中 <AutoCompleteTextView>标签的使用
是TextView的子类,用来自动补全文字内容。具体用法如下:1、布局文件中: android:id="@+id/actv_id" android:layout_width="fill_parent" android:layout_height="wrap_content" android:completionHint原创 2015-02-25 09:44:15 · 548 阅读 · 0 评论 -
Android 查看手机电池信息
直接在拨号界面输入 *#*#4636#*#*原创 2016-02-02 09:55:31 · 1024 阅读 · 0 评论 -
安卓 Notification的使用
主要涉及4个API —— Intent, PendingIntent, Notification,NotificationManager.其中Intent 用来启动意图PendingIntent用来延时启动意图,就是说它不会像Intent那样,app启动后立刻执行,而是现在状态栏中存下来,等到特定时间在启动。Notification 表示 推送信息本体。NotificationMa原创 2015-03-04 10:01:24 · 350 阅读 · 0 评论 -
安卓 Bitmap基本使用
//讲一个Bitmap对象封装成BitmapDrawable 对象bitmapDrawable drawable = new BitmapDrawable(bitmap);//获取bitmap对象Bitmap bitmap = drawable.getBitmap();ImageView image = new ImageView(this);ImputStream assetFil原创 2015-03-23 21:03:53 · 384 阅读 · 0 评论 -
安卓 利用Fragment添加自定义标题栏
1、先定义出自己需要的标题栏布局文件 —— mainscreen_fragment_title<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_conten原创 2015-03-09 13:10:13 · 6685 阅读 · 1 评论 -
安卓 通过 Menu 启动另一个 Activity
思路:设置 SubMenu, 通过 subMenu 中的 setIntent() 方法,启动另一个Activity1、不需要界面,直接代码实现:public class SubMenuOpenActivityActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) {原创 2015-03-06 10:01:30 · 764 阅读 · 0 评论 -
安卓 样式(Style)和主题(Theme)
1、样式资源:存放地点:/ res/ values根节点:如何定义一个样式: 20sp #00d #ee6 8dp #000 如何在控件中调用样式:<EditText ..... style="@style/style1" />2、主题资源:存放地点:/ res/ values根节点:主题与样式区原创 2015-03-16 21:35:50 · 527 阅读 · 0 评论 -
给安卓EditText加边框
到了高版本的EditText一般没有边框,只有一条横线,需要自己加,代码如下; android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="请填入账号" android:sel原创 2015-02-23 21:12:13 · 6439 阅读 · 0 评论 -
安卓 Menu控件的使用
1、设置一个布局,比如设置一个EditText,用来显示Menu的效果。<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" andr原创 2015-03-06 09:43:59 · 534 阅读 · 0 评论 -
安卓 总结:写在drawable文件夹中的 xml 图形资源文件
1、StateListDrawable 资源:作用:比如按钮在“按下去”和“没按下去”时颜色的差别。根标签: ... 实例代码:创建资源文件 my_image.xml 引用该资源代码:<EditText ....... android:textColor= "@drawabl原创 2015-03-15 16:48:36 · 3620 阅读 · 0 评论 -
安卓 显示在状态栏的ProgressBar 的实现
这种progressBar 不需要添加 ProgressBar 控件,完全靠代码实现功能。1、布局,添加两个按钮: android:id="@+id/btn01" android:layout_width="wrap_content" android:layout_height="wrap_content" and原创 2015-02-26 14:51:36 · 1473 阅读 · 0 评论 -
安卓 关于Intent四个属性的总结
1、Component属性:Component其实就是 Intent 主要功能属性,见下面代码:public class ComponentAttr extends Activity{ public void onCreate(Bundle savedInstanceState){ .... Button btn = (Button)findViewById(原创 2015-03-15 11:15:05 · 446 阅读 · 0 评论 -
安卓 自定义的 SharedPreference 工具类
这里自定义一个Sharedpreference 存储的工具类,包含多个sharedpreference的构造函数,和Editor 的存储方法函数。public class SettingUtils { private static SharedPreferences sharedPreferences=null; private static Editor editor=n原创 2015-03-02 17:40:59 · 650 阅读 · 0 评论 -
安卓 如何自定义 AlertDialog 控件中的内容
1、创建login.xml 布局:<Button android:id="@+id/btn01" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="打开对话框" />2、创建希望 Alert原创 2015-03-02 13:21:00 · 493 阅读 · 0 评论 -
安卓 TabHost控件用法
1、布局文件,根标签为 ,该组件包含三个 <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout原创 2015-02-27 16:48:41 · 693 阅读 · 0 评论 -
安卓 利用Intent返回手机主界面
1、布局:一个Button按钮即可2、代码:public class BackToHomeActivity extends Activity { private Button btn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstance原创 2015-03-14 22:41:11 · 1106 阅读 · 0 评论 -
Android 中 progressBar的使用
1、布局: android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="任务完成的进度" /> android:id="@+id/bar" an原创 2015-02-26 14:11:18 · 534 阅读 · 0 评论