Android: Content goes off screen -


He is an example of my TextView, which is the right side of the screen. I tried padding and stuff, but no idea what was not working to do anything? Here's my hierarchy, ScrollView, TableLayout

  & lt; TableRow & gt; & Lt; TextView android: layout_column = "1" android: id = "@ + id / text_price" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: inputType = "textCapCharacters" android: padding = "2dip" Android: Text = "@ String / game_price" /> & Lt; EditText android: id = "@ + id / gameprice" Android: inputType = "textCapCharacters" android: gravity = "right" Android: minWidth = "120dip" / & gt; & Lt; / TableRow & gt;  

TextView try to set width to wrap_content, remove layout_column = 1 (not required , afaik), and the height of edittext and set the width wrap_content

as it strange that at a Tekstwu and Aditekst right side of his lower fill the screen with a width of 120dip. If you want to be in a table layout then you have to play with the weight of the elements, although I am also not sure how this table works in the table. To fill the width of the screen, define that table with fill_parent in the layout.

If you want the Text View which takes all went left by editing the text to the right place, then a relative layout can work

  & lt; Relative layout & gt; & Lt; EditText android: id = "@ + id / gameprice" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: inputType = "textCapCharacters" android: gravity = "right" Android: minWidth = "120dip" / & gt ; & Lt; TextView android: id = "@ + id / text_price" Android: Layout_width = "Fill_parent" Android: Layout_height = "Wrap_content" Android: inputType = "textCapCharacters" android: padding = "2dip" android: text = "@ string / Game_price" Android: layout_toLeftOf = "@ id / gameprice" /> & Lt; / RelativeLayout & gt;  

You will need to play with the placement of the editing text, the textview will be left on the left.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -