我使用'LinearLayout'並添加4個控件。如何避免我添加到佈局的控件中的大量內容?
1. textView_1 - that contain the title of the application
2. textView_2 - that contain some dynamic text
3. Button - that contain the title of the application
4. ImageView - that contain the application logo (image)
我的問題是
我如何保持所有這些控件之間的關係? 我想使第一個控件成爲屏幕的10%,第二個控件是60%,第三個控件是20%,最後是10%。
我也想保持textview的字體是動態的 - 所以如果應用程序將在大屏幕(平板電腦)上運行,那麼字體將根據屏幕大小增長。
謝謝,動態字體大小呢? – Yanshof
sry,我不知道那個,如果我知道的話,早就會提到。 –
你可以嘗試一下「sp」,它與「dp」類似,你的字體大小會縮放,我認爲我不會嘗試這個,但你可以隨時試一試。讓我知道這是否有效,以便我可以在答案中加入。 –