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" />
  • 相关阅读:
    poj 3666 Making the Grade
    poj 3186 Treats for the Cows (区间dp)
    hdu 1074 Doing Homework(状压)
    CodeForces 489C Given Length and Sum of Digits...
    CodeForces 163A Substring and Subsequence
    CodeForces 366C Dima and Salad
    CodeForces 180C Letter
    CodeForces
    hdu 2859 Phalanx
    socket接收大数据流
  • 原文地址:https://www.cnblogs.com/bing11/p/3310409.html
Copyright © 2011-2022 走看看