android给view比如layout等添加阴影效果
2014-06-20 14:49
316 查看
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="#e5e5e5">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@android:drawable/toast_frame"
android:padding="4dp" > //经测试,这里一定要设置,不然这上面覆盖的白色背景无法全部覆盖@android:drawable/toast_frame的黑色背景
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:padding="13dp" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Sombra no estilo Toast"
android:textColor="#707070" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="#e5e5e5">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@android:drawable/toast_frame"
android:padding="4dp" > //经测试,这里一定要设置,不然这上面覆盖的白色背景无法全部覆盖@android:drawable/toast_frame的黑色背景
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:padding="13dp" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Sombra no estilo Toast"
android:textColor="#707070" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
相关文章推荐
- android布局中子View添加动态隐藏和显示的动画效果。(LayoutTransition)
- Android TextView显示文字过长时添加阴影渐变消失效果
- android 把TextView中的文字添加阴影效果
- android中给TextView或者Button的文字添加阴影效果
- android中给TextView或者Button的文字添加阴影效果
- android中给TextView或者Button的文字添加阴影效果
- Android 布局研究,按钮,TextView添加阴影效果,直接连接
- android textview 添加阴影效果:Paint.setShadowLayer is not supported
- android中给TextView或许Button的文字添加阴影效果
- AndroidTips(1):给TextView文字添加阴影效果
- android 给LinearLayout中添加一定数量的控件,并让着一定数量的控件从右到左移动,每隔若干秒停顿一下,最后一个view链接第一个view,然后继续移动循环往复,形成一个死循环简单动画效果
- Android--添加阴影效果--CardView的使用
- Android TextView富文本、超链接和添加文字背景等其他效果的实现
- Android的TextView属性XML详解与android文字阴影效果
- android 在bitmap或者view上 添加渐变阴影
- Android TextView阴影效果
- Android 实现View中添加子元素的动态效果
- Android开发:ImageView阴影和图层效果
- android LinearLayout等view如何获取button效果