You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitProject1/doc/向金成——精读代码/drawable/new_note.xml

37 lines
1.8 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!--
drawable文件夹 为可绘制图形的资源可以是直接的图片九宫格等等也可以是XML文件对资源进行进一步的配置
该XML文件为状态列表文件是对一个对象的不同状态下显示的可绘制图形的定义与color资源一样selector为根元素
子元素为item不同状态下显示的不同可绘制图形
-->
<item android:state_pressed="true"
android:drawable="@drawable/new_note_pressed" />
<!--
1、android:state_pressed定义了按下状态属性值为true则应当在按下状态下显示当前定义的可绘制图形
2、android:drawable属性 定义了应显示的可绘制图形,是对可绘制图形的引用 new_note_pressed图形是在drawable-hdpi文件夹下
该文件夹也是可绘制图形,但为高密度的图形,对其应用也是 @drawable/名字
-->
<item
android:drawable="@drawable/new_note_normal" />
<!--
定义了默认的可绘制图形
-->
</selector>