我想以编程方式获得具有样式'ButtonBar'的LinearLayout的背景颜色.
<LinearLayout
android:id="@+id/buttonBar"
style="@android:style/ButtonBar"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
Run Code Online (Sandbox Code Playgroud)
我试图使用LinearLayout的getBackgroundColor,但没有找到该方法.
有没有人有想法?电贺