📜  线性布局背景颜色 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:39.613000             🧑  作者: Mango

代码示例1
//If you want to set through xml using android's default color codes, then you need to do as below:
android:background="@android:color/white"
  
//If you have colors specified in your project's colors.xml, then use:
android:background="@color/white"

//If you want to do programmatically, then do:
linearlayout.setBackgroundColor(Color.WHITE);