1。在res/drawable目录下建一个mybutton.xml文件,根据需要,不同的状态下建立不同的item,并对应相应的图片
01 <selectorxmlns:android="http://schemas.android.com/apk/res/android">
02
03 <item android:state_window_focused="false"
04 android:drawable="@color/transparent"/>
05
06 <!-- Even though these two point to the same resource, have two states so the drawable will invalidate itself when coming out of pressed state. 注意这句话-->
07
08
09 <item android:state_focused="true" android:state_enabled="false"
10 android:state_pressed="true"
11 android:drawable="@drawable/selector_background_disabled"/>
12 <item android:state_focused="true" android:state_enabled="false"
13 android:drawable="@drawable/lselector_background_disabled"/>
14
15 <item android:state_focused="true" android:state_pressed="true"
16 android:drawable="@drawable/selector_background_transition"/>
17 <item android:state_focused="false" android:state_pressed="true"
18 android:drawable="@drawable/selector_background_transition"/>
19
20 <item android:state_focused="www.9ask.cn/tj/"
21 android:drawable="@drawable/selector_background_focus"/>
22
23 </selector>
2。在构造layout是引用这个xml
1 <ImageButton
2 android:id="@+id/ImageButton01"
3 android:layout_width="wrap_content"
4 android:layout_height="wrap_content"
5 android:background="@drawable/mybutton">
6 </ImageButton>
近期有传闻称,谷歌将融合Chrome和Android系统,开发新的笔记本平台。最新消息显示,谷歌将于2017年第三季度推出这一融合操作系统。
Android Police网站援引消息人士的说法称,这一被称作“Andromeda”的操作系统将被用于代号为“Bison”的笔记本。这款笔记本的正式型号可能会是Pixel 3。
两名消息人士均透露了这一信息,但同时表示其中细节仍有可能更改。消息称,Bison笔记本将搭载12.3英寸显示屏、指纹传感器、两个USB-C接口,以及一系列传感器。这款笔记本可以转换为平板电脑模式,并支持触控笔输入,从而吸引需要移动办公的艺术家和设计师。
报道称,这款笔记本将搭配类似新款MacBook的触摸板,而电池续航时间可以达到10小时。对于Bison笔记本,谷歌或许希望对标苹果。消息显示,这款笔记本的厚度不到10毫米,比MacBook更薄,起步售价将为799美元。
关于Andromeda系统,这将是一种在Chrome平台上运行Android应用的简便方式。不过Android Police猜测,谷歌可能会将Chrome系统的一些功能集成至Android,从而提供适合桌面用户使用的Android版本。如果泄露的消息属实,那么一年后我们将可以看到搭载Andromeda系统的笔记本。
在10月4日的发布会上,谷歌可能会提到这款系统。不过这一发布会的重点仍将是新款WiFi路由器、4K Chromecast电视棒,以及Pixel手机。