实现效果:
在布局中声明spinner
<Spinner
android:id="@+id/sp_kc_term"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:animationCache="t...
分类:
其他好文 时间:
2014-11-27 14:31:48
阅读次数:
256
抽取样式,在values中定义一个xml文件,在文件中,
根节点
设置一个样式名字
value设置样式中每一项的名字和值
fill_parent
45dip
#355E9E
left|center_vertical
#EBC950
...
分类:
移动开发 时间:
2014-11-23 13:10:15
阅读次数:
229
此为测试所用,没有参考价值
<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
点击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
EditText是Android非常常见的属性,但是设置他的高度后,光标在EditText控件的中间显示,于是上网查阅了一下资料,才发现原来只需要设置一个属性就可以让光标从头显示,下面贴上代码<EditText
android:layout_width="fill_parent"
android:layout_height="200dip"
android:l..
分类:
移动开发 时间:
2014-11-13 13:05:31
阅读次数:
149
Android4.0以后的版本的EditText的新特征是以单下划线的形式出现,但是很多时候我们需要加上边框看起来比较美观.下面请看具体操作:分为两部分:未输入文本时的状态(normal)和点击输入文本的状态(focused).下面是EditText的控件:<EditText
android:layout_width="fill_parent"
..
分类:
移动开发 时间:
2014-11-12 18:13:41
阅读次数:
249
============问题描述============ 我想把这个LinearLayout宽度设置成为FILL_PARENT,源码如下LinearLayoutcheckboxLinearLayout=(LinearLayout)getLayoutInflater().inflate(R.layou...
分类:
其他好文 时间:
2014-11-11 16:24:10
阅读次数:
218