Right align column in android table layout

前端 未结 2 1725
天命终不由人
天命终不由人 2021-02-18 20:44

I want to draw a table in which last column should be at the right most side of the table.

This is how the table row looks like:



        
2条回答
  •  死守一世寂寞
    2021-02-18 21:36

    Here you have to do

    1. set the table row width to fill_parent

    2. and set the android:layout_gravity="right" to the textview which you want to align right it to the table row

      ---- or ----

    1. add the weight to the textview inside a table row so that they can align how you want.

提交回复
热议问题