大佬教程收集整理的这篇文章主要介绍了android – 无法获得正确的布局与“fill_parent”,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
A应该包装以适应其内容,并留下| center_vertical对齐.
B应尽可能扩大,填补所有空白空间.
C应该是右对齐的,包装来填充它的内容,并且对齐在center_vertical中.
这是我的布局:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://scheR_54_11845@as.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:gravity="left|center_vertical"> <!-- A --> <ImageView android:id="@+id/example_item_icon" android:layout_width="48px" android:layout_height="48px"/> <!-- B --> <LinearLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="fill_parent" android:gravity="left|center_vertical" android:padding="5px"> <TextView android:id="@+id/example_item_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="bold"/> <TextView android:id="@+id/example_item_level_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="bold|italic" android:lines="1" android:textSize="10px"/> </LinearLayout> <!-- C --> <TextView android:id="@+id/example_item_count_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="bold" android:textSize="14px"/> </LinearLayout>
以上是大佬教程为你收集整理的android – 无法获得正确的布局与“fill_parent”全部内容,希望文章能够帮你解决android – 无法获得正确的布局与“fill_parent”所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。