Android在Layout添加控件时遇到 LinearLayout 报错,注意:
Android布局LinearLayout 要设置属性:
android:orientation = "vertical"
否则组件可能无法显示。
该属性不设置时,值默认为horizontal,此时第一个控件的宽度若设置成"fill_parent",后面添加的组件将都无法看到。因此使用时注意设置 android:orientation 该属性。
Android在Layout添加控件时遇到 LinearLayout 报错,注意:
Android布局LinearLayout 要设置属性:
android:orientation = "vertical"
否则组件可能无法显示。
该属性不设置时,值默认为horizontal,此时第一个控件的宽度若设置成"fill_parent",后面添加的组件将都无法看到。因此使用时注意设置 android:orientation 该属性。