大佬教程收集整理的这篇文章主要介绍了Elevation属性不工作android,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
<RelativeLayout xmlns:android="http://scheR_652_11845@as.android.com/apk/res/android" xmlns:tools="http://scheR_652_11845@as.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:BACkground="#FFFFFF" tools:context="com.example.androidmaterialsamples.MainActivity" > <ImageView android:id="@+id/sampleImage" android:layout_height="wrap_content" android:layout_width="wrap_content" android:src="@drawable/ic_launcher" android:layout_centerInParent="true" android:elevation="10dp"/> </RelativeLayout>
它没有显示该图像的任何阴影.我做错了吗?需要一些帮助.谢谢.
我也尝试过这种方式,但输出仍然没有变化.
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://scheR_652_11845@as.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#0073ff" /> <corners android:radius="16dp" /> </shape> <RelativeLayout xmlns:android="http://scheR_652_11845@as.android.com/apk/res/android" xmlns:tools="http://scheR_652_11845@as.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:BACkground="#FFFFFF" tools:context="com.example.androidmaterialsamples.MainActivity" > <TextView android:id="@+id/sampleImage" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="my name is nilesh" android:padding="10dp" android:textSize="20sp" android:layout_centerInParent="true" android:elevation="12dp" android:BACkground="@drawable/BACkground"/> </RelativeLayout>
<ImageView android:id="@+id/image" android:layout_width="wrap_content" android:layout_height="wrap_content" android:elevation="10dp" android:BACkground="@drawable/ic_launcher"/>
以上是大佬教程为你收集整理的Elevation属性不工作android全部内容,希望文章能够帮你解决Elevation属性不工作android所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。