简单实现探探左滑右滑
效果演示![微笑](http://static.blog.csdn.net/xheditor/xheditor_emot/default/smile.gif)
![](http://www.apkbus.com/data/attachment/forum/201703/21/143804w74axeag666kxfsa.gif)
首先上网下载一个library文件夹
接着把library工程导入到工作空间中,步骤如下:
先点击file-->project-->选中新创建的工程-->dependencies-->点击“+”号-->选中第三个Module Dependency-->找到library,选中-->ok
在androidstudio上导入library的Module,然后再在app上把那个library添加上去,这样我们的app就关联了那个library库了
如下图:
源码网址:xmuSistone/android-card-slide-panel
下面就可以写代码了
在drawable里写入一些样式
home_button
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/home_pressed" android:state_focused="true" android:state_pressed="true"/>
<!-- 触摸模式下单击时的背景图片 -->
<item android:drawable="@drawable/home_pressed" android:state_focused="false" android:state_pressed="true"/>
<!-- 选中时的图片背景 -->
<item android:drawable="@drawable/home_pressed" android:state_selected="true"/>
<!-- 获得焦点时的图片背景 -->
<item android:drawable="@drawable/home_pressed" android:state_focused="true"/>
<item android:drawable="@drawable/home_normal"/>
</selector>
ignore_button
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawa