I've created my own tab control and now I'm trying to decide on sizing and positioning of the tabs. I currently use:
android:layout_weight="9" android:layout_weight="1"
So that the tab buttons at the top of the screen take up 1/10th of the screen height, and I want the text only labels of my tabs to fill up half that height. I currently specify the height of the text in the TextView as follows:
android:textSize="16dp"
Which looks nice开发者_JS百科 on my emulator, but I assume doesn't do what I want on various screen sizes. Can I specify the text size to be half the size of the containing TextView? (Which itself was sized correctly already by the layout_weight).
android:textSize="16dp"
Don't use exact pixels. If you must set a size, use dip
精彩评论