0
我有一个简单的布局,我使用Imageview作为背景,因为我想使用属性“scaleType”。我首先在相对布局中放置了Imageview,然后放置了Spinner。Android - 微调箭头不显示时,背景图像视图
微调箭头不显示。如果我删除Imageview或将图像作为背景图像(在相对布局中),它会显示。
这里是我的布局:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/White">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="400dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_marginLeft="7dp"
android:layout_marginRight="7dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="matrix"
android:src="@drawable/background" />
<Spinner
android:id="@+id/spinnerGameType"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:spinnerMode="dropdown"
android:theme="@style/ThemeOverlay.AppCompat.Light" />
</RelativeLayout>
后加入背景我看到了箭头,但材质外观现在被旧的Spinner外观所取代。 – Ido
我已编辑答案... – rafsanahmad007
谢谢。秒选项更好。唯一的问题是点击上的涟漪效应无法正常工作。 – Ido