Style.xml的妙用
Style.xml之于Android犹如css之于Jsp
妙用
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
android:id="@+id/sensor"
android:layout_width="match_parent"
android:layout_height="match_parent" />
这样的布局文件是很正常的。但是不如这样好
style="@style/all_match"
android:orientation="vertical" >
android:id="@+id/sensor"
style="@style/all_fill" />
省时省力,一眼还能看出是什么布局方式。只需要在Style.xml 中添加 这些代码即可
fill_parent
fill_parent
match_content
match_content
fill_parent
match_content
match_content
fill_parent
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!