android - How to stop keyboard from distorting ListView in Drawerlayout? -
OK, so I have a friend list feature in a drawlist layout:
As you can see, instead of looking at the upwards side, some methods of linear layout with the editors and buttons to push the list list upwards is needed. ? How can I achieve this goal
Edit: As requested in my code
& lt; RelativeLayout android: id = "@ + id / relative_layout" Android: layout_width = "240dp" Android: layout_height = "match_parent" Android: layout_gravity = "start" & gt; & Lt; ListView android: id = "@ + id / left_drawer" Android: layout_width = "300dp" Android: Layout_height = "Match_parent" Android: Layout_gravity = "start" android: background = "# 111" Android: ChoiceMode = "SingleChoice" Android: Divider = "@Android: Color / Transparent" Android: DividerHeight = "0dp" /> & Lt; LinearLayout Android: Layout_width = "Match_parent" Android: Layout_height = "Wrap_content" android: orientation = "horizontal" android: layout_alignParentBottom = "true" & gt; & Lt; EditText android: id = "@ + id / edit_message" Android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" android: hint = / & gt 'Enter friend Name "; & LT; Button android: id =" @ + id / button_send "Android: layout_width =" wrap_content "Android: layout_height =" wrap_content "android: onClick =" SendMessage "Android: text =" "/ & gt; & Lt; / LinearLayout & gt; & Lt; / RelativeLayout & Gt;
Chances are you can choose a relative layout as your main view group Are using a LinearLayout switch Mitigation that ListView height of 0s and 1s to give weight wrapcontent the layout and height of any weight.
Do not give orientation to its LinearLayouts (vertical or horizontal).
Comments
Post a Comment