欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

android:layout_weight属性的简单使用

发布时间:2023/12/1 编程问答 53 豆豆
生活随笔 收集整理的这篇文章主要介绍了 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>

 

 

转载于:https://www.cnblogs.com/yshyee/p/3410833.html

总结

以上是生活随笔为你收集整理的android:layout_weight属性的简单使用的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。