1.静态类部署方法:
layout.xml
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
android:id="@+id/fragment1"
...
分类:
移动开发 时间:
2015-06-06 09:14:03
阅读次数:
146
<TextView
android:id="@+id/firstview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#ff0000"
android:text="第一个Textview"/>
<TextView
android:id="@+id/second"
android:layout_width="wrap_content"
andro..
分类:
移动开发 时间:
2015-06-05 23:01:46
阅读次数:
654
weight的正确使用方法:先设置android:layout_width="0dp" 或者android:layout_height="0dp"然后再去调配权重,而此时的weight也非常好理解: weight就是比重。weight的错误使用方法:android:layout_width="mat...
分类:
其他好文 时间:
2015-06-05 11:43:58
阅读次数:
117
//xml文件的配置
<ImageView
android:id="@+id/p_w_picpathviewid"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/a0"
android:background="#ff0000"
android:scaleType="center"
/>
<ImageView
android:id="@+id/p_w_picpathV..
分类:
移动开发 时间:
2015-06-05 00:56:07
阅读次数:
150
//RadioGroup中xml文件的配置
<RadioGroup
android:id="@+id/radiogroupid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<RadioButton
android:id="@+id/femalebutton"
android:layout_width="wr..
分类:
移动开发 时间:
2015-06-04 12:07:53
阅读次数:
132
准确的说让Edittext只能输入数字有方法两种,都是通过xml属性设置
方法一:
<EditText
android:id="@+id/u_account"
android:layout_width="0dp"
android:layout_height="match_parent"
andro...
分类:
其他好文 时间:
2015-06-02 18:01:50
阅读次数:
136
项目文档结构步骤一:布局activity_guide.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"
tools:context="co..
分类:
移动开发 时间:
2015-05-30 18:27:20
阅读次数:
152
<?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"><ImageViewandroid:layout_width="fill_parent"android:layout_height..
分类:
其他好文 时间:
2015-05-30 18:25:28
阅读次数:
157
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_...
分类:
其他好文 时间:
2015-05-29 06:22:01
阅读次数:
247
android:weight属性能够根据手机高宽按设定比例显示控件如:宽度上按比例显示<LinearLayoutandroid:layout_marginTop="5dp"androidrientation="horizontal"android:layout_width="fill_parent"----------------让其满宽android:layout_height="wrap_content"><Buttona..
分类:
移动开发 时间:
2015-05-28 18:26:04
阅读次数:
325