Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/182.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android API 19中的线性布局背景_Android_Eclipse_Background_Android Linearlayout - Fatal编程技术网

Android API 19中的线性布局背景

Android API 19中的线性布局背景,android,eclipse,background,android-linearlayout,Android,Eclipse,Background,Android Linearlayout,在API 19 4.4.2中,我试图将纯色设置为线性布局背景,但该颜色像按钮背景一样覆盖视图。我试图分别改变按钮的背景,但它们失去了格式和底纹。如何设置线性布局背景而不影响其他视图背景 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/LinearLayout"

在API 19 4.4.2中,我试图将纯色设置为线性布局背景,但该颜色像按钮背景一样覆盖视图。我试图分别改变按钮的背景,但它们失去了格式和底纹。如何设置线性布局背景而不影响其他视图背景

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#00f"
android:orientation="vertical" >

<TextView
    android:id="@+id/textView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:gravity="center"
    android:text="@string/Status_Update"
    android:textAppearance="?android:attr/textAppearanceLarge" />

<Button
    android:id="@+id/button1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/Update_Button" />

<EditText
    android:id="@+id/editText1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:ems="10"
    android:hint="@string/EditText_Hint"
    android:inputType="textMultiLine" />
我不能插入两个相同代码的预览之间的差异,因为我的名声不太好。 当我将图形布局预览更改为10级时,一切看起来都很好,但问题是当我将其更改为较新的预览并在4.4.2 emulator上运行时。
我在物理设备上测试了它,结果与emulator相同。

显示您的布局SMLIN API 19 4.2.2-4.2.2是API级别17,而不是19。你是说4.4.2吗?对不起,你是对的,我的问题在4.4.2API 19中,这是我的布局XML:当我将图形布局预览更改为10级时,一切看起来都很好,但问题是当我将其更改为较新的预览并在4.4.2 emulator上运行时。请将代码添加到问题中,而不是链接图像。不管怎样,通过查看屏幕截图,问题似乎在于模拟器,误用的情况并不少见。在物理设备上测试你的应用。好的,对不起,我是新来的。我不能在这里添加图像,因为我的名声不好。谢谢你的意见,我在一个物理设备上测试了它,结果和emulator是一样的。