Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/201.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 带有选择器背景的安卓按钮不';t装载横向绞车_Android_Xml_Button_Selector_Drawable - Fatal编程技术网

Android 带有选择器背景的安卓按钮不';t装载横向绞车

Android 带有选择器背景的安卓按钮不';t装载横向绞车,android,xml,button,selector,drawable,Android,Xml,Button,Selector,Drawable,我已经设置了一个带有xml选择器背景的按钮。可拉拔电缆位于可拉拔xhdpi和可拉拔土地xhdpi的不同版本。 问题是在旋转更改为横向时,按钮未与陆地版本一起指定。 按钮如下所示: <Button android:id="@+id/home_button" android:layout_height="wrap_content" android:layout_width="wrap

我已经设置了一个带有xml选择器背景的按钮。可拉拔电缆位于可拉拔xhdpi和可拉拔土地xhdpi的不同版本。 问题是在旋转更改为横向时,按钮未与陆地版本一起指定。

按钮如下所示:

<Button android:id="@+id/home_button"
                            android:layout_height="wrap_content"
                            android:layout_width="wrap_content"
                            android:layout_alignParentBottom="true"
                            android:layout_marginBottom="0dp"
                            android:background="@drawable/xml_selector_home"
                            android:layout_toRightOf="@+id/fwd_button"
                            android:layout_weight="1">
                    </Button>


可绘制按钮如下所示:



将ladscape文件夹更改为

drawable-xhdpi-land

嗯。。不起作用。当我尝试使用java在触摸事件上加载纹理程序时,它知道如何从drawable land xhdpi绘制纹理。由于某些原因,xml选择器机制不起作用。
drawable-xhdpi-land