diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3791adf..655244e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Aug 23 19:41:13 AEST 2016 +#Fri May 12 22:39:21 AEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip diff --git a/reddinator/build.gradle b/reddinator/build.gradle index 2189064..121192c 100644 --- a/reddinator/build.gradle +++ b/reddinator/build.gradle @@ -49,8 +49,8 @@ android { dependencies { - compile 'com.android.support:support-v4:25.1.0' - compile 'com.android.support:appcompat-v7:25.1.0' + compile 'com.android.support:support-v4:25.3.1' + compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.squareup.okhttp3:okhttp:3.4.1' compile 'org.apache.commons:commons-lang3:3.4' compile 'com.joanzapata.android:android-iconify:1.0.11' @@ -60,5 +60,5 @@ dependencies { compile 'com.sothree.slidinguppanel:library:3.3.1' compile 'com.gu:option:1.3' compile 'net.rdrei.android.dirchooser:library:3.2@aar' - compile 'com.android.support:support-vector-drawable:25.1.0' + compile 'com.android.support:support-vector-drawable:25.3.1' } diff --git a/reddinator/reddinator-reddinator.iml b/reddinator/reddinator-reddinator.iml index c8e96f3..4f574c2 100644 --- a/reddinator/reddinator-reddinator.iml +++ b/reddinator/reddinator-reddinator.iml @@ -106,25 +106,25 @@ - - - - - + + + - - - - - + + + + + + + \ No newline at end of file diff --git a/reddinator/reddinator-release.apk b/reddinator/reddinator-release.apk index 664e5bd..044a043 100644 Binary files a/reddinator/reddinator-release.apk and b/reddinator/reddinator-release.apk differ diff --git a/reddinator/src/main/AndroidManifest.xml b/reddinator/src/main/AndroidManifest.xml index 1df9efa..4cc879b 100644 --- a/reddinator/src/main/AndroidManifest.xml +++ b/reddinator/src/main/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="64" + android:versionName="3.21.4"> diff --git a/reddinator/src/main/java/au/com/wallaceit/reddinator/activity/SubredditSelectActivity.java b/reddinator/src/main/java/au/com/wallaceit/reddinator/activity/SubredditSelectActivity.java index f30b764..4612d2b 100644 --- a/reddinator/src/main/java/au/com/wallaceit/reddinator/activity/SubredditSelectActivity.java +++ b/reddinator/src/main/java/au/com/wallaceit/reddinator/activity/SubredditSelectActivity.java @@ -419,6 +419,7 @@ public void onBackPressed() { RemoteViews views = new RemoteViews(getPackageName(), R.layout.widget); views.setViewVisibility(R.id.srloader, View.VISIBLE); views.setViewVisibility(R.id.erroricon, View.INVISIBLE); + views.setRelativeScrollPosition(R.id.adapterview, 0); // Reset scroll offset for API >= 25 // bypass the cached entrys only if the sorting preference has changed if (needsFeedUpdate) { global.setBypassCache(true); diff --git a/reddinator/src/main/java/au/com/wallaceit/reddinator/service/WidgetCommon.java b/reddinator/src/main/java/au/com/wallaceit/reddinator/service/WidgetCommon.java index dd57138..a42addb 100644 --- a/reddinator/src/main/java/au/com/wallaceit/reddinator/service/WidgetCommon.java +++ b/reddinator/src/main/java/au/com/wallaceit/reddinator/service/WidgetCommon.java @@ -91,6 +91,8 @@ public static void showLoaderAndUpdate(Context context, int widgetId, boolean lo views.setViewVisibility(R.id.srloader, View.VISIBLE); views.setViewVisibility(R.id.erroricon, View.INVISIBLE); // make sure we hide the error icon views.setTextViewText(R.id.subreddittxt, global.getSubredditManager().getCurrentFeedName(widgetId)); + // In Android platform >= v25, the last relative scroll position is used, so it must be reset before each call. + views.setRelativeScrollPosition(R.id.adapterview, 0); // load more text if (loadmore) { views.setTextViewText(R.id.loadmoretxt, context.getResources().getString(R.string.loading)); @@ -125,6 +127,7 @@ public static void showLoaderAndRefreshViews(Context context, int widgetId){ RemoteViews views = new RemoteViews(context.getPackageName(), getWidgetLayoutId(providerClass)); views.setViewVisibility(R.id.srloader, View.VISIBLE); views.setViewVisibility(R.id.erroricon, View.INVISIBLE); // make sure we hide the error icon + views.setRelativeScrollPosition(R.id.adapterview, 0); // Reset scroll offset for API >= 25 // update view mgr.partiallyUpdateAppWidget(widgetId, views); } @@ -137,6 +140,7 @@ public static void hideLoaderAndRefreshViews(Context context, int widgetId, bool RemoteViews views = new RemoteViews(context.getPackageName(), getWidgetLayoutId(providerClass)); views.setViewVisibility(R.id.srloader, View.GONE); views.setViewVisibility(R.id.erroricon, (showerror ? View.VISIBLE : View.GONE)); // make sure we hide the error icon + views.setRelativeScrollPosition(R.id.adapterview, 0); // Reset scroll offset for API >= 25 // update view global.setRefreshView(); mgr.notifyAppWidgetViewDataChanged(widgetId, R.id.adapterview); diff --git a/reddinator/src/main/java/au/com/wallaceit/reddinator/service/WidgetService.java b/reddinator/src/main/java/au/com/wallaceit/reddinator/service/WidgetService.java index 9f40837..d7fa8c4 100644 --- a/reddinator/src/main/java/au/com/wallaceit/reddinator/service/WidgetService.java +++ b/reddinator/src/main/java/au/com/wallaceit/reddinator/service/WidgetService.java @@ -573,7 +573,8 @@ private void hideWidgetLoader(boolean goToTopOfList, boolean showError, final St views.setViewVisibility(R.id.srloader, View.INVISIBLE); // go to the top of the list view if (providerClass==WidgetCommon.WIDGET_CLASS_LIST && goToTopOfList) { - views.setScrollPosition(R.id.adapterview, 0); + // API >= 25: Relative scroll position must be used since this value is persisted for the next update & only a relative value can be reset to keep the current position. + views.setRelativeScrollPosition(R.id.adapterview, -1000000); } if (showError) { views.setViewVisibility(R.id.erroricon, View.VISIBLE); diff --git a/reddinator/src/main/res/xml/changelog_master.xml b/reddinator/src/main/res/xml/changelog_master.xml index a1818bc..72f61cd 100644 --- a/reddinator/src/main/res/xml/changelog_master.xml +++ b/reddinator/src/main/res/xml/changelog_master.xml @@ -1,5 +1,8 @@ + + Fixed Android API >= 25 widget listview scrolling bug. + Enabled gfycat links in image preview. Hid Reddit app promo banner.