commit 9a9ade7eebc2944f9335fe2565cf123b9c4e3e29 Author: daimajia Date: Mon Aug 25 12:08:30 2014 +0800 Android Swipe Layout born diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..207dbb0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +.gradle +/local.properties +/.idea/workspace.xml +.DS_Store +/build +# built application files +*.apk +*.ap_ + +# files for the dex VM +*.dex + +# Java class files +*.class +.DS_Store + +# generated files +bin/ +gen/ +Wiki/ + +# Local configuration file (sdk path, etc) +local.properties + +# Eclipse project files +.classpath +.project +.settings/ + +# Proguard folder generated by Eclipse +proguard/ + +#Android Studio +build/ + +# Intellij project files +*.iml +*.ipr +*.iws +.idea/ + +#gradle +.gradle/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..2c4f14d --- /dev/null +++ b/README.md @@ -0,0 +1,98 @@ +# Android Swipe Layout + +This is the brother of [AndroidViewHover](https://github.com/daimajia/AndroidViewHover). + +One year ago, I started to make an app named [EverMemo](https://play.google.com/store/apps/details?id=com.zhan_dui.evermemo) with my good friends. The designer gave me a design picture, the design like this: + +![](http://ww1.sinaimg.cn/mw690/610dc034jw1ejoquidvvsg208i0630u4.gif) + +I found it's pretty hard to archive this effect, cause you have to be very familiar with the Android Touch System. It was beyond my ability that moment, and I also noticed that there was no such a concept library... + +So... as you see right now. + +## Demo + +![](http://ww2.sinaimg.cn/mw690/610dc034jw1ejoplapwtqg208n0e74dx.gif) + +Before I made this, I actually found some libraries (eg.[SwipeListView](https://github.com/47deg/android-swipelistview)) that helps developers to integrate swiping with your UI component. But they have too much limitation, only in ListView, or some other limitations. + +When I start to make this library, I set some goals: + +- Can be easily integrated in anywhere, ListView, GridView, ViewGroup etc. +- Can receive `onOpen`,`onClose`,`onUpdate` callbacks. +- Can notifiy the hidden children how much they have shown. +- Can be nested each other. + +## Usage + +### Step 1 +#### Gradle + +```groovy +dependencies { + compile "com.daimajia.swipelayout:library:1.0.0@aar" +} +``` + +#### Maven + +```xml + + com.daimajia.swipelayout + library + 1.0.0 + apklib + +``` + +#### Eclipse + + +### Step 2 + +Create a `SwipeLayout`: + +- `SwipeLayout` must have 2 children (all should be an instance of `ViewGroup`). + +```xml + + + + + + + + + + + + + +``` + +There are some preset examples: [example1](./demo/src/main/res/layout/sample1.xml), [example2](./demo/src/main/res/layout/sample2.xml), [example3](./demo/src/main/res/layout/sample3.xml). + +### Step3 + +[Source code](./demo/src/main/java/com/daimajia/swipedemo/MyActivity.java). + +## Wiki + +Wiki is under construction. + +## About me + +A student in mainland China. + +Welcome to [offer me an internship](mailto:daimajia@gmail.com). If you have any new idea about this project, feel free to [contact me](mailto:daimajia@gmail.com). :smiley: + diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..a75fc81 --- /dev/null +++ b/build.gradle @@ -0,0 +1,19 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:0.12.+' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + jcenter() + } +} diff --git a/demo/.gitignore b/demo/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/demo/.gitignore @@ -0,0 +1 @@ +/build diff --git a/demo/build.gradle b/demo/build.gradle new file mode 100644 index 0000000..5af1de8 --- /dev/null +++ b/demo/build.gradle @@ -0,0 +1,28 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 18 + buildToolsVersion "20.0.0" + + defaultConfig { + applicationId "com.daimajia.swipedemo" + minSdkVersion 18 + targetSdkVersion 18 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + runProguard false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile project(":library") + compile 'com.nineoldandroids:library:2.4.0' + compile 'com.daimajia.easing:library:1.0.0@aar' + compile 'com.daimajia.androidanimations:library:1.1.2@aar' +} diff --git a/demo/proguard-rules.pro b/demo/proguard-rules.pro new file mode 100644 index 0000000..bb65c6f --- /dev/null +++ b/demo/proguard-rules.pro @@ -0,0 +1,17 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /Applications/Android Studio.app/sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/demo/src/androidTest/java/com/daimajia/swipe/ApplicationTest.java b/demo/src/androidTest/java/com/daimajia/swipe/ApplicationTest.java new file mode 100644 index 0000000..5845531 --- /dev/null +++ b/demo/src/androidTest/java/com/daimajia/swipe/ApplicationTest.java @@ -0,0 +1,13 @@ +package com.daimajia.swipe; + +import android.app.Application; +import android.test.ApplicationTestCase; + +/** + * Testing Fundamentals + */ +public class ApplicationTest extends ApplicationTestCase { + public ApplicationTest() { + super(Application.class); + } +} \ No newline at end of file diff --git a/demo/src/main/AndroidManifest.xml b/demo/src/main/AndroidManifest.xml new file mode 100644 index 0000000..c518607 --- /dev/null +++ b/demo/src/main/AndroidManifest.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + diff --git a/demo/src/main/java/com/daimajia/swipedemo/GridViewExample.java b/demo/src/main/java/com/daimajia/swipedemo/GridViewExample.java new file mode 100644 index 0000000..5dd40ee --- /dev/null +++ b/demo/src/main/java/com/daimajia/swipedemo/GridViewExample.java @@ -0,0 +1,48 @@ +package com.daimajia.swipedemo; + +import android.app.Activity; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.widget.AdapterView; +import android.widget.GridView; + +import com.daimajia.swipedemo.adapter.GridViewAdapter; + +public class GridViewExample extends Activity{ + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.gridview); + final GridView gridView = (GridView)findViewById(R.id.gridview); + gridView.setAdapter(new GridViewAdapter(this)); + gridView.setSelected(false); + gridView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { + @Override + public boolean onItemLongClick(AdapterView parent, View view, int position, long id) { + Log.e("onItemLongClick","onItemLongClick:" + position); + return false; + } + }); + gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) { + Log.e("onItemClick","onItemClick:" + position); + } + }); + + + gridView.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + @Override + public void onItemSelected(AdapterView parent, View view, int position, long id) { + Log.e("onItemSelected","onItemSelected:" + position); + } + + @Override + public void onNothingSelected(AdapterView parent) { + + } + }); + } +} diff --git a/demo/src/main/java/com/daimajia/swipedemo/ListViewExample.java b/demo/src/main/java/com/daimajia/swipedemo/ListViewExample.java new file mode 100644 index 0000000..5dc8ddc --- /dev/null +++ b/demo/src/main/java/com/daimajia/swipedemo/ListViewExample.java @@ -0,0 +1,97 @@ +package com.daimajia.swipedemo; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.util.Log; +import android.view.Menu; +import android.view.MenuItem; +import android.view.MotionEvent; +import android.view.View; +import android.widget.AbsListView; +import android.widget.AdapterView; +import android.widget.ListView; + +import com.daimajia.swipedemo.adapter.ListViewAdapter; + +public class ListViewExample extends Activity { + + private ListView mListView; + private ListViewAdapter mAdapter; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.listview); + mListView = (ListView)findViewById(R.id.listview); + mAdapter = new ListViewAdapter(this); + mListView.setAdapter(mAdapter); + mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) { + Log.e("ListView", "onItemClick:" + position); + } + }); + mListView.setOnTouchListener(new View.OnTouchListener() { + @Override + public boolean onTouch(View v, MotionEvent event) { + Log.e("ListView","OnTouch"); + return false; + } + }); + mListView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { + @Override + public boolean onItemLongClick(AdapterView parent, View view, int position, long id) { + Log.e("ListView","onItemLongClick:" + position); + return false; + } + }); + mListView.setOnScrollListener(new AbsListView.OnScrollListener() { + @Override + public void onScrollStateChanged(AbsListView view, int scrollState) { + Log.e("ListView","onScrollStateChanged"); + } + + @Override + public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { + + } + }); + + mListView.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + @Override + public void onItemSelected(AdapterView parent, View view, int position, long id) { + Log.e("ListView", "onItemSelected:" + position); + } + + @Override + public void onNothingSelected(AdapterView parent) { + Log.e("ListView", "onNothingSelected:"); + } + }); + } + + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.my, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + if (id == R.id.action_listview) { + startActivity(new Intent(this, ListViewExample.class)); + return true; + }else if(id == R.id.action_gridview){ + startActivity(new Intent(this, GridViewExample.class)); + return true; + } + return super.onOptionsItemSelected(item); + } +} diff --git a/demo/src/main/java/com/daimajia/swipedemo/MyActivity.java b/demo/src/main/java/com/daimajia/swipedemo/MyActivity.java new file mode 100644 index 0000000..0f40be4 --- /dev/null +++ b/demo/src/main/java/com/daimajia/swipedemo/MyActivity.java @@ -0,0 +1,172 @@ +package com.daimajia.swipedemo; + +import android.app.Activity; +import android.content.Intent; +import android.graphics.Color; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.widget.Toast; + +import com.daimajia.swipe.SwipeLayout; + +public class MyActivity extends Activity { + + private SwipeLayout sample1, sample2,sample3; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.main); + + SwipeLayout swipeLayout = (SwipeLayout)findViewById(R.id.godfather); + swipeLayout.setDragEdge(SwipeLayout.DragEdge.Bottom); + + // + sample1 = (SwipeLayout)findViewById(R.id.sample1); + sample1.setShowMode(SwipeLayout.ShowMode.LayDown); + sample1.setDragEdge(SwipeLayout.DragEdge.Left); + sample1.addRevealListener(R.id.delete, new SwipeLayout.OnRevealListener() { + @Override + public void onReveal(View child, SwipeLayout.DragEdge edge, float fraction, int distance) { + + } + }); + + sample2 = (SwipeLayout)findViewById(R.id.sample2); + sample2.setShowMode(SwipeLayout.ShowMode.LayDown); + sample2.setShowMode(SwipeLayout.ShowMode.PullOut); + sample2.findViewById(R.id.star).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Toast.makeText(MyActivity.this, "Star", Toast.LENGTH_SHORT).show(); + } + }); + + sample2.findViewById(R.id.trash).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Toast.makeText(MyActivity.this, "Trash Bin", Toast.LENGTH_SHORT).show(); + } + }); + + sample2.findViewById(R.id.magnifier).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Toast.makeText(MyActivity.this, "Magnifier", Toast.LENGTH_SHORT).show(); + } + }); +// sample2.addRevealListener(new int[]{R.id.magnifier, R.id.star, R.id.trash}, new SwipeLayout.OnRevealListener() { +// @Override +// public void onReveal(View child, SwipeLayout.DragEdge edge, float fraction, int distance) { +// child.setScaleX(fraction); +// } +// }); + + sample2.findViewById(R.id.click).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Toast.makeText(MyActivity.this, "Yo",Toast.LENGTH_SHORT).show(); + } + }); + + + sample3 = (SwipeLayout)findViewById(R.id.sample3); + sample3.setDragEdge(SwipeLayout.DragEdge.Top); + sample3.addRevealListener(R.id.bottom_wrapper_child1, new SwipeLayout.OnRevealListener() { + @Override + public void onReveal(View child, SwipeLayout.DragEdge edge, float fraction, int distance) { + View star = child.findViewById(R.id.star); + float d = child.getHeight() / 2 - star.getHeight() / 2; + star.setTranslationY(d * fraction); + star.setScaleX(fraction+0.6f); + star.setScaleY(fraction+0.6f); + int c = (Integer)evaluate(fraction, Color.parseColor("#dddddd"), Color.parseColor("#4C535B")); + child.setBackgroundColor(c); + } + }); + sample3.findViewById(R.id.star).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Toast.makeText(MyActivity.this, "Yo!", Toast.LENGTH_SHORT).show(); + } + }); + +// final int[] res = new int[]{R.id.changeLeft, R.id.changeRight, R.id.changeTop, R.id.changeBottom}; +// final SwipeLayout.DragEdge[] edges = new SwipeLayout.DragEdge[]{SwipeLayout.DragEdge.Left, SwipeLayout.DragEdge.Right, SwipeLayout.DragEdge.Top, SwipeLayout.DragEdge.Bottom}; +// final SwipeLayout[] layouts = new SwipeLayout[]{sample1,sample2,sample3}; +// for(int i = 0; i < res.length; i++){ +// findViewById(res[i]).setTag(edges[i]); +// findViewById(res[i]).setOnClickListener(new View.OnClickListener() { +// @Override +// public void onClick(View v) { +// for (SwipeLayout l : layouts) { +// l.setDragEdge((SwipeLayout.DragEdge) v.getTag()); +// } +// } +// }); +// } +// +// findViewById(R.id.pullout).setOnClickListener(new View.OnClickListener() { +// @Override +// public void onClick(View v) { +// for (SwipeLayout l : layouts) { +// l.setShowMode(SwipeLayout.ShowMode.PullOut); +// } +// } +// }); +// +// findViewById(R.id.laydown).setOnClickListener(new View.OnClickListener() { +// @Override +// public void onClick(View v) { +// for(SwipeLayout l : layouts){ +// l.setShowMode(SwipeLayout.ShowMode.LayDown); +// } +// } +// }); + + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.my, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle action bar item clicks here. The action bar will + // automatically handle clicks on the Home/Up button, so long + // as you specify a parent activity in AndroidManifest.xml. + int id = item.getItemId(); + if (id == R.id.action_listview) { + startActivity(new Intent(this, ListViewExample.class)); + return true; + }else if(id == R.id.action_gridview){ + startActivity(new Intent(this, GridViewExample.class)); + return true; + } + return super.onOptionsItemSelected(item); + } + + public Object evaluate(float fraction, Object startValue, Object endValue) { + int startInt = (Integer) startValue; + int startA = (startInt >> 24) & 0xff; + int startR = (startInt >> 16) & 0xff; + int startG = (startInt >> 8) & 0xff; + int startB = startInt & 0xff; + + int endInt = (Integer) endValue; + int endA = (endInt >> 24) & 0xff; + int endR = (endInt >> 16) & 0xff; + int endG = (endInt >> 8) & 0xff; + int endB = endInt & 0xff; + + return (int)((startA + (int)(fraction * (endA - startA))) << 24) | + (int)((startR + (int)(fraction * (endR - startR))) << 16) | + (int)((startG + (int)(fraction * (endG - startG))) << 8) | + (int)((startB + (int)(fraction * (endB - startB)))); + } +} diff --git a/demo/src/main/java/com/daimajia/swipedemo/adapter/GridViewAdapter.java b/demo/src/main/java/com/daimajia/swipedemo/adapter/GridViewAdapter.java new file mode 100644 index 0000000..d0376d8 --- /dev/null +++ b/demo/src/main/java/com/daimajia/swipedemo/adapter/GridViewAdapter.java @@ -0,0 +1,50 @@ +package com.daimajia.swipedemo.adapter; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import com.daimajia.swipe.SwipeAdapter; +import com.daimajia.swipedemo.R; + +public class GridViewAdapter extends SwipeAdapter { + + private Context mContext; + + public GridViewAdapter(Context mContext) { + this.mContext = mContext; + } + + @Override + public int getSwipeLayoutResourceId(int position) { + return R.id.swipe; + } + + @Override + public View generateView(int position, ViewGroup parent) { + return LayoutInflater.from(mContext).inflate(R.layout.grid_item, null); + } + + @Override + public void fillValues(int position, View convertView) { + TextView t = (TextView)convertView.findViewById(R.id.position); + t.setText((position + 1 )+"."); + } + + @Override + public int getCount() { + return 50; + } + + @Override + public Object getItem(int position) { + return null; + } + + @Override + public long getItemId(int position) { + return position; + } +} diff --git a/demo/src/main/java/com/daimajia/swipedemo/adapter/ListViewAdapter.java b/demo/src/main/java/com/daimajia/swipedemo/adapter/ListViewAdapter.java new file mode 100644 index 0000000..dff5d44 --- /dev/null +++ b/demo/src/main/java/com/daimajia/swipedemo/adapter/ListViewAdapter.java @@ -0,0 +1,76 @@ +package com.daimajia.swipedemo.adapter; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import com.daimajia.androidanimations.library.Techniques; +import com.daimajia.androidanimations.library.YoYo; +import com.daimajia.swipe.SwipeAdapter; +import com.daimajia.swipe.SwipeLayout; +import com.daimajia.swipedemo.R; + +public class ListViewAdapter extends SwipeAdapter { + + private Context mContext; + + public ListViewAdapter(Context mContext) { + this.mContext = mContext; + } + + @Override + public int getSwipeLayoutResourceId(int position) { + return R.id.swipe; + } + + @Override + public View generateView(int position, ViewGroup parent) { + View v = LayoutInflater.from(mContext).inflate(R.layout.listview_item, null); + SwipeLayout swipeLayout = (SwipeLayout)v.findViewById(getSwipeLayoutResourceId(position)); + swipeLayout.addSwipeListener(new SwipeLayout.SwipeListener() { + @Override + public void onClose(SwipeLayout layout) { + + } + + @Override + public void onUpdate(SwipeLayout layout, int leftOffset, int topOffset) { + + } + + @Override + public void onOpen(SwipeLayout layout) { + YoYo.with(Techniques.Tada).duration(500).delay(100).playOn(layout.findViewById(R.id.trash)); + } + + @Override + public void onHandRelease(SwipeLayout layout, float xvel, float yvel) { + + } + }); + return v; + } + + @Override + public void fillValues(int position, View convertView) { + TextView t = (TextView)convertView.findViewById(R.id.position); + t.setText((position + 1) + "."); + } + + @Override + public int getCount() { + return 50; + } + + @Override + public Object getItem(int position) { + return null; + } + + @Override + public long getItemId(int position) { + return position; + } +} diff --git a/demo/src/main/res/drawable-hdpi/bird.png b/demo/src/main/res/drawable-hdpi/bird.png new file mode 100644 index 0000000..ab38228 Binary files /dev/null and b/demo/src/main/res/drawable-hdpi/bird.png differ diff --git a/demo/src/main/res/drawable-hdpi/hand.png b/demo/src/main/res/drawable-hdpi/hand.png new file mode 100644 index 0000000..3fb853d Binary files /dev/null and b/demo/src/main/res/drawable-hdpi/hand.png differ diff --git a/demo/src/main/res/drawable-hdpi/ic_launcher.png b/demo/src/main/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000..96a442e Binary files /dev/null and b/demo/src/main/res/drawable-hdpi/ic_launcher.png differ diff --git a/demo/src/main/res/drawable-hdpi/magnifier.png b/demo/src/main/res/drawable-hdpi/magnifier.png new file mode 100644 index 0000000..b4ac239 Binary files /dev/null and b/demo/src/main/res/drawable-hdpi/magnifier.png differ diff --git a/demo/src/main/res/drawable-hdpi/star.png b/demo/src/main/res/drawable-hdpi/star.png new file mode 100644 index 0000000..c936e4e Binary files /dev/null and b/demo/src/main/res/drawable-hdpi/star.png differ diff --git a/demo/src/main/res/drawable-hdpi/trash.png b/demo/src/main/res/drawable-hdpi/trash.png new file mode 100644 index 0000000..0f82b5a Binary files /dev/null and b/demo/src/main/res/drawable-hdpi/trash.png differ diff --git a/demo/src/main/res/drawable-mdpi/ic_launcher.png b/demo/src/main/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000..359047d Binary files /dev/null and b/demo/src/main/res/drawable-mdpi/ic_launcher.png differ diff --git a/demo/src/main/res/drawable-xhdpi/ic_launcher.png b/demo/src/main/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000..71c6d76 Binary files /dev/null and b/demo/src/main/res/drawable-xhdpi/ic_launcher.png differ diff --git a/demo/src/main/res/drawable-xxhdpi/ic_launcher.png b/demo/src/main/res/drawable-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..4df1894 Binary files /dev/null and b/demo/src/main/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/demo/src/main/res/drawable/hover_background.xml b/demo/src/main/res/drawable/hover_background.xml new file mode 100644 index 0000000..feae5ba --- /dev/null +++ b/demo/src/main/res/drawable/hover_background.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/demo/src/main/res/drawable/hover_border_normal.xml b/demo/src/main/res/drawable/hover_border_normal.xml new file mode 100644 index 0000000..38551a7 --- /dev/null +++ b/demo/src/main/res/drawable/hover_border_normal.xml @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/demo/src/main/res/drawable/hover_border_pressed.xml b/demo/src/main/res/drawable/hover_border_pressed.xml new file mode 100644 index 0000000..4da7005 --- /dev/null +++ b/demo/src/main/res/drawable/hover_border_pressed.xml @@ -0,0 +1,16 @@ + + + + + + + + + + \ No newline at end of file diff --git a/demo/src/main/res/layout/grid_item.xml b/demo/src/main/res/layout/grid_item.xml new file mode 100644 index 0000000..5480492 --- /dev/null +++ b/demo/src/main/res/layout/grid_item.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + diff --git a/demo/src/main/res/layout/gridview.xml b/demo/src/main/res/layout/gridview.xml new file mode 100644 index 0000000..3c30b7b --- /dev/null +++ b/demo/src/main/res/layout/gridview.xml @@ -0,0 +1,11 @@ + + + diff --git a/demo/src/main/res/layout/listview.xml b/demo/src/main/res/layout/listview.xml new file mode 100644 index 0000000..cbfcc94 --- /dev/null +++ b/demo/src/main/res/layout/listview.xml @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/demo/src/main/res/layout/listview_item.xml b/demo/src/main/res/layout/listview_item.xml new file mode 100644 index 0000000..0b05757 --- /dev/null +++ b/demo/src/main/res/layout/listview_item.xml @@ -0,0 +1,55 @@ + + + + + + + +