600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > android:layout_weight属性的简单使用

android:layout_weight属性的简单使用

时间:2022-10-16 06:08:52

相关推荐

android:layout_weight属性的简单使用

效果:

style.xml

<style name="etStyle2"><item name="android:layout_width">match_parent</item><item name="android:layout_height">wrap_content</item><item name="android:background">@drawable/corner_edit</item></style>

activity_test.xml

<LinearLayout android:layout_marginTop="5dp"android:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="horizontal"android:gravity="center_vertical"><TextView android:layout_width="98dp"android:layout_height="wrap_content"android:text="税款所属期"/><EditText style="@style/etStyle2"android:layout_weight="0.5"/><TextView style="@style/tvStyle"android:text="至"/><EditText style="@style/etStyle2"android:layout_weight="0.5"/></LinearLayout>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。