zoukankan      html  css  js  c++  java
  • 圆角的实现

    <!-- gradient   -- 对应颜色渐变。 startcolor、endcolor就不多说了。 android:angle 是指从哪个角度开始变。

     
    solid      --  填充。
     
    stroke   --  描边。
     
    corners  --  圆角。
     
    padding   -- 定义内容离边界的距离。 与android:padding_left、android:padding_right这些是一个道理。 -->
     
    shape.xml
    <?xml version="1.0" encoding="utf-8"?>
     <!-- 实心  透明色 -->
     <solid android:color="#FFFFFF"/>
     
         <gradient android:startColor="#000000" 
            android:endColor="#000000" 
             android:angle="90" />
         <stroke
             android:width="2dp"
             android:color="#6C6C6C"  />
         <corners
             android:radius="10dip" />
         <padding
             android:left="0dp"
             android:top="0dp"
             android:right="0dp"
             android:bottom="0dp" />
          
    </shape>
     
    在自定义的View中添加
        <com.pengcheng.EFBReader.widget.CornerListView
            android:id="@+id/EfbfileListView"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_margin="10dip"
     
            android:background="@drawable/shape"
     
            android:cacheColorHint="#00000000"
            android:drawSelectorOnTop="false"
            android:fadingEdge="none"
            android:listSelector="#00000000" />
  • 相关阅读:
    Unity Shader _Time
    常见纹理压缩格式
    U3D Transform组件
    java计算文件32位md5值
    Andoid 利用ndk-stack定位崩溃代码
    glsl计算sprite的亮度饱和度对比度
    Android项目文件结构
    Android Studio文件目录介绍
    Struts2配置dtd约束
    java系列--JSP的属性和内置对象
  • 原文地址:https://www.cnblogs.com/bing11/p/3310409.html
Copyright © 2011-2022 走看看