Skip to content

Commit

Permalink
Added support for tags on the contentView
Browse files Browse the repository at this point in the history
  • Loading branch information
wdullaer committed Dec 8, 2014
1 parent efa565a commit 24ff5c5
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 9 deletions.
4 changes: 2 additions & 2 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ dependencies {
}

android {
compileSdkVersion 19
compileSdkVersion 21
buildToolsVersion "19.1.0"
useOldManifestMerger true

defaultConfig {
minSdkVersion 14
targetSdkVersion 19
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
Expand Down
10 changes: 5 additions & 5 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 19
compileSdkVersion 21
buildToolsVersion "19.1.0"

defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode 3
versionName "1.1.1"
targetSdkVersion 21
versionCode 4
versionName "1.2.0"
}
buildTypes {
release {
Expand All @@ -21,6 +21,6 @@ android {
task jar(type: Jar) {
dependsOn assembleRelease
baseName "swipeactionadapter"
version "1.1.1"
version "1.2.0"
from fileTree(dir: 'build/intermediates/classes/release/')
}
4 changes: 2 additions & 2 deletions library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wdullaer.swipeactionadapter"
android:versionCode="3"
android:versionName="1.1.1" >
android:versionCode="4"
android:versionName="1.0.0" >

<uses-sdk
android:minSdkVersion="8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,26 @@ public void translateBackgrounds(){
value.setTranslationX(-Integer.signum(key)*value.getWidth());
}
}

@Override
public Object getTag() {
if(contentView != null) return contentView.getTag();
else return null;
}

@Override
public void setTag(Object tag) {
if(contentView != null) contentView.setTag(tag);
}

@Override
public Object getTag(int key) {
if(contentView != null) return contentView.getTag(key);
else return null;
}

@Override
public void setTag(int key, Object tag) {
if(contentView != null) contentView.setTag(key, tag);
}
}

0 comments on commit 24ff5c5

Please sign in to comment.