Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
26019a1
Prepare next development version.
nhaarman Aug 21, 2014
42bb15b
Drag a list item which is really pointed
tyfkda Sep 21, 2014
79b6b9d
Return a correct child count for StickyListHeadersListViewWrapper; Un…
harri35 Oct 13, 2014
4d5e28d
Bring project versions up to date
nhaarman Oct 30, 2014
d19762c
Fixed example app in Lollipop
nhaarman Oct 30, 2014
96bf847
Renamed SwipeUndoTouchListener.dimissPending() -> SwipeUndoTouchListe…
nhaarman Oct 30, 2014
c9becac
Made StickyListHeadersListViewWrapper.unwrapItemView(View) private.
nhaarman Oct 30, 2014
f9cf6a9
Merge branch 'pr/n275_harri35' into dev
nhaarman Oct 30, 2014
df50290
Don't use raw values at all.
nhaarman Oct 30, 2014
e9cc4e7
Merge branch 'pr/n264_tyfkda' into dev
nhaarman Oct 30, 2014
811667f
Updated gradle build version
nhaarman Nov 1, 2014
56d0769
SwipeTouchListener.dismiss(int) now immediately dismisses the item wi…
nhaarman Nov 1, 2014
5107c02
Renamed SwipeTouchListener.fling(int) to SwipeTouchListener.swipe(int).
nhaarman Nov 1, 2014
328a28c
Throw a more explaining exception when trying to swipe a header or fo…
nhaarman Nov 1, 2014
b0e86e1
Also throw the exception in getPrimaryView.
nhaarman Nov 1, 2014
074ebd4
Update build-tools to 21.1
WonderCsabo Nov 1, 2014
3807361
Added setAbsListView to ExpandableListItemAdapter
WonderCsabo Nov 1, 2014
0eea909
Update maven config
WonderCsabo Nov 1, 2014
931f33d
Removed .project .classpath
WonderCsabo Nov 1, 2014
c575d55
Merge pull request #285 from WonderCsabo/updateMaven
nhaarman Nov 1, 2014
7b788cd
Use NineOldAndroids library to make Drag and Drop and the example app…
ertanden Nov 1, 2014
99df6f0
Fixed Travis build - do not run tests on CI.
nhaarman Nov 4, 2014
1133b5b
Removed secure elements from .travis.yml to move them to the Environm…
nhaarman Nov 4, 2014
c935b70
Merge pull request #284 from WonderCsabo/setAbsListViewInExpandableLi…
nhaarman Nov 5, 2014
b585207
Fixed shuffling of items when dragged.
nhaarman Nov 5, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*/.project
*/.classpath
.settings/org.eclipse.jdt.core.prefs
*/.settings/org.eclipse.jdt.core.prefs
*/.settings
**/bin/*
**/target/*
**/gen/*
Expand Down
41 changes: 13 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,29 @@
language: android
jdk: oraclejdk7

android:
components:
- build-tools-21.1.0
- android-21
- extra-android-m2repository
- extra-android-support
- extra-google-m2repository

env:
matrix:
- ANDROID_TARGET=15 LINT=false MAVEN=false
- ANDROID_TARGET=16 LINT=false MAVEN=false
- ANDROID_TARGET=17 LINT=false MAVEN=false
- ANDROID_TARGET=18 LINT=false MAVEN=false
- ANDROID_TARGET=19 LINT=true MAVEN=true
global:
- TERM=dumb
- COMPONENTS=build-tools-20.0.0,android-20,extra-android-m2repository,extra-android-support,extra-google-m2repository
- LICENSES="android-sdk-license-5be876d5|android-sdk-preview-license-52d11cd2"
- secure: Fo/btrr+HpwmQL6TNxZuh/TWRMouz9Z1RCo77tf3crNP4OHq9EAkduLc/b4i6HCGFM3fyfJ7AM5XMa3OQvXfF84FQnew7NGE6zB/CKFfKBIZyzntvrDg4VqWEAHzunT6+eBnGtxtrAE0bBo4MmUCklXWP8j5UAyjfFpSeJdOywY=
- secure: s56rqSiiwX40CQWeHTcbyVLRtwLP/pcHWqaVCKuXtZ/m9SgRI/SHp9o8ITI2dzr3syEeAkHjkJOkHQSpH0bHi1xKY4M9ODcCugwv+yDEELw1qmI6Cvwjvj1cKsG7ebt39OnCkz+TqhtI/iOEkxq7mTizFjNIxIImMkKxeQwcFgE=
- secure: UOQ9keLBuJw5Ed/eYtXarwoGuJSSvgGTob+D9aU8hVRoTUXpSDuHtk9TdS4MNXQ33jgFZEsmkpwRmV54XVEGe6xcri1uys1JDzjc+SqTEgbEh1QktfIWGvOx49YZtI2Zei0324S2qXRtemKMw4N+1XRRMP/IXEogr26Xi5JLVcI=

before_install:
- curl -3L https://raw.github.com/embarkmobile/android-sdk-installer/version-2/android-sdk-installer | bash /dev/stdin --install=$COMPONENTS,android-$ANDROID_TARGET,sys-img-armeabi-v7a-android-$ANDROID_TARGET --accept=$LICENSES && source ~/.android-sdk-installer/env
- curl -3L -o wait_for_emulator https://github.com/embarkmobile/android-sdk-installer/raw/version-2/wait_for_emulator
- sudo chmod +x wait_for_emulator

# Start the emulator
- echo no | android create avd --force -n test -t android-$ANDROID_TARGET --abi armeabi-v7a
- emulator -avd test -no-audio -no-window &

before_script:
# Downloads gradle stuff
- gradle
- ./wait_for_emulator

install:
- true

before_script:
- sudo chmod +x gradlew

script:
- gradle connectedCheck --info
- if [[ $LINT == 'true' ]]; then gradle lint ; fi
- ./gradlew lint

after_success:
- if [[ $MAVEN == 'true' && $TRAVIS_BRANCH == 'dev' && $TRAVIS_PULL_REQUEST == 'false' ]]; then gradle :lib-core:uploadArchives :lib-manipulation:uploadArchives :lib-core-slh:uploadArchives -PnexusUsername="${nexusUsername}" -PnexusPassword="${nexusPassword}" ; fi
- if [[ $TRAVIS_BRANCH == 'dev' && $TRAVIS_PULL_REQUEST == 'false' ]]; then ./gradlew :lib-core:uploadArchives :lib-manipulation:uploadArchives :lib-core-slh:uploadArchives -PnexusUsername="${nexusUsername}" -PnexusPassword="${nexusPassword}" ; fi

notifications:
email: false
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ I'm happy to view and accept pull requests. However, it is important to follow t

* Branch names should start with either `feature_` or `bugfix_`. If there is an open issue, include its number, like `bugfix_123`.
* **Do not** include in your commit message anything related to automatic issue closing, such as `Fixes issue 123`. We'll do that when merging your pull request.
* **Do not** put any `@author` comment. Git keeps track of all your changes and `@author` does more harm than good.
* **Do not** put any `@author` comments. Git keeps track of all your changes and `@author` does more harm than good.
* **Do not** issue a pull request into the `master` branch.
* Try to keep the diff as small as possible. For example, be aware of auto formatting.
* All files should have the Apache 2 License header.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
classpath 'com.android.tools.build:gradle:0.14.0'
classpath 'org.ajoberstar:gradle-git:0.9.0'
}
}
Expand Down
39 changes: 0 additions & 39 deletions example/.classpath

This file was deleted.

39 changes: 0 additions & 39 deletions example/.project

This file was deleted.

14 changes: 7 additions & 7 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
apply plugin: 'com.android.application'

dependencies {
compile 'com.android.support:support-annotations:20.0.0'
compile 'com.android.support:support-annotations:21.0.0'

compile 'com.android.support:support-v4:20.0.0'
compile 'com.android.support:support-v4:21.0.0'
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'se.emilsjolander:stickylistheaders:2.5.0'

compile project(':lib-core')
Expand All @@ -28,13 +29,12 @@ dependencies {
}

android {
compileSdkVersion 20
buildToolsVersion '20.0.0'
compileSdkVersion 21
buildToolsVersion '21.1'

defaultConfig {
minSdkVersion 14
//noinspection OldTargetApi
targetSdkVersion 20
minSdkVersion 8
targetSdkVersion 21
versionName project.VERSION_NAME
versionCode Integer.parseInt(new Date().format('yyyyMMddHH'))
}
Expand Down
2 changes: 1 addition & 1 deletion example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.nhaarman.listviewanimations</groupId>
<artifactId>parent</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.1.1-SNAPSHOT</version>
</parent>

<artifactId>example</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion example/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<uses-permission android:name="com.android.vending.BILLING" />

<uses-sdk
android:minSdkVersion="14"
android:minSdkVersion="8"
android:targetSdkVersion="20"
tools:ignore="GradleOverrides,OldTargetApi" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
package com.haarman.listviewanimations;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.MenuItem;
import android.view.WindowManager;

public class BaseActivity extends Activity {
public class BaseActivity extends ActionBarActivity {

@SuppressLint("InlinedApi")
@Override
Expand All @@ -33,8 +33,8 @@ protected void onCreate(final Bundle savedInstanceState) {
}
super.onCreate(savedInstanceState);

assert getActionBar() != null;
getActionBar().setDisplayHomeAsUpEnabled(true);
assert getSupportActionBar() != null;
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
import android.content.Intent;
import android.content.IntentSender.SendIntentException;
import android.content.ServiceConnection;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
Expand All @@ -43,7 +46,9 @@
import org.json.JSONException;
import org.json.JSONObject;

public class MainActivity extends Activity {
import java.util.List;

public class MainActivity extends ActionBarActivity {

private static final String URL_GITHUB_IO = "http://nhaarman.github.io/ListViewAnimations?ref=app";

Expand All @@ -60,7 +65,30 @@ protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

bindService(new Intent("com.android.vending.billing.InAppBillingService.BIND"), mServiceConn, Context.BIND_AUTO_CREATE);
Intent iapIntent = getExplicitIapIntent();
if(iapIntent != null) {
bindService(iapIntent, mServiceConn, Context.BIND_AUTO_CREATE);
}
}

/* http://stackoverflow.com/a/26318757/675383 */
private Intent getExplicitIapIntent() {
PackageManager pm = getPackageManager();
Intent implicitIntent = new Intent("com.android.vending.billing.InAppBillingService.BIND");
List<ResolveInfo> resolveInfos = pm.queryIntentServices(implicitIntent, 0);

// Is somebody else trying to intercept our IAP call?
if (resolveInfos == null || resolveInfos.size() != 1) {
return null;
}

ResolveInfo serviceInfo = resolveInfos.get(0);
String packageName = serviceInfo.serviceInfo.packageName;
String className = serviceInfo.serviceInfo.name;
ComponentName component = new ComponentName(packageName, className);
Intent iapIntent = new Intent();
iapIntent.setComponent(component);
return iapIntent;
}

@Override
Expand Down Expand Up @@ -125,7 +153,9 @@ public void onSLHClicked(final View view) {
@Override
public void onDestroy() {
super.onDestroy();
unbindService(mServiceConn);
if(mService != null) {
unbindService(mServiceConn);
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.haarman.listviewanimations;

import android.os.Build;
import android.os.Bundle;

import com.nhaarman.listviewanimations.appearance.StickyListHeadersAdapterDecorator;
Expand All @@ -32,7 +33,9 @@ protected void onCreate(final Bundle savedInstanceState) {
setContentView(R.layout.activity_stickylistheaders);

StickyListHeadersListView listView = (StickyListHeadersListView) findViewById(R.id.activity_stickylistheaders_listview);
listView.setFitsSystemWindows(true);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
listView.setFitsSystemWindows(true);
}

MyListAdapter adapter = new MyListAdapter(this);
AlphaInAnimationAdapter animationAdapter = new AlphaInAnimationAdapter(adapter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
package com.haarman.listviewanimations.appearance;

import android.app.ActionBar;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down Expand Up @@ -56,11 +56,11 @@ protected void onCreate(final Bundle savedInstanceState) {
setAlphaAdapter();

assert getActionBar() != null;
getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
getActionBar().setDisplayShowTitleEnabled(false);
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
getSupportActionBar().setDisplayShowTitleEnabled(false);

SpinnerAdapter animSelectionAdapter = new AnimSelectionAdapter(this);
getActionBar().setListNavigationCallbacks(animSelectionAdapter, this);
getSupportActionBar().setListNavigationCallbacks(animSelectionAdapter, this);
}

private void setAlphaAdapter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected void onCreate(final Bundle savedInstanceState) {

gridView.setAdapter(swingBottomInAnimationAdapter);

assert getActionBar() != null;
getActionBar().setDisplayHomeAsUpEnabled(true);
assert getSupportActionBar() != null;
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
import com.haarman.listviewanimations.MyListActivity;
import com.haarman.listviewanimations.R;
import com.nhaarman.listviewanimations.ArrayAdapter;
import com.nhaarman.listviewanimations.appearance.simple.AlphaInAnimationAdapter;
import com.nhaarman.listviewanimations.itemmanipulation.DynamicListView;
import com.nhaarman.listviewanimations.itemmanipulation.dragdrop.OnItemMovedListener;
import com.nhaarman.listviewanimations.itemmanipulation.dragdrop.TouchViewDraggableManager;
import com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.OnDismissCallback;
import com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.undo.SimpleSwipeUndoAdapter;
import com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.undo.UndoAdapter;
import com.nhaarman.listviewanimations.appearance.simple.AlphaInAnimationAdapter;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.haarman.listviewanimations.util;

import android.graphics.Bitmap;
import android.util.LruCache;
import android.support.v4.util.LruCache;

public class BitmapCache extends LruCache<Integer, Bitmap> {

Expand Down
Loading