调整相对布局

时间:2013-05-01 15:18:46

标签: android android-linearlayout relativelayout

我在<{1}}

中的布局
RelativeLayout

基本上,如果布局中的<LinearLayout android:id="@+id/llWatchItemCommentButton" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <TextView android:id="@+id/myMasterCat_Item" style="@style/DropShadowEffect" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_weight="99" android:shadowColor="#ffffff" android:text="Item" android:textColor="#515b61" android:textSize="22sp" /> <ImageView android:id="@+id/bFollowComment" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/featured_button_selector" android:padding="5dp" android:src="@drawable/comment" /> </LinearLayout> <TextView android:id="@+id/myMastCat_Cat" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBottom="@+id/llWatchItemCommentButton" android:layout_alignLeft="@+id/llWatchItemCommentButton" android:layout_marginLeft="10dp" android:text="MasterCat" android:textColor="#666" android:textSize="16sp" /> 变为两行,它将与TextView LinearLayout`重叠。

是否有可能纠正此问题的属性?同样,我希望底部TextView positioned below the始终低于整个TextView,即使它开始增长。现在,这个位置似乎是固定的。

1 个答案:

答案 0 :(得分:1)

您是否尝试过以下操作:

<TextView
android:id="@+id/myMastCat_Cat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/llWatchItemCommentButton"    //add this line in
android:layout_alignBottom="@+id/llWatchItemCommentButton"
android:layout_alignLeft="@+id/llWatchItemCommentButton"
android:layout_marginLeft="10dp"
android:text="MasterCat"
android:textColor="#666"
android:textSize="16sp" />
相关问题