How to right align widget in horizontal linear layout Android?

前端 未结 19 3063
温柔的废话
温柔的废话 2020-12-12 10:34

This is the code I am using and it is not working:




        
19条回答
  •  感情败类
    2020-12-12 10:39

    Do not change the gravity of the LinearLayout to "right" if you don't want everything to be to the right.

    Try:

    1. Change TextView's width to fill_parent
    2. Change TextView's gravity to right

    Code:

        
        
    

提交回复
热议问题