From 95f57cecccd0b81d7b0248f1745f464e400dd3b3 Mon Sep 17 00:00:00 2001 From: Tim Roes Date: Fri, 20 Sep 2013 09:50:41 +0200 Subject: [PATCH] Release 0.1.0 --- EnhancedListView/build.gradle | 65 ++++++++++++++++++- EnhancedListView/src/main/AndroidManifest.xml | 2 +- .../android/listview/EnhancedListView.java | 4 +- EnhancedListViewDemo/build.gradle | 2 +- .../src/main/res/layout/list_item.xml | 37 ++++++----- .../src/main/res/values/strings.xml | 2 +- 6 files changed, 91 insertions(+), 21 deletions(-) diff --git a/EnhancedListView/build.gradle b/EnhancedListView/build.gradle index b2ed781..105e7c9 100644 --- a/EnhancedListView/build.gradle +++ b/EnhancedListView/build.gradle @@ -19,10 +19,73 @@ dependencies { android { compileSdkVersion 18 - buildToolsVersion "18.0.1" + buildToolsVersion "18.1" defaultConfig { minSdkVersion 8 targetSdkVersion 18 } } + +apply plugin: 'maven' +apply plugin: 'signing' + +version = "0.1.0" +group = "de.timroes.android" + +configurations { + archives { + extendsFrom configurations.default + } +} + +signing { + required { has("release") && gradle.taskGraph.hasTask("uploadArchives") } + sign configurations.archives +} + +uploadArchives { + + configuration = configurations.archives + repositories.mavenDeployer { + + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + + repository(url: sonatypeRepo) { + authentication(userName: sonatypeUsername, password: sonatypePassword ) + } + + pom.project { + + name 'EnhancedListView' + packaging 'aar' + description 'ListView with enhanced features for Android' + url 'https://github.com/timroes/EnhancedListView' + + scm { + url 'scm:git@github.com:timroes/EnhancedListView.git' + connection 'scm:git@github.com:timroes/EnhancedListView.git' + developerConnection 'scm:git@github.com:timroes/EnhancedListView.git' + } + + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution 'repo' + } + } + + developers { + developer { + id 'timroes' + name 'Tim Roes' + email 'mail@timroes.de' + } + } + + } + + } + +} \ No newline at end of file diff --git a/EnhancedListView/src/main/AndroidManifest.xml b/EnhancedListView/src/main/AndroidManifest.xml index c867a83..1201a7c 100644 --- a/EnhancedListView/src/main/AndroidManifest.xml +++ b/EnhancedListView/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionName="0.1.0"> diff --git a/EnhancedListView/src/main/java/de/timroes/android/listview/EnhancedListView.java b/EnhancedListView/src/main/java/de/timroes/android/listview/EnhancedListView.java index bea4872..c3207cf 100644 --- a/EnhancedListView/src/main/java/de/timroes/android/listview/EnhancedListView.java +++ b/EnhancedListView/src/main/java/de/timroes/android/listview/EnhancedListView.java @@ -32,6 +32,8 @@ import java.util.TreeSet; /** + * A {@link android.widget.ListView} offering enhanced features like Swipe To Dismiss and an + * undo functionality. See the documentation on GitHub for more information. * * @author Tim Roes */ @@ -523,7 +525,7 @@ public void delete(int position) { if(position < 0 || position >= getCount()) { throw new IndexOutOfBoundsException(String.format("Tried to delete item %d. #items in list: %d", position, getCount())); } - View childView = getChildAt(position); + View childView = getChildAt(position - getFirstVisiblePosition()); View view = null; if(mSwipingLayout > 0) { view = childView.findViewById(mSwipingLayout); diff --git a/EnhancedListViewDemo/build.gradle b/EnhancedListViewDemo/build.gradle index c572f9e..21120e5 100644 --- a/EnhancedListViewDemo/build.gradle +++ b/EnhancedListViewDemo/build.gradle @@ -14,7 +14,7 @@ repositories { android { compileSdkVersion 18 - buildToolsVersion "18.0.1" + buildToolsVersion "18.1" defaultConfig { minSdkVersion 8 diff --git a/EnhancedListViewDemo/src/main/res/layout/list_item.xml b/EnhancedListViewDemo/src/main/res/layout/list_item.xml index 2ef0930..020e67f 100644 --- a/EnhancedListViewDemo/src/main/res/layout/list_item.xml +++ b/EnhancedListViewDemo/src/main/res/layout/list_item.xml @@ -1,6 +1,7 @@ - - - - + android:layout_width="match_parent" + android:layout_height="match_parent"> + + + + \ No newline at end of file diff --git a/EnhancedListViewDemo/src/main/res/values/strings.xml b/EnhancedListViewDemo/src/main/res/values/strings.xml index c181d59..14693b1 100644 --- a/EnhancedListViewDemo/src/main/res/values/strings.xml +++ b/EnhancedListViewDemo/src/main/res/values/strings.xml @@ -14,7 +14,7 @@ General Swipe to Dismiss Enabled - Don\'t swipe whole list item + Sticky part of list item Swipe Layout