main.xml
xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> android:id="@+id/view01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:width="210px" android:height="50px" android:background="#ff0000"/> android:id="@+id/view02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:width="180px" android:height="50px" android:background="#dd0000"/> android:id="@+id/view03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:width="150px" android:height="50px" android:background="#bb0000"/> android:id="@+id/view04" android:layout_width="wrap_content" android:layout_height="wrap_content" android:width="120px" android:height="50px" android:background="#990000"/> android:id="@+id/view05" android:layout_width="wrap_content" android:layout_height="wrap_content" android:width="90px" android:height="50px" android:background="#770000"/> android:id="@+id/view06" android:layout_width="wrap_content" android:layout_height="wrap_content" android:width="60px" android:height="50px" android:background="#550000"/> android:id="@+id/view07" android:layout_width="wrap_content" android:layout_height="wrap_content" android:width="30px" android:height="50px" android:background="#330000"/>
这7个TextView的高度完全相同,而宽度逐渐减少-这样可以保证最先添加的TextView不完全遮挡,而且我们设置了7个TextView背景色渐变。

更多相关文章

  1. Drawable
  2. android中自定义shape
  3. Android(安卓)背景渐变 渐变背景 shape
  4. TextView的android:maxHeight,android:minHeight的正确设置
  5. Android中自定义shape
  6. Android(安卓)Drawable Resources系列10:
  7. android之shape
  8. Android中如何解决输入法键盘和activity页面遮挡的问题
  9. Android中的Shape使用总结

随机推荐

  1. android 字体大小,样式 ,像素的设置
  2. Android(安卓)Design Support Library(一):F
  3. 第一章:初入Android大门(弹出对话框)
  4. Android第七期 - 二维码扫描与生成图
  5. Android-开发的第一个程序
  6. Android(安卓)Studio 升级到3.4 Gradle
  7. android http get
  8. Android(安卓)常用画图方法练习
  9. Android点击按钮播放音效
  10. android具有折叠效果的控件