Search code examples
androidtablelayouthorizontalscrollview

android XML TableLayout issue: horizontal scroller going outside of right side of screen


I have a TableLayout with a tableRow and a horizontal scroll view in the 2nd column, but the right side always gets cut off. IF i have only 1 tableRow, it works, otherwise it goes past the visible area of the screen. To simply and isolate the problem heres an xml file with the guilty culprits. It seems basic but i have been super frustrated trying to get this to work.

. for some reason Stackoverflow isnt displaying my code correctly, heres a pastebin. link text


Solution

  • To fix this, i found out using

    android:shrinkColumns="2"
    

    (2 being the column with the horizontal scroller) fixes the issue.