2012年9月12日

摘要: Here we are going to see how to make a button transparent in Android…Java代码<Buttonandroid:background="@android:color/transparent" android:text="@+id/Button01" android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_co 阅读全文
posted @ 2012-09-12 22:52 无尽的思念 阅读(463) 评论(0) 推荐(0)

2012年7月15日

摘要: Android_UI_点击按钮切换背景效果实现分类:Android两个月走起2012-05-17 00:57191人阅读评论(0)收藏举报实现按钮按下和释放,按钮背景图片相应切换效果的方法这里介绍两种,一种是在代码里实现,另一种是在xml文件里实现一、在xml文件里首先现在layout的一个xml文件下定义Button如下所示:[html]view plaincopy<Buttonandroid:id="@+id/btn_user_selected"android:layout_width="wrap_content"android:layout_ 阅读全文
posted @ 2012-07-15 14:20 无尽的思念 阅读(1255) 评论(0) 推荐(1)

2012年7月14日

摘要: android中coloers.xml的颜色值对应配置很有用的参考<?xml version="1.0" encoding="utf-8" ?><resources><color name="white">#FFFFFF</color><!--白色 --><color name="ivory">#FFFFF0</color><!--象牙色 --><color name="lightyellow" 阅读全文
posted @ 2012-07-14 01:22 无尽的思念 阅读(226) 评论(0) 推荐(0)

2012年7月10日

摘要: [转]Android的Handler总结一、Handler的定义: 主要接受子线程发送的数据, 并用此数据配合主线程更新UI. 解释: 当应用程序启动时,Android首先会开启一个主线程 (也就是UI线程) , 主线程为管理界面中的UI控件,进行事件分发, 比如说, 你要是点击一个 Button, Android会分发事件到Button上,来响应你的操作。如果此时需要一个耗时的操作,例如: 联网读取数据,或者读取本地较大的一个文件的时候,你不能把这些操作放在主线程中,如果你放在主线程中的话,界面会出现假死现象, 如果5秒钟还没有完成的话,会收到Android系统的一个错误提示"强制 阅读全文
posted @ 2012-07-10 12:26 无尽的思念 阅读(114) 评论(0) 推荐(0)

2012年5月12日

摘要: 保存数据,到另一个界面14. public boolean onTouchEvent(MotionEvent event) {15. Intent intent = new Intent();16. intent.setClass(TestBundle.this, Target.class);17. Bundle mBundle = new Bundle();18. mBundle.putString("Data", "ray'blog");//压入数据19. intent.putExtras(mBundle);20. startActivity 阅读全文
posted @ 2012-05-12 13:08 无尽的思念 阅读(273) 评论(0) 推荐(0)

2012年5月11日

摘要: 方法一:在XML文件中指定 单击事件函数<Button android:id="@+id/button1" android:layout_width="120dip" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/textView1" android:layout_marginTop="59dp" android: 阅读全文
posted @ 2012-05-11 17:38 无尽的思念 阅读(412) 评论(0) 推荐(0)

2012年4月25日

摘要: Android中LayoutParams的用法(2011-08-11 13:32:45)简单说说 自己对 android LayoutParams的理解吧,xh写不出高级文章是低级写手。public static classViewGroup.LayoutParamsextends Objectjava.lang.Object↳ android.view.ViewGroup.LayoutParams//继承关系以下说明摘自官方文档E文好的可以看看Class OverviewLayoutParams are used by views to tell their parents how they 阅读全文
posted @ 2012-04-25 14:58 无尽的思念 阅读(259) 评论(0) 推荐(0)

导航