I have a scrollview (mainly for Landscape purposes, because I do not have a separate XML file, ConfigChanges = "orientation"), which has a relative layout and has a linear layout inside it.
The code looks like this:
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; ScrollView Android: background = "@ color / background" android: padding = "10dip" Android: Layout_width = "Fill_parent" Android: layout_height = "fill_parent" xmlns: android = "http://schemas.android.com/apk / res / Android "& gt; & Lt; RelativeLayout Android: layout_height = "fill_parent" android: layout_width = "fill_parent" & gt; & Lt; LinearLayout android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: layout_gravity = "center" android: orientation = "vertical" & gt; & Lt; TextView android: TextSize = "24k5sp" android: text-style = "bold" Android: Layout_height = "Wrap_content" Android: Layout_gravity = "center" android: text = "@ string / main_title" Android: Layout_width = "Wrap_content '& Gt; & Lt; / TextView & gt; & Lt; ImageView android: src = "@ drawing / icon" Android: layout_marginTop = "20px" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: layout_gravity = "center" / & gt; & Lt; TextView android: TextSize = "L5sp" Android: layout_marginTop = "20px" Android: Layout_height = "Wrap_content" android: text = "@ string / time_window_please_select_label" Android: Layout_width = "Wrap_content '& Gt; & Lt; / TextView & gt; & Lt; Spinner Android: layout_height = "wrap_content" Android: id = "@ + id / spinner" Android: Speedy = "@ string / time_window_prompt" Android: layout_width = "fill_parent" & gt; & Lt; / Spinner & gt; & Lt; Button Android: Layout_height = "Wrap_content" Android: layout_marginTop = "20px" android: id = "@ + id / START_BUTTON" android: text = "@ string / START_LABEL" Android: layout_width = "fill_parent" & gt; & Lt; / Button & gt; & Lt; TextView Android: layout_height = "wrap_content" android: layout_marginTop = "20px" Android: id = "@ + id / status_label" Android: layout_width = "wrap_content" & gt; & Lt; / TextView & gt; & Lt; TextView Android: layout_height = "wrap_content" android: layout_marginTop = "20px" Android: id = "@ + id / status_time_label" Android: layout_width = "wrap_content" & gt; & Lt; / TextView & gt; & Lt; / LinearLayout & gt; & Lt; imageView android: id = "@ + id / info_button" android: src = "@ drawable / information" Android: layout_alignParentBottom = "true" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_gravity = "down | Correct "/> & Lt; / RelativeLayout & gt; & Lt; / Scrollview & gt; Everything is fine, at the very end, except ImgView (info_button) works fine in portrait and landscape mode. I used a relative layout because I thought I had it down
This is what I instead ...
Any help appreciated!
Edit: Link to the full XML file (for some reason I can not see it in preview mode, but when I try to copy it again in text form)
android: layout_gravity = "> Bottom | right | " Try:
Android: layout_alignParentRight =" true " Edit: Your Reading the question again, I believe the problem is B ScrollView I'm not sure why you are using this type of layout. You can get rid of it in favor of a relative layout and it should solve your problem. I am not sure why you feel that this activity needs to support the scenario. If so, I will try to solve ScrollView in a visual object and troubleshoot it .
Comments
Post a Comment