1、创建xml文件及按钮
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:id="@+id...
分类:
其他好文 时间:
2014-11-21 23:27:21
阅读次数:
417
1、创建xml文件及按钮
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:id="@+id...
分类:
其他好文 时间:
2014-11-21 23:27:09
阅读次数:
279
此为测试所用,没有参考价值
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
a...
分类:
其他好文 时间:
2014-11-21 18:53:30
阅读次数:
265
界面文件activity_main.xml<Button
android:id="@+id/createButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/hello_world"
android:text="createdatabase"/>
<Button
android:id="@+id/updateButton"
a..
分类:
移动开发 时间:
2014-11-19 18:54:14
阅读次数:
303
一个demo,在xml布局中,某一行的高度为其他行的一半。之前用layout_weight,得出的效果也不太理想。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_...
分类:
移动开发 时间:
2014-11-19 14:16:01
阅读次数:
243
效果:
实现步骤:
1.定义AlertDialog的布局
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@android:color/holo_green_dark" >
android:id="@+i...
分类:
其他好文 时间:
2014-11-19 14:15:36
阅读次数:
194
单选按钮Radio<RadioGroup
android:id="@+id/genderGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<RadioButton
android:id="@+id/femaleButton"
android:layout_width="wrap_content"
android:..
分类:
移动开发 时间:
2014-11-19 02:17:11
阅读次数:
279
点击Start按钮,每隔3秒在Logcat里打印一句话<Button
android:id="@+id/startButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Start"/>
<Button
android:id="@+id/endButton"
android:layout_width="fill_parent"
a..
分类:
移动开发 时间:
2014-11-19 02:07:42
阅读次数:
216
线性布局<?xmlversion="1.0"encoding="utf-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<!--
android:id为控件..
分类:
移动开发 时间:
2014-11-17 19:43:38
阅读次数:
283
第一步:为了更好的比较,准备两个一模一样的EditText(当Activity启动时,焦点会在第一个EditText上,如果你不希望这样只需要写一个高度和宽带为0的EditText即可避免,这里就不这么做了),代码如下:viewplain<EditTextandroid:layout_width="fill_parent"android:layout_he..
分类:
其他好文 时间:
2014-11-17 19:40:31
阅读次数:
218