zoukankan      html  css  js  c++  java
  • 每日总结

    今天继续学习Android的button

    使用颜色值绘制圆角按钮

    bbuton_danger_rounded.xml:

    <?xml version="1.0" encoding="utf-8"?>
    <selector xmlns:android="http://schemas.android.com/apk/res/android">
    
        <item android:state_pressed="true"><shape>
                <solid android:color="@color/bbutton_danger_pressed" />
                <stroke android:width="1dp" android:color="@color/bbutton_danger_edge" />
                <corners android:radius="@dimen/bbuton_rounded_corner_radius"/>
            </shape></item>
            
        
        <item android:state_enabled="false"><shape>
            <solid android:color="@color/bbutton_danger_disabled" />
                <stroke android:width="1dp" android:color="@color/bbutton_danger_disabled_edge" />
                <corners android:radius="@dimen/bbuton_rounded_corner_radius"/>
            </shape></item>
            
    
        <item><shape>
                <solid android:color="@color/bbutton_danger" />
                <stroke android:width="1dp" android:color="@color/bbutton_danger_edge" />
                <corners android:radius="@dimen/bbuton_rounded_corner_radius"/>
            </shape></item>
        
            
    </selector>

    color.xml:

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <color name="bbutton_danger_pressed">#ffd2322d</color>
        <color name="bbutton_danger_edge">#ffd43f3a</color>
        <color name="bbutton_danger_disabled">#a5d9534f</color>
        <color name="bbutton_danger_disabled_edge">#a5d43f3a</color>
        <color name="bbutton_danger">#ffd9534f</color>
        <color name="text_font_white">#FFFFFF</color>
    </resources>

    dimens.xml:

    <dimen name="bbuton_rounded_corner_radius">5dp</dimen>
  • 相关阅读:
    Callable的Future模式
    并发队列
    并发工具类和线程池
    安全与死锁问题
    ConcurrentHashMap底层实现
    Map集合常见面试题
    List集合框架
    类加载器
    Activiti中个人任务分配
    流程定义
  • 原文地址:https://www.cnblogs.com/lxywsx/p/14909173.html
Copyright © 2011-2022 走看看