Android TableLayout width issue

ε祈祈猫儿з 提交于 2019-12-05 12:20:45

Adding android:shrinkColumns="1" to TableLayout solves my issue.

Can you try setting setHorizontallyScrolling to the DetailAdress TextView to false?

@Vikas, its good that you have solved your problem.

BUt I would still recommend to use HorizontalScrollView for security purposes. If at all few chars are not visible, then horizontal scrollbar will help to manage that. XML text :

<HorizontalScrollView android:layout_width="fill_parent" 
    android:layout_height="wrap_content"
    android:layout_marginTop="10dp" android:layout_marginBottom="10dp" >

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"   
android:layout_width="fill_parent"   
android:layout_height="fill_parent"   
android:padding="5px">   
  ......
  ......
  ADD YOUR ROWS 
 </TableLayout>       
</HorizontalScrollView>

Its always better to take care of the unexpected.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!