Dynamically adding and removing table rows - Android

前端 未结 2 895
醉梦人生
醉梦人生 2020-12-31 17:33

I am trying to dynamically add and remove rows from a TableLayout.

The layout is defined in an xml file.

I am able to successfully remove a row, but when I c

相关标签:
2条回答
  • 2020-12-31 18:03

    Use hierarchyviewer (in your SDK tools/ directory) to determine if the row is truly not being added, or is being added but some layout parameters are messed up and so it is not appearing on-screen.

    0 讨论(0)
  • 2020-12-31 18:20
    public int indexOfChild (View child) 
    
    public View getChildAt (int index) 
    

    Both methods provided by TableLayout. ;-)

    0 讨论(0)
提交回复
热议问题