随笔分类 -  android

android系列9.LinearLayout 学习2
摘要: 阅读全文
posted @ 2013-07-18 19:00 游鱼 阅读(347) 评论(0) 推荐(0)
android系列9.LinearLayout学习
摘要:线性版面配置,在这个标签中,所有元件都是按由上到下的排队排成的 --> 阅读全文
posted @ 2013-07-17 23:56 游鱼 阅读(346) 评论(1) 推荐(0)
android系列8.Service学习
摘要:Service的启动有两种方式:context.startService() 和 context.bindService()。startService();调用者和服务之间没有联系,即使调用者退出了,服务仍然进行启动一个Service的过程如下:context.startService() ->onCreate()- >onStart()->Service running其中onCreate()可以进行一些服务的初始化工作,onStart()则启动服务。停止一个Service的过程如下:context.stopService() | ->onDestroy() -> 阅读全文
posted @ 2012-10-31 18:32 游鱼 阅读(263) 评论(0) 推荐(0)
android系列7.单元测试学习
摘要:1.测试类继承AndroidTestCase2.在文件Manifest.xml中加 <uses-library android:name="android.test.runner"/> 这个节点与activity同级, <instrumentation android:name="android.test.InstrumentationTestRunner" android:targetPackage="com.zjr.android.test" android:label="test" > 阅读全文
posted @ 2012-10-31 18:12 游鱼 阅读(222) 评论(0) 推荐(0)
android系列6.RelativeLayout学习
摘要:相对布局 RelativeLayout 允许子元素指定它们相对于其父元素或兄弟元素的位置RelativeLayout的一些属性:第一类:属性值为true或falseandroid:layout_centerHrizontal 水平居中android:layout_centerVertical 垂直居中android:layout_centerInparent 相对于父元素完全居中android:layout_alignParentBottom 贴紧父元素的下边缘android:layout_alignParentLeft 贴紧父元素的左边缘android:layout_alignParentR 阅读全文
posted @ 2012-10-30 11:54 游鱼 阅读(237) 评论(0) 推荐(0)
android系列5.Activity学习
摘要:Activity生命周期见图:Table 1.A summary of the activity lifecycle's callback methods.MethodDescriptionKillable after?NextonCreate()Called when the activity is first created. This is where you should do all of your normal static set up — create views, bind data to lists, and so on. This method is passed 阅读全文
posted @ 2012-10-18 19:25 游鱼 阅读(255) 评论(0) 推荐(0)
android系列4.Intent学习
摘要:1.打电话:1 Intent intent = new Intent();2 intent.setAction(Intent.ACTION_CALL);3 intent.setData(Uri.parse("tel:159xxxxxxxx"));4 startActivity(intent);必须在AndroidManifest.xml中添加权限:<uses-permission android:name="android.permission.CALL_PHONE" />2.发短信:1 Intent intentsms = new Inte 阅读全文
posted @ 2012-10-18 15:22 游鱼 阅读(245) 评论(0) 推荐(0)
android系列3.Button学习
摘要:1.创建Button, 1 <Button 2 android:id="@+id/btn1" 3 android:layout_width="wrap_content" 4 android:layout_height="wrap_content" 5 android:text="btn1" 6 /> 7 <Button 8 android:id="@+id/btn2" 9 android:layout_width="wrap_content"10 andro 阅读全文
posted @ 2012-10-17 21:08 游鱼 阅读(271) 评论(0) 推荐(0)
android系列2.EditText学习
摘要:只要介绍常用相关几个东东1.默认是多行,单行文本 android:singleLine="true"2.默认字符,android:hint="宝川"3.图标显示,android:drawableLeft="@drawable/sina"4.圆角,通过一个shape.xml文件设置5.长度控制,android:maxLength="5"6.输入控制,android:inputType=""这个里有多种选择,可以根据具体选择自己要的选项效果如下: 1 <?xml version="1 阅读全文
posted @ 2012-10-17 17:54 游鱼 阅读(237) 评论(0) 推荐(0)
android系列1.TextView学习
摘要:android TextView一些设置 阅读全文
posted @ 2012-10-16 21:02 游鱼 阅读(263) 评论(0) 推荐(0)