小编Dej*_*api的帖子

Android如何获取LinearLayout的颜色"style ="@ android:style/ButtonBar""

我想以编程方式获得具有样式'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,但没有找到该方法.

有没有人有想法?电贺

android background colors android-linearlayout

2
推荐指数
1
解决办法
2533
查看次数