Right align column in android table layout

前端 未结 2 1715
天命终不由人
天命终不由人 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:27

    1. android:stretchColumns="x" where x is the column you want to fill
    2. android:layout_width="fill_parent" to ensure everything fills the screen
    3. android:layout_gravity="right" for the view component in column "x"

    example (pseudo code):

    
    
        
            
            
        
    
    
    

提交回复
热议问题