zoukankan      html  css  js  c++  java
  • 2021/2/25

    今日学习内容

    Button(按钮)与ImageButton(图像按钮)

            drawable:引用的Drawable位图,我们可以把他放到最前面,就表示组件的正常状态~
            state_focused:是否获得焦点
            state_window_focused:是否获得窗口焦点
            state_enabled:控件是否可用
            state_checkable:控件可否被勾选,eg:checkbox
            state_checked:控件是否被勾选
            state_selected:控件是否被选择,针对有滚轮的情况
            state_pressed:控件是否被按下
            state_active:控件是否处于活动状态,eg:slidingTab
            state_single:控件包含多个子控件时,确定是否只显示一个子控件
            state_first:控件包含多个子控件时,确定第一个子控件是否处于显示状态
            state_middle:控件包含多个子控件时,确定中间一个子控件是否处于显示状态
            state_last:控件包含多个子控件时,确定最后一个子控件是否处于显示状态

    <?xml version="1.0" encoding="utf-8"?>
    <selector xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:state_pressed="true" android:drawable="@drawable/ic_course_bg_fen"/>
        <item android:state_enabled="false" android:drawable="@drawable/ic_course_bg_pressed"/>
        <item android:drawable="@drawable/ic_course_bg_cheng"/>
    </selector>

    <Button
            android:id="@+id/btnOne"
            android:layout_width="match_parent"
            android:layout_height="64dp"
            android:background="@drawable/btn_bg1"
            android:text="按钮"/>
        
        
        <Button
            android:id="@+id/btnTwo"
            android:layout_width="match_parent"
            android:layout_height="64dp"
            android:text="按钮不可用"/>
  • 相关阅读:
    The archive: D:/Program Files (x86)/apache-tomcat-6.0.39/bin/bootstrap.jar w
    DTO
    关于REST的JSON格式
    extjs renderer function参数设置
    转::持久化实体persist()--往数据表中插入数据
    使用Ext.define自定义类
    转::Ext.getCmp()应用
    【转】VO DAO BO
    JPA的查询语言:JPQL的命名查询 @NamedQuery
    11.25 冒泡事件 form表单事件
  • 原文地址:https://www.cnblogs.com/qiangini/p/14905211.html
Copyright © 2011-2022 走看看