<Button
android:id="@+id/send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SendSMS"
android:onClick="onClick"/>publicvoidonClick(Viewview){
sendSMS("5556","Hello...");
Toast.makeText(this,"hello",Toast.LENGTH..
分类:
其他好文 时间:
2017-02-09 23:59:48
阅读次数:
257
一.效果图 二.实现步骤 1.XML布局-添加依赖 1 <LinearLayout 2 android:id="@+id/layout" 3 android:layout_width="match_parent" 4 android:layout_height="wrap_content" 5 an ...
分类:
其他好文 时间:
2017-02-09 23:43:53
阅读次数:
1507
在使用输入框的时候,常常需要在输入框后带有一键清除输入内容的按钮。采用自定义View的方式是复用性较高的方法。另一方面也可以采用控件“控件+监听”的较为简单的方法来实现。
布局文件:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="..
分类:
其他好文 时间:
2017-02-09 16:28:30
阅读次数:
123
include标签包裹着一个可复用的布局: <include layout="@layout/footer_detail" android:id="@+id/footer" android:layout_width="match_parent" android:layout_height="wrap ...
分类:
移动开发 时间:
2016-12-30 18:48:23
阅读次数:
200
启动Service并传递数据的小实例(通过外界与服务进行通信): 1、activity_main.xml: <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:text= ...
分类:
移动开发 时间:
2016-12-22 11:53:53
阅读次数:
314
activity_main.xml<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<V..
分类:
移动开发 时间:
2016-12-15 01:22:10
阅读次数:
245
GridView:activity_main.xml<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/acti..
分类:
移动开发 时间:
2016-12-14 22:35:00
阅读次数:
421
activity_main.xml<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vert..
分类:
移动开发 时间:
2016-12-14 22:27:45
阅读次数:
289
ImageSwitcher:activity_main.xml<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dime..
分类:
移动开发 时间:
2016-12-14 22:14:30
阅读次数:
212
设置视频录制的简易界面<SurfaceView android:id="@+id/surface" android:layout_width="match_parent" android:layout_height="match_parent" /> <LinearLayout android:la ...
分类:
移动开发 时间:
2016-12-14 19:12:31
阅读次数:
308