Skip to content

Commit

Permalink
improve scrolling performance
Browse files Browse the repository at this point in the history
  • Loading branch information
klinker24 committed Mar 5, 2017
1 parent 907669f commit 265c82f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### v1.2.2

* Improve scrolling on the `DragDismissActivity` by removing the `AppBarLayout` and handing its functionality myself

### v1.2.1

* Don't have `Activity#onCreate` as `final`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To include it in your project, add this to your module's `build.gradle` file:
```groovy
dependencies {
...
compile 'com.klinkerapps:drag-dismiss-activity:1.2.1'
compile 'com.klinkerapps:drag-dismiss-activity:1.2.2'
}
```

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ MIN_SDK=15
TARGET_SDK=25
COMPILE_SDK=25

VERSION_NAME=1.2.1
VERSION_NAME=1.2.2
VERSION_CODE=1
GROUP=com.klinkerapps

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import android.animation.AnimatorListenerAdapter;
import android.animation.ArgbEvaluator;
import android.animation.ValueAnimator;
import android.app.Activity;
import android.os.Handler;
import android.support.v4.widget.NestedScrollView;
import android.support.v7.widget.LinearLayoutManager;
Expand All @@ -32,6 +33,7 @@
import android.view.animation.Interpolator;

import xyz.klinker.android.drag_dismiss.R;
import xyz.klinker.android.drag_dismiss.util.ColorUtils;

/**
* Scroll listener for interacting with the toolbar when the recyclerview scrolls. This includes
Expand Down
27 changes: 10 additions & 17 deletions library/src/main/res/layout/dragdismiss_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,22 @@
android:visibility="gone"
android:indeterminate="true"/>

<android.support.v7.widget.Toolbar
android:id="@+id/dragdismiss_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_marginTop="24dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:background="@color/dragdismiss_toolbarBackground"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_scrollFlags="" />

<View
android:layout_width="match_parent"
android:layout_height="24dp"
android:id="@+id/dragdismiss_status_bar"
android:background="@color/dragdismiss_toolbarBackground"/>

<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:background="@android:color/transparent"
android:layout_marginTop="24dp"
app:elevation="0dp">

<android.support.v7.widget.Toolbar
android:id="@+id/dragdismiss_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/dragdismiss_toolbarBackground"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_scrollFlags="" />

</android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>
</xyz.klinker.android.drag_dismiss.view.ElasticDragDismissFrameLayout>

Expand Down

0 comments on commit 265c82f

Please sign in to comment.