Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Commit

Permalink
Release 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
timroes committed Sep 20, 2013
1 parent 4966456 commit 95f57ce
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 21 deletions.
65 changes: 64 additions & 1 deletion EnhancedListView/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]:timroes/EnhancedListView.git'
connection 'scm:[email protected]:timroes/EnhancedListView.git'
developerConnection 'scm:[email protected]: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 '[email protected]'
}
}

}

}

}
2 changes: 1 addition & 1 deletion EnhancedListView/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.timroes.android.listview"
android:versionCode="1"
android:versionName="1.0">
android:versionName="0.1.0">

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*/
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion EnhancedListViewDemo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repositories {

android {
compileSdkVersion 18
buildToolsVersion "18.0.1"
buildToolsVersion "18.1"

defaultConfig {
minSdkVersion 8
Expand Down
37 changes: 21 additions & 16 deletions EnhancedListViewDemo/src/main/res/layout/list_item.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:descendantFocusability="blocksDescendants"
android:layout_height="48dp">
<TextView
android:paddingLeft="16dp"
Expand All @@ -11,24 +12,28 @@
android:text="@string/list_item_background"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<RelativeLayout android:id="@+id/swiping_layout"
android:paddingLeft="16dp"
android:paddingRight="16dp"
<FrameLayout android:id="@+id/swiping_layout"
android:background="@android:color/white"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView android:id="@+id/text"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:textAppearance="?android:textAppearanceLarge"
android:background="@android:color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ImageButton android:id="@+id/action_delete"
<RelativeLayout
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:background="?selectableItemBackground"
android:layout_alignParentRight="true"
android:src="@drawable/ic_action_delete"
android:layout_width="48dp"
android:layout_height="match_parent" />
</RelativeLayout>
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView android:id="@+id/text"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:textAppearance="?android:textAppearanceLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ImageButton android:id="@+id/action_delete"
android:background="?selectableItemBackground"
android:layout_alignParentRight="true"
android:src="@drawable/ic_action_delete"
android:layout_width="48dp"
android:layout_height="match_parent" />
</RelativeLayout>
</FrameLayout>
</FrameLayout>
2 changes: 1 addition & 1 deletion EnhancedListViewDemo/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<string name="pref_general">General</string>
<string name="pref_swipe_to_dismiss">Swipe to Dismiss</string>
<string name="enable">Enabled</string>
<string name="list_item_background">Don\'t swipe whole list item</string>
<string name="list_item_background">Sticky part of list item</string>
<string name="pref_swipelayout">Swipe Layout</string>

</resources>

0 comments on commit 95f57ce

Please sign in to comment.