Android复选框(CheckBox)的现实。

Android复选框(CheckBox)的现实_第1张图片

新建一个Android项目,在main.xml中输入如下代码,然后运行即可。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/info"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25px"
android:layout_marginTop="10px"
android:text="您经常浏览的网站是什么?" />
<CheckBox
android:id="@+id/url1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25px"
android:checked="true"
android:text="www.hao123.com"/>
<CheckBox
android:id="@+id/url2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25px"
android:text="www.baidu.com"/>
<CheckBox
android:id="@+id/url3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25px"
android:text="www.liyewen.com"/>

</LinearLayout>

更多相关文章

  1. android典型代码系列(二十二)------按键使上面的EditText抖动
  2. 用代码创建Android视图
  3. Android中对Group的各种操作示例代码
  4. Android 获取时间实例代码
  5. android 源代码 获得 Open Soure Project
  6. android 实现流媒体播放远程mp3文件代码
  7. Android 代码中实现返回键功能
  8. Android的jni下c与java数据互传测试代码

随机推荐

  1. Android中的soundpool小结
  2. Android开发学习:ImageView的scaletype属
  3. android调用Webservice方法
  4. eclipse导入已存在的android工程时遇到An
  5. android简易画图板与五子棋
  6. Android中LocationManager的简单使用,获
  7. Android Animation之frame animation
  8. Android(安卓)屏幕适配方案
  9. Android第三方jar包ClassNotFind
  10. I/O流的梳理和小结