textview at the bottom of my layout not appearing
Ok so I have a layout which looks something like this:
LinearLayout
TextView
LinearLayout (Horizontal)
TextView
CustomImageView
\LinearLayout
TextView
\LinearLayout
But my bottom textview is being cut off and is not displaying. My inner LinearLayout and开发者_运维知识库 custom view both have wrap_content parameters for their layout height. What can I do to ensure that the bottom TextView will display?
EDIT(s):
This the xml for the bottom textview:
<TextView
android:id="@+id/Label"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="title"
android:gravity="bottom"
android:textSize="16dp"/>
Also a scrollview is not useful for my project, the textviews need to be displayed on the same screen.
the best way is to use a RelativeLayout
at the Top Level instead of a LinearLayout
, and then you can place your textView at the bottom by using : android:alignParentBottom="true"
One trick is to have top level RelativeLayout instead of LinearLayout, it will do.
Another one is make use of ScrollView at top level of your current layout.
Hope it helps!
精彩评论