java - android:layout_alignParentBottom="true" and android:gravity="bottom" seem to have no affect on RelativeLayout -
I have a visible page that I'm trying to set in the lower part of the screen (lastly all other items With RELATIVE layout) However, Android: Layout_LinePantBotm = "True" and Android: Gravity = "below" has no effect on the resiliency layout and I'm not sure why
XML:
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Android.support.v4.widget.DrawerLayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: id = "@ + id / drawer_layout" Android: layout_width = "match_parent" Android: Layout_height = "match_parent" & gt; & Lt; LinearLayout Android: id = "@ + id / content_frame" Android: layout_width = "wrap_content" Android: layout_height = "match_parent" android: focusable = "true" Android: orientation = "vertical" & gt; & Lt; / LinearLayout & gt; & Lt; ListView android: id = "@ + id / left_drawer" Android: layout_width = "220dp" Android: Layout_height = "Match_parent" Android: Layout_gravity = "start" android: background = "@ color / darkgrey" Android: ChoiceMode = "Aklcyn" Android: Divider = "@Android: Color / Transparent" Android: dividerHeight = "0dp" /> & Lt; TextView Android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_gravity = "center_horizontal" Android: autoLink = "web" Android: text-style = "bold" /> & Lt; ListView Android: id = "@ + id / videosListView" Android: layout_width = "match_parent" Android: layout_height = "wrap_content" /> & Lt; RelativeLayout Android: id = "@ + id / rl" Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: background = "# AFFFFF" & gt; & Lt; / RelativeLayout & gt; & Lt; RelativeLayout Android: id = "@ + id / footer" Android: Gravity = "Down" Android: layout_width = "match_parent" android: layout_height = "50dip" Android: layout_alignParentBottom = "true" & gt; & Lt; android.support.v4.view.ViewPager android: id = "@ + id / view_pager" Android: layout_alignParentBottom = "true" Android: layout_weight = "1" Android: layout_width = "wrap_content" Android: layout_height = "match_parent" / & Gt; & Lt; ImageButton Android: layout_width = "30dip" Android: layout_height = "30dip" Android: layout_alignParentLeft = "true" Android: layout_centerVertical = "true" Android: Layout_marginLeft = "L5dp" android: focusable = "false" android: src = " @drawable / scroll_lit_arrow "/> & Lt; ImageButton Android: layout_width = "30dip" Android: layout_height = "30dip" Android: layout_alignParentRight = "true" Android: layout_centerVertical = "true" Android: Layout_marginRight = "L5dp" android: focusable = "false" android: src = " @drawable / scroll_art_arrow "/> & Lt; / RelativeLayout & gt; & Lt; /android.support.v4.widget.DrawerLayout>
Source snippet:
@ Override public object instantiateItem (ViewGroup container, int position) {reference reference = SAXParserAsyncTaskActivity.This; ImageView imageView = New ImageView (reference); // imageView.setScaleType (ScaleType.FIT_XY); ImageView.setImageResource (mImages [status]); (ViewPager) container) .addView (imageView, 0); See return image; }
Screenshots:
. Your footer
relativeLayout footer layout has no parent that
layout_alignParentBottom with layout_alignParentBottom : You may also want to read the documentation because I do not think it expects a lot for you. If you have only one drawer, then you should include trying to use Android This issue> and other related attributes which provide RelativeLayout, are used to display those situations which are children of a relative layout, they can not be a RelativeLayout situation within their origin unless the RelativeLayout is a RelativeLayout inside Is nested
Rroid :. Gravity
What you want, because it is used does not work. If you want to set a view in the lower part of your parent to present the children of the view within that view, then You should use android: layout_gravity
. See for more information. DrawerLayout
for only two drawers and main material children- (either of which the child could have been seen, but there is only two direct needs To be children).
Comments
Post a Comment