我正在嘗試着色「空間」小部件。我嘗試使用android:foreground
和android:background
屬性,但仍顯示透明視圖。着色「空間」小部件
<android.support.v4.widget.Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:foreground="@android:color/black"
android:background="@android:color/black" />
空間的目的是**透明**。爲什麼不使用具有彩色背景的裸視圖(或TextView或ImageView或其他)?對於分隔符(這看起來像你願意實現的用法),我使用裸視圖。 –
爲什麼空間屬性不起作用? –
「空間是透明的。」這對調試非常有用,真的...... – AndrewBloom