In my layout, I really need to the TableView be the root view, but inside it I need very much a single TextView to be aligned to the right border of the screen, but I keep receiving the warning: Invalid layout param in a TableLayout: layout_alignParentRight activity_main.xml
What should I do to have a aligned textview inside a TableView?
您可以在TableLayout
使用gravity
,尝试将android:gravity="right"
为TextView
android:layout_alignParentRight =“ true”如果不起作用,对我来说效果很好,然后检查您的父级,在父级上尝试fill_parent或尝试将其从父级布局中移出,希望这对您有所帮助
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.