I am using table layout for my Android application. I have a row with two elements and I'd like second element was right aligned. Even if I use gravity="right", it still looks like left aligned. I can image that problem is that table cell doesn't get full width to the rest of the screen. However I do not see how I can control that.
Why don't you try using layout_gravity="right" instead? And for filling the width for the screen, set the layout_width of the tablelayout to "fill_parent" and try using android:stretchColumns="*"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.