
HI,
你能否告诉我如何在屏幕上创建3个同样宽的TextVIEw来填充父级?我尝试这样做,但TextVIEw的宽度是不同的:它是149,89,89.
<tableLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content" androID:stretchColumns="*" androID:shrinkColumns="*"><TextVIEw androID:ID="@+ID/t1" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_column="0"/><TextVIEw androID:ID="@+ID/t2" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_column="1"/><TextVIEw androID:ID="@+ID/t3" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_column="2"/>解决方法:
<linearLayout androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content" > <TextVIEw androID:layout_height="wrap_content" androID:layout_wIDth="0dp" androID:layout_weight="1" /> <TextVIEw androID:layout_height="wrap_content" androID:layout_wIDth="0dp" androID:layout_weight="1" /> <TextVIEw androID:layout_height="wrap_content" androID:layout_wIDth="0dp" androID:layout_weight="1" /></linearLayout> 总结 以上是内存溢出为你收集整理的android – 如何创建3个同样宽的TextView,它在屏幕上填充父级全部内容,希望文章能够帮你解决android – 如何创建3个同样宽的TextView,它在屏幕上填充父级所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)