常見的佈局或控件問題
這些都是我遇到並解決了的問題,希望對你有幫助。以後類似的問題也將記錄在此博文中
RadioGroup和RadioButton要有id否則無法實現單選
LinearLayout(或其他佈局) 的divider有圖用圖,沒圖寫@drawable的xml,且要寫
android:showDividers="",否則無效。
佈局問題:
《LinearLayout佈局1》
<ScrollView
android:weight="1"
android:width="match_parent"
android:hight="wrap_parent"/>
《LinearLayout佈局2》
一定要加android:weight="1"否則佈局2不顯示