我觉得我错过了很简单的事情.我过去在其他应用程序上更改了背景颜色,但这是我制作的第一个实现Tabs的应用程序.我试图做的就是制作app内容的背景,其中有一堆按钮,黑色.通常情况下,我只是改变线性布局或黑色,但我已经使用#000000改变了很多东西,但它不再起作用了.我确定tabhost与它有关,但我需要向正确的方向踢.继承我的layout.xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TabHost
android:id="@+id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</TabWidget>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000" >
<LinearLayout
android:id="@+id/tab1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<Button
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/buttonbg"
android:gravity="center_horizontal"
android:padding="10dp"
android:shadowColor="#f5f5f5"
android:shadowDx="1"
android:shadowDy="1"
android:shadowRadius="1"
android:textColor="#DAA520"
android:textSize="12pt" />
<Button
android:id="@+id/button2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/buttonbg"
android:gravity="center_horizontal"
android:padding="10dp"
android:shadowColor="#f5f5f5"
android:shadowDx="1"
android:shadowDy="1"
android:shadowRadius="1"
android:textColor="#DAA520"
android:textSize="12pt" />
<Button
android:id="@+id/button3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/buttonbg"
android:gravity="center_horizontal"
android:padding="10dp" …Run Code Online (Sandbox Code Playgroud)