开发者

Android : TextView how to I put the text aligned with the right hand side of the TextView

开发者 https://www.devze.com 2023-02-22 11:19 出处:网络
This should be easy but is just doesn\'t work... I want to simply display the text of my textview on the right hand side instead of the left

This should be easy but is just doesn't work...

I want to simply display the text of my textview on the right hand side instead of the left

<TextView android:id="@+id/PasswordConfText"
    android:layout_height="wrap_content"
    android:layout_gravity="center_vertical|right"
    android:layout_width="200sp"
    android:text="Password Conformation:">
</TextView>

yet tha开发者_运维百科t doesn't change a thing. if I put right or left or center_horizontal...

what am I missing?

Thanks

Jason


put android:gravity="right" instead android:layout_gravity


Have you tried using gravity instead of layout_gravity?

0

精彩评论

暂无评论...
验证码 换一张
取 消