Browse Source

migrate from android support library to androidx
set target sdk 28

Andrew Dolgov 3 months ago
parent
commit
db32a68471
50 changed files with 177 additions and 204 deletions
  1. 2 0
      gradle.properties
  2. 7 8
      org.fox.ttrss/build.gradle
  3. 2 2
      org.fox.ttrss/src/main/AndroidManifest.xml
  4. 0 39
      org.fox.ttrss/src/main/java/android/support/v4/app/ClassloaderWorkaroundFragmentStatePagerAdapter.java
  5. 9 17
      org.fox.ttrss/src/main/java/org/fox/ttrss/ApiLoader.java
  6. 2 2
      org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java
  7. 1 1
      org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java
  8. 6 6
      org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java
  9. 2 3
      org.fox.ttrss/src/main/java/org/fox/ttrss/BaseFeedlistFragment.java
  10. 8 8
      org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java
  11. 2 2
      org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java
  12. 2 1
      org.fox.ttrss/src/main/java/org/fox/ttrss/DummyFragment.java
  13. 3 3
      org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java
  14. 3 3
      org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java
  15. 6 6
      org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java
  16. 2 2
      org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryImageFragment.java
  17. 2 2
      org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryVideoFragment.java
  18. 11 11
      org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java
  19. 2 2
      org.fox.ttrss/src/main/java/org/fox/ttrss/LogcatActivity.java
  20. 5 5
      org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java
  21. 3 2
      org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java
  22. 2 1
      org.fox.ttrss/src/main/java/org/fox/ttrss/PreferencesActivity.java
  23. 2 1
      org.fox.ttrss/src/main/java/org/fox/ttrss/StateSavedFragment.java
  24. 1 1
      org.fox.ttrss/src/main/java/org/fox/ttrss/YoutubePlayerActivity.java
  25. 4 2
      org.fox.ttrss/src/main/java/org/fox/ttrss/glide/WrappingTarget.java
  26. 4 3
      org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java
  27. 3 2
      org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java
  28. 5 4
      org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticlePager.java
  29. 8 7
      org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineDetailActivity.java
  30. 2 1
      org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineDownloadService.java
  31. 9 8
      org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedCategoriesFragment.java
  32. 10 9
      org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java
  33. 6 6
      org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java
  34. 8 7
      org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineMasterActivity.java
  35. 2 1
      org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineUploadService.java
  36. 3 2
      org.fox.ttrss/src/main/java/org/fox/ttrss/util/ContextMenuRecyclerView.java
  37. 2 1
      org.fox.ttrss/src/main/java/org/fox/ttrss/util/HeaderViewRecyclerAdapter.java
  38. 2 1
      org.fox.ttrss/src/main/java/org/fox/ttrss/util/ImageCacheService.java
  39. 4 3
      org.fox.ttrss/src/main/java/org/fox/ttrss/util/ScrimInsetsFrameLayout.java
  40. 3 2
      org.fox.ttrss/src/main/java/org/fox/ttrss/widget/WidgetUpdateService.java
  41. 2 2
      org.fox.ttrss/src/main/res/layout/activity_logcat.xml
  42. 2 2
      org.fox.ttrss/src/main/res/layout/activity_master.xml
  43. 2 2
      org.fox.ttrss/src/main/res/layout/article_pager.xml
  44. 1 1
      org.fox.ttrss/src/main/res/layout/feeds_row_toggle.xml
  45. 2 2
      org.fox.ttrss/src/main/res/layout/fragment_cats.xml
  46. 2 2
      org.fox.ttrss/src/main/res/layout/fragment_feeds.xml
  47. 2 2
      org.fox.ttrss/src/main/res/layout/fragment_headlines.xml
  48. 2 2
      org.fox.ttrss/src/main/res/layout/fragment_headlines_offline.xml
  49. 1 1
      org.fox.ttrss/src/main/res/layout/toolbar.xml
  50. 1 1
      tt-rss-android.iml

+ 2 - 0
gradle.properties

@@ -0,0 +1,2 @@
+android.enableJetifier=true
+android.useAndroidX=true

+ 7 - 8
org.fox.ttrss/build.gradle

@@ -1,7 +1,7 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 27
+    compileSdkVersion 28
     buildToolsVersion "28.0.3"
 
     defaultConfig {
@@ -9,7 +9,7 @@ android {
         buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"
         buildConfigField "boolean", "ENABLE_TRIAL", "true"
         minSdkVersion 16
-        targetSdkVersion 27 // we're not targeting SDK 25 because of this: https://issuetracker.google.com/issues/37103380#makechanges
+        targetSdkVersion 28 // we're not targeting SDK 25 because of this: https://issuetracker.google.com/issues/37103380#makechanges
     }
 
     signingConfigs {
@@ -56,12 +56,11 @@ dependencies {
     implementation 'com.bogdwellers:pinchtozoom:0.1'
     implementation 'com.github.bumptech.glide:glide:3.8.0'
     implementation 'jp.wasabeef:glide-transformations:2.0.2'
-    implementation 'com.android.support:recyclerview-v7:27.1.1'
-    implementation 'com.android.support:cardview-v7:27.1.1'
-    implementation 'com.android.support:support-v4:27.1.1'
-    implementation 'com.android.support:appcompat-v7:27.1.1'
-    implementation 'com.android.support:customtabs:27.1.1'
-    implementation 'com.android.support:design:27.1.1'
+    implementation 'androidx.recyclerview:recyclerview:1.0.0'
+    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
+    implementation 'androidx.appcompat:appcompat:1.0.2'
+    implementation 'androidx.browser:browser:1.0.0'
+    implementation 'com.google.android.material:material:1.0.0'
     implementation 'com.google.code.gson:gson:2.8.2'
     implementation 'com.shamanland:fab:0.0.8'
     implementation 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:[email protected]'

+ 2 - 2
org.fox.ttrss/src/main/AndroidManifest.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="org.fox.ttrss"
-    android:versionCode="494"
-    android:versionName="1.260">
+    android:versionCode="495"
+    android:versionName="1.261">
 
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

+ 0 - 39
org.fox.ttrss/src/main/java/android/support/v4/app/ClassloaderWorkaroundFragmentStatePagerAdapter.java

@@ -1,39 +0,0 @@
-package android.support.v4.app;
-
-// http://code.google.com/p/android/issues/detail?id=37484
-// Thanks for your amazing code quality, Google.	
-
-import android.os.Bundle;
-import android.view.ViewGroup;
-
-public class ClassloaderWorkaroundFragmentStatePagerAdapter extends
-		FragmentStatePagerAdapter {
-
-	public ClassloaderWorkaroundFragmentStatePagerAdapter(FragmentManager fm) {
-		super(fm);
-		// TODO Auto-generated constructor stub
-	}
-
-	@Override
-	public Fragment getItem(int arg0) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public Object instantiateItem(ViewGroup container, int position) {
-		Fragment f = (Fragment) super.instantiateItem(container, position);
-		Bundle savedFragmentState = f.mSavedFragmentState;
-		if (savedFragmentState != null) {
-			savedFragmentState.setClassLoader(f.getClass().getClassLoader());
-		}
-		return f;
-	}
-	
-	@Override
-	public int getCount() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-}

+ 9 - 17
org.fox.ttrss/src/main/java/org/fox/ttrss/ApiLoader.java

@@ -5,7 +5,6 @@ import android.content.SharedPreferences;
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
 import android.preference.PreferenceManager;
-import android.support.v4.content.AsyncTaskLoader;
 import android.util.Base64;
 import android.util.Log;
 
@@ -20,11 +19,13 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
 import java.net.HttpURLConnection;
 import java.net.URL;
+import java.nio.charset.StandardCharsets;
 import java.util.HashMap;
 
+import androidx.loader.content.AsyncTaskLoader;
+
 public class ApiLoader extends AsyncTaskLoader<JsonElement> {
 	private final String TAG = this.getClass().getSimpleName();
 
@@ -99,15 +100,9 @@ public class ApiLoader extends AsyncTaskLoader<JsonElement> {
 		String requestStr = gson.toJson(new HashMap<>(m_params));
 		byte[] postData = null;
 
-		try {
-			postData = requestStr.getBytes("UTF-8");
-		} catch (UnsupportedEncodingException e) {
-			m_lastError = ApiError.OTHER_ERROR;
-			e.printStackTrace();
-			return null;
-		}
+        postData = requestStr.getBytes(StandardCharsets.UTF_8);
 
-		if (m_transportDebugging) Log.d(TAG, ">>> (" + requestStr + ") " + m_api);
+        if (m_transportDebugging) Log.d(TAG, ">>> (" + requestStr + ") " + m_api);
 
 		URL url;
 
@@ -132,7 +127,7 @@ public class ApiLoader extends AsyncTaskLoader<JsonElement> {
 				if (m_transportDebugging) Log.d(TAG, "Using HTTP Basic authentication.");
 
 				conn.setRequestProperty("Authorization", "Basic " +
-						Base64.encodeToString((httpLogin + ":" + httpPassword).getBytes("UTF-8"), Base64.NO_WRAP));
+						Base64.encodeToString((httpLogin + ":" + httpPassword).getBytes(StandardCharsets.UTF_8), Base64.NO_WRAP));
 			}
 
 			conn.setDoInput(true);
@@ -151,7 +146,7 @@ public class ApiLoader extends AsyncTaskLoader<JsonElement> {
 		    switch (m_responseCode) {
 			case HttpURLConnection.HTTP_OK:
 				StringBuffer response = new StringBuffer();
-				InputStreamReader in = new InputStreamReader(conn.getInputStream(), "UTF-8");
+				InputStreamReader in = new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8);
 				char[] buf = new char[256];
 				int read = 0;
 
@@ -249,9 +244,6 @@ public class ApiLoader extends AsyncTaskLoader<JsonElement> {
 	    
 	    // if no network is available networkInfo will be null
 	    // otherwise check if we are connected
-	    if (networkInfo != null && networkInfo.isConnected()) {
-	        return true;
-	    }
-	    return false;
-	} 
+        return networkInfo != null && networkInfo.isConnected();
+    }
 }

+ 2 - 2
org.fox.ttrss/src/main/java/org/fox/ttrss/Application.java

@@ -1,8 +1,6 @@
 package org.fox.ttrss;
 
 import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
 
 import com.livefront.bridge.Bridge;
 import com.livefront.bridge.SavedStateHandler;
@@ -10,6 +8,8 @@ import com.livefront.bridge.SavedStateHandler;
 import org.fox.ttrss.types.Article;
 import org.fox.ttrss.types.ArticleList;
 
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
 import icepick.Icepick;
 
 public class Application extends android.app.Application {

+ 1 - 1
org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java

@@ -8,7 +8,6 @@ import android.net.Uri;
 import android.os.Build;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
-import android.support.v7.app.ActionBar;
 import android.text.Html;
 import android.util.Log;
 import android.util.TypedValue;
@@ -41,6 +40,7 @@ import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
+import androidx.appcompat.app.ActionBar;
 import icepick.State;
 
 public class ArticleFragment extends StateSavedFragment  {

+ 6 - 6
org.fox.ttrss/src/main/java/org/fox/ttrss/ArticlePager.java

@@ -8,16 +8,12 @@ import android.os.Bundle;
 import android.os.Handler;
 import android.os.Parcelable;
 import android.preference.PreferenceManager;
-import android.support.design.widget.Snackbar;
-import android.support.v4.app.ClassloaderWorkaroundFragmentStatePagerAdapter;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.view.ViewPager;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 
+import com.google.android.material.snackbar.Snackbar;
 import com.google.gson.JsonElement;
 import com.viewpagerindicator.UnderlinePageIndicator;
 
@@ -28,6 +24,10 @@ import org.fox.ttrss.util.HeadlinesRequest;
 
 import java.util.HashMap;
 
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentStatePagerAdapter;
+import androidx.viewpager.widget.ViewPager;
 import icepick.State;
 
 public class ArticlePager extends StateSavedFragment {
@@ -45,7 +45,7 @@ public class ArticlePager extends StateSavedFragment {
 	private boolean m_refreshInProgress;
 	private boolean m_lazyLoadDisabled;
 
-	private class PagerAdapter extends ClassloaderWorkaroundFragmentStatePagerAdapter {
+	private class PagerAdapter extends FragmentStatePagerAdapter {
 		
 		public PagerAdapter(FragmentManager fm) {
 			super(fm);

+ 2 - 3
org.fox.ttrss/src/main/java/org/fox/ttrss/BaseFeedlistFragment.java

@@ -2,9 +2,6 @@ package org.fox.ttrss;
 
 import android.content.Intent;
 import android.content.SharedPreferences;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.app.ActivityOptionsCompat;
-import android.support.v7.widget.SwitchCompat;
 import android.util.TypedValue;
 import android.view.InflateException;
 import android.view.LayoutInflater;
@@ -19,6 +16,8 @@ import org.fox.ttrss.offline.OfflineActivity;
 import java.net.MalformedURLException;
 import java.net.URL;
 
+import androidx.appcompat.widget.SwitchCompat;
+
 public abstract class BaseFeedlistFragment extends StateSavedFragment {
     abstract public void refresh();
 

+ 8 - 8
org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java

@@ -25,14 +25,6 @@ import android.os.Build;
 import android.os.Bundle;
 import android.os.SystemClock;
 import android.preference.PreferenceManager;
-import android.support.customtabs.CustomTabsCallback;
-import android.support.customtabs.CustomTabsClient;
-import android.support.customtabs.CustomTabsIntent;
-import android.support.customtabs.CustomTabsServiceConnection;
-import android.support.customtabs.CustomTabsSession;
-import android.support.design.widget.Snackbar;
-import android.support.v4.app.JobIntentService;
-import android.support.v7.app.AppCompatActivity;
 import android.text.TextUtils;
 import android.util.Log;
 import android.util.TypedValue;
@@ -41,6 +33,7 @@ import android.view.View;
 import android.widget.CheckBox;
 
 import com.bumptech.glide.Glide;
+import com.google.android.material.snackbar.Snackbar;
 import com.livefront.bridge.Bridge;
 
 import org.fox.ttrss.util.DatabaseHelper;
@@ -54,6 +47,13 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.browser.customtabs.CustomTabsCallback;
+import androidx.browser.customtabs.CustomTabsClient;
+import androidx.browser.customtabs.CustomTabsIntent;
+import androidx.browser.customtabs.CustomTabsServiceConnection;
+import androidx.browser.customtabs.CustomTabsSession;
+import androidx.core.app.JobIntentService;
 import icepick.State;
 
 public class CommonActivity extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener {

+ 2 - 2
org.fox.ttrss/src/main/java/org/fox/ttrss/DetailActivity.java

@@ -9,8 +9,6 @@ import android.net.Uri;
 import android.os.Bundle;
 import android.os.Handler;
 import android.preference.PreferenceManager;
-import android.support.v4.app.FragmentTransaction;
-import android.support.v7.widget.Toolbar;
 import android.util.Log;
 import android.view.MenuItem;
 import android.view.View;
@@ -19,6 +17,8 @@ import org.fox.ttrss.types.Article;
 import org.fox.ttrss.types.ArticleList;
 import org.fox.ttrss.types.Feed;
 
+import androidx.appcompat.widget.Toolbar;
+import androidx.fragment.app.FragmentTransaction;
 import icepick.State;
 
 public class DetailActivity extends OnlineActivity implements HeadlinesEventListener {

+ 2 - 1
org.fox.ttrss/src/main/java/org/fox/ttrss/DummyFragment.java

@@ -1,11 +1,12 @@
 package org.fox.ttrss;
 
 import android.os.Bundle;
-import android.support.v4.app.Fragment;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 
+import androidx.fragment.app.Fragment;
+
 public class DummyFragment extends Fragment {
 	@Override
 	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {    	

+ 3 - 3
org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java

@@ -11,9 +11,6 @@ import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
 import android.os.Build;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
-import android.support.v4.app.LoaderManager;
-import android.support.v4.content.Loader;
-import android.support.v4.widget.SwipeRefreshLayout;
 import android.util.Log;
 import android.util.TypedValue;
 import android.view.ContextMenu;
@@ -46,6 +43,9 @@ import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;
 
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
 import icepick.State;
 
 public class FeedCategoriesFragment extends BaseFeedlistFragment implements OnItemClickListener, OnSharedPreferenceChangeListener,

+ 3 - 3
org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java

@@ -12,9 +12,6 @@ import android.graphics.Typeface;
 import android.os.Build;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
-import android.support.v4.app.LoaderManager;
-import android.support.v4.content.Loader;
-import android.support.v4.widget.SwipeRefreshLayout;
 import android.util.Log;
 import android.util.TypedValue;
 import android.view.ContextMenu;
@@ -48,6 +45,9 @@ import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;
 
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
 import icepick.State;
 
 public class FeedsFragment extends BaseFeedlistFragment implements OnItemClickListener, OnSharedPreferenceChangeListener,

+ 6 - 6
org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryActivity.java

@@ -5,12 +5,6 @@ import android.net.Uri;
 import android.os.AsyncTask;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.FragmentStatePagerAdapter;
-import android.support.v4.view.ViewPager;
-import android.support.v7.widget.Toolbar;
 import android.util.Log;
 import android.view.MenuInflater;
 import android.view.MenuItem;
@@ -32,6 +26,12 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.ExecutionException;
 
+import androidx.appcompat.widget.Toolbar;
+import androidx.core.app.ActivityCompat;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentStatePagerAdapter;
+import androidx.viewpager.widget.ViewPager;
 import icepick.State;
 import me.relex.circleindicator.CircleIndicator;
 

+ 2 - 2
org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryImageFragment.java

@@ -1,8 +1,6 @@
 package org.fox.ttrss;
 
 import android.os.Bundle;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.view.ViewCompat;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -18,6 +16,8 @@ import com.bumptech.glide.request.RequestListener;
 import com.bumptech.glide.request.target.GlideDrawableImageViewTarget;
 import com.bumptech.glide.request.target.Target;
 
+import androidx.core.app.ActivityCompat;
+import androidx.core.view.ViewCompat;
 import icepick.State;
 
 public class GalleryImageFragment extends GalleryBaseFragment {

+ 2 - 2
org.fox.ttrss/src/main/java/org/fox/ttrss/GalleryVideoFragment.java

@@ -5,8 +5,6 @@ import android.graphics.Rect;
 import android.graphics.SurfaceTexture;
 import android.media.MediaPlayer;
 import android.os.Bundle;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.view.ViewCompat;
 import android.util.Log;
 import android.view.Display;
 import android.view.LayoutInflater;
@@ -19,6 +17,8 @@ import android.widget.MediaController;
 
 import java.io.IOException;
 
+import androidx.core.app.ActivityCompat;
+import androidx.core.view.ViewCompat;
 import icepick.State;
 
 public class GalleryVideoFragment extends GalleryBaseFragment {

+ 11 - 11
org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java

@@ -20,17 +20,6 @@ import android.os.Build;
 import android.os.Bundle;
 import android.os.Handler;
 import android.preference.PreferenceManager;
-import android.support.design.widget.Snackbar;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.app.ActivityOptionsCompat;
-import android.support.v4.view.ViewCompat;
-import android.support.v4.widget.SwipeRefreshLayout;
-import android.support.v7.app.ActionBar;
-import android.support.v7.widget.DefaultItemAnimator;
-import android.support.v7.widget.DividerItemDecoration;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.support.v7.widget.helper.ItemTouchHelper;
 import android.text.Html;
 import android.transition.Fade;
 import android.transition.Transition;
@@ -67,6 +56,7 @@ import com.bumptech.glide.load.resource.drawable.GlideDrawable;
 import com.bumptech.glide.request.RequestListener;
 import com.bumptech.glide.request.target.GlideDrawableImageViewTarget;
 import com.bumptech.glide.request.target.Target;
+import com.google.android.material.snackbar.Snackbar;
 import com.google.gson.JsonElement;
 import com.shamanland.fab.FloatingActionButton;
 import com.shamanland.fab.ShowHideOnScroll;
@@ -89,6 +79,16 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.TimeZone;
 
+import androidx.appcompat.app.ActionBar;
+import androidx.core.app.ActivityCompat;
+import androidx.core.app.ActivityOptionsCompat;
+import androidx.core.view.ViewCompat;
+import androidx.recyclerview.widget.DefaultItemAnimator;
+import androidx.recyclerview.widget.DividerItemDecoration;
+import androidx.recyclerview.widget.ItemTouchHelper;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
 import icepick.State;
 import jp.wasabeef.glide.transformations.CropCircleTransformation;
 

+ 2 - 2
org.fox.ttrss/src/main/java/org/fox/ttrss/LogcatActivity.java

@@ -1,8 +1,6 @@
 package org.fox.ttrss;
 
 import android.os.Bundle;
-import android.support.v4.widget.SwipeRefreshLayout;
-import android.support.v7.widget.Toolbar;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
@@ -13,6 +11,8 @@ import java.io.BufferedReader;
 import java.io.InputStreamReader;
 import java.util.ArrayList;
 
+import androidx.appcompat.widget.Toolbar;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
 import icepick.State;
 
 public class LogcatActivity extends CommonActivity {

+ 5 - 5
org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java

@@ -10,11 +10,6 @@ import android.content.SharedPreferences;
 import android.os.Bundle;
 import android.os.Handler;
 import android.preference.PreferenceManager;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentTransaction;
-import android.support.v4.widget.DrawerLayout;
-import android.support.v7.app.ActionBarDrawerToggle;
-import android.support.v7.widget.Toolbar;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.MenuItem;
@@ -30,6 +25,11 @@ import org.fox.ttrss.types.FeedCategory;
 import java.util.Date;
 import java.util.HashMap;
 
+import androidx.appcompat.app.ActionBarDrawerToggle;
+import androidx.appcompat.widget.Toolbar;
+import androidx.drawerlayout.widget.DrawerLayout;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentTransaction;
 import icepick.State;
 
 public class MasterActivity extends OnlineActivity implements HeadlinesEventListener {

+ 3 - 2
org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java

@@ -17,8 +17,6 @@ import android.content.pm.PackageManager;
 import android.net.Uri;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
-import android.support.v7.view.ActionMode;
-import android.support.v7.widget.Toolbar;
 import android.util.Log;
 import android.view.KeyEvent;
 import android.view.Menu;
@@ -46,6 +44,9 @@ import java.lang.reflect.Type;
 import java.util.HashMap;
 import java.util.List;
 
+import androidx.appcompat.view.ActionMode;
+import androidx.appcompat.widget.Toolbar;
+
 public class OnlineActivity extends CommonActivity {
 	private final String TAG = this.getClass().getSimpleName();
 

+ 2 - 1
org.fox.ttrss/src/main/java/org/fox/ttrss/PreferencesActivity.java

@@ -2,9 +2,10 @@ package org.fox.ttrss;
 
 import android.os.Bundle;
 import android.preference.PreferenceManager;
-import android.support.v7.widget.Toolbar;
 import android.view.MenuItem;
 
+import androidx.appcompat.widget.Toolbar;
+
 public class PreferencesActivity extends CommonActivity {
 	@Override
     public void onCreate(Bundle savedInstanceState) {

+ 2 - 1
org.fox.ttrss/src/main/java/org/fox/ttrss/StateSavedFragment.java

@@ -1,10 +1,11 @@
 package org.fox.ttrss;
 
 import android.os.Bundle;
-import android.support.v4.app.Fragment;
 
 import com.livefront.bridge.Bridge;
 
+import androidx.fragment.app.Fragment;
+
 public class StateSavedFragment extends Fragment {
     @Override
     public void onCreate(Bundle savedInstanceState) {

+ 1 - 1
org.fox.ttrss/src/main/java/org/fox/ttrss/YoutubePlayerActivity.java

@@ -3,7 +3,6 @@ package org.fox.ttrss;
 import android.content.res.Configuration;
 import android.net.Uri;
 import android.os.Bundle;
-import android.support.v7.widget.Toolbar;
 import android.util.Log;
 import android.view.ContextMenu;
 import android.view.Menu;
@@ -14,6 +13,7 @@ import com.google.android.youtube.player.YouTubeInitializationResult;
 import com.google.android.youtube.player.YouTubePlayer;
 import com.google.android.youtube.player.YouTubePlayerSupportFragment;
 
+import androidx.appcompat.widget.Toolbar;
 import icepick.State;
 
 

+ 4 - 2
org.fox.ttrss/src/main/java/org/fox/ttrss/glide/WrappingTarget.java

@@ -1,11 +1,13 @@
 package org.fox.ttrss.glide;
 
 import android.graphics.drawable.Drawable;
-import android.support.annotation.NonNull;
 
 import com.bumptech.glide.request.Request;
 import com.bumptech.glide.request.animation.GlideAnimation;
-import com.bumptech.glide.request.target.*;
+import com.bumptech.glide.request.target.SizeReadyCallback;
+import com.bumptech.glide.request.target.Target;
+
+import androidx.annotation.NonNull;
 
 public class WrappingTarget<Z> implements Target<Z> {
     protected final @NonNull Target<? super Z> target;

+ 4 - 3
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineActivity.java

@@ -14,8 +14,6 @@ import android.net.Uri;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
 import android.provider.BaseColumns;
-import android.support.v7.view.ActionMode;
-import android.support.v7.widget.Toolbar;
 import android.util.Log;
 import android.view.KeyEvent;
 import android.view.Menu;
@@ -28,6 +26,9 @@ import org.fox.ttrss.OnlineActivity;
 import org.fox.ttrss.PreferencesActivity;
 import org.fox.ttrss.R;
 
+import androidx.appcompat.view.ActionMode;
+import androidx.appcompat.widget.Toolbar;
+
 public class OfflineActivity extends CommonActivity {
 	private final String TAG = this.getClass().getSimpleName();
 
@@ -154,7 +155,7 @@ public class OfflineActivity extends CommonActivity {
 
 		setContentView(R.layout.activity_login);
 
-		Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+		Toolbar toolbar = findViewById(R.id.toolbar);
 		setSupportActionBar(toolbar);
 
 		invalidateOptionsMenu();

+ 3 - 2
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java

@@ -10,8 +10,6 @@ import android.os.Build;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
 import android.provider.BaseColumns;
-import android.support.v4.app.Fragment;
-import android.support.v7.app.ActionBar;
 import android.util.Log;
 import android.util.TypedValue;
 import android.view.ContextMenu;
@@ -49,6 +47,9 @@ import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
+import androidx.appcompat.app.ActionBar;
+import androidx.fragment.app.Fragment;
+
 public class OfflineArticleFragment extends Fragment {
 	private final String TAG = this.getClass().getSimpleName();
 

+ 5 - 4
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticlePager.java

@@ -7,10 +7,6 @@ import android.os.Bundle;
 import android.os.Parcelable;
 import android.preference.PreferenceManager;
 import android.provider.BaseColumns;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.FragmentStatePagerAdapter;
-import android.support.v4.view.ViewPager;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -20,6 +16,11 @@ import com.viewpagerindicator.UnderlinePageIndicator;
 
 import org.fox.ttrss.R;
 
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentStatePagerAdapter;
+import androidx.viewpager.widget.ViewPager;
+
 public class OfflineArticlePager extends Fragment {
 	private final String TAG = this.getClass().getSimpleName();
 

+ 8 - 7
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineDetailActivity.java

@@ -8,11 +8,6 @@ import android.database.sqlite.SQLiteStatement;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
 import android.provider.BaseColumns;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentTransaction;
-import android.support.v4.widget.DrawerLayout;
-import android.support.v7.app.ActionBarDrawerToggle;
-import android.support.v7.widget.Toolbar;
 import android.util.Log;
 import android.view.MenuItem;
 import android.view.View;
@@ -20,6 +15,12 @@ import android.view.View;
 import org.fox.ttrss.Application;
 import org.fox.ttrss.R;
 
+import androidx.appcompat.app.ActionBarDrawerToggle;
+import androidx.appcompat.widget.Toolbar;
+import androidx.drawerlayout.widget.DrawerLayout;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentTransaction;
+
 public class OfflineDetailActivity extends OfflineActivity implements OfflineHeadlinesEventListener {
 	private final String TAG = this.getClass().getSimpleName();
 	
@@ -40,10 +41,10 @@ public class OfflineDetailActivity extends OfflineActivity implements OfflineHea
 
 		setContentView(R.layout.activity_detail);
 
-		Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+		Toolbar toolbar = findViewById(R.id.toolbar);
 		setSupportActionBar(toolbar);
 
-        m_drawerLayout = (DrawerLayout) findViewById(R.id.headlines_drawer);
+        m_drawerLayout = findViewById(R.id.headlines_drawer);
 
         if (m_drawerLayout != null) {
 

+ 2 - 1
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineDownloadService.java

@@ -17,7 +17,6 @@ import android.os.Build;
 import android.os.IBinder;
 import android.preference.PreferenceManager;
 import android.provider.BaseColumns;
-import android.support.v4.app.NotificationCompat;
 import android.util.Log;
 
 import com.google.gson.Gson;
@@ -43,6 +42,8 @@ import java.lang.reflect.Type;
 import java.util.HashMap;
 import java.util.List;
 
+import androidx.core.app.NotificationCompat;
+
 public class OfflineDownloadService extends Service {
 
 	private final String TAG = this.getClass().getSimpleName();

+ 9 - 8
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedCategoriesFragment.java

@@ -8,8 +8,6 @@ import android.database.Cursor;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
 import android.provider.BaseColumns;
-import android.support.v4.widget.SimpleCursorAdapter;
-import android.support.v4.widget.SwipeRefreshLayout;
 import android.util.Log;
 import android.util.TypedValue;
 import android.view.ContextMenu;
@@ -28,6 +26,9 @@ import android.widget.TextView;
 import org.fox.ttrss.BaseFeedlistFragment;
 import org.fox.ttrss.R;
 
+import androidx.cursoradapter.widget.SimpleCursorAdapter;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
+
 public class OfflineFeedCategoriesFragment extends BaseFeedlistFragment implements OnItemClickListener, OnSharedPreferenceChangeListener {
 	private final String TAG = this.getClass().getSimpleName();
 	private SharedPreferences m_prefs;
@@ -132,7 +133,7 @@ public class OfflineFeedCategoriesFragment extends BaseFeedlistFragment implemen
 
 		View view = inflater.inflate(R.layout.fragment_feeds, container, false);
 
-        m_swipeLayout = (SwipeRefreshLayout) view.findViewById(R.id.feeds_swipe_container);
+        m_swipeLayout = view.findViewById(R.id.feeds_swipe_container);
 
         m_swipeLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
             @Override
@@ -141,7 +142,7 @@ public class OfflineFeedCategoriesFragment extends BaseFeedlistFragment implemen
             }
         });
 
-		m_list = (ListView)view.findViewById(R.id.feeds);
+		m_list = view.findViewById(R.id.feeds);
 
 		m_cursor = createCursor();
 		
@@ -184,7 +185,7 @@ public class OfflineFeedCategoriesFragment extends BaseFeedlistFragment implemen
 	
 	@Override
 	public void onItemClick(AdapterView<?> av, View view, int position, long id) {
-		ListView list = (ListView)getActivity().findViewById(R.id.feeds);
+		ListView list = getActivity().findViewById(R.id.feeds);
 		
 		if (list != null) {
 			Cursor cursor = (Cursor) list.getItemAtPosition(position);
@@ -263,7 +264,7 @@ public class OfflineFeedCategoriesFragment extends BaseFeedlistFragment implemen
 
 			}
 
-			ImageView icon = (ImageView) v.findViewById(R.id.icon);
+			ImageView icon = v.findViewById(R.id.icon);
 
 			if (icon != null) {
 				TypedValue tv = new TypedValue();
@@ -273,13 +274,13 @@ public class OfflineFeedCategoriesFragment extends BaseFeedlistFragment implemen
 
 			}
 
-			TextView tt = (TextView) v.findViewById(R.id.title);
+			TextView tt = v.findViewById(R.id.title);
 
 			if (tt != null) {
 				tt.setText(cursor.getString(cursor.getColumnIndex("title")));
 			}
 
-			TextView tu = (TextView) v.findViewById(R.id.unread_counter);
+			TextView tu = v.findViewById(R.id.unread_counter);
 
 			if (tu != null) {
 				tu.setText(String.valueOf(cursor.getInt(cursor.getColumnIndex("unread"))));

+ 10 - 9
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java

@@ -7,8 +7,6 @@ import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
 import android.database.Cursor;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
-import android.support.v4.widget.SimpleCursorAdapter;
-import android.support.v4.widget.SwipeRefreshLayout;
 import android.util.Log;
 import android.view.ContextMenu;
 import android.view.ContextMenu.ContextMenuInfo;
@@ -26,6 +24,9 @@ import android.widget.TextView;
 import org.fox.ttrss.BaseFeedlistFragment;
 import org.fox.ttrss.R;
 
+import androidx.cursoradapter.widget.SimpleCursorAdapter;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
+
 public class OfflineFeedsFragment extends BaseFeedlistFragment implements OnItemClickListener, OnSharedPreferenceChangeListener {
 	private final String TAG = this.getClass().getSimpleName();
 	private SharedPreferences m_prefs;
@@ -85,7 +86,7 @@ public class OfflineFeedsFragment extends BaseFeedlistFragment implements OnItem
 		menu.findItem(R.id.create_shortcut).setEnabled(false);
 
         AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;
-		Cursor cursor = (Cursor)getFeedAtPosition(info.position);
+		Cursor cursor = getFeedAtPosition(info.position);
 		
 		if (cursor != null) 
 			menu.setHeaderTitle(cursor.getString(cursor.getColumnIndex("title")));
@@ -138,7 +139,7 @@ public class OfflineFeedsFragment extends BaseFeedlistFragment implements OnItem
 
 		View view = inflater.inflate(R.layout.fragment_feeds, container, false);
 
-        m_swipeLayout = (SwipeRefreshLayout) view.findViewById(R.id.feeds_swipe_container);
+        m_swipeLayout = view.findViewById(R.id.feeds_swipe_container);
 
         m_swipeLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
             @Override
@@ -147,7 +148,7 @@ public class OfflineFeedsFragment extends BaseFeedlistFragment implements OnItem
             }
         });
 
-		m_list = (ListView)view.findViewById(R.id.feeds);
+		m_list = view.findViewById(R.id.feeds);
 
 		initDrawerHeader(inflater, view, m_list, m_activity, m_prefs, !m_enableParentBtn);
 
@@ -210,7 +211,7 @@ public class OfflineFeedsFragment extends BaseFeedlistFragment implements OnItem
 	
 	@Override
 	public void onItemClick(AdapterView<?> av, View view, int position, long id) {
-		ListView list = (ListView)getActivity().findViewById(R.id.feeds);
+		ListView list = getActivity().findViewById(R.id.feeds);
 		
 		if (list != null) {
 			Cursor cursor = (Cursor) list.getItemAtPosition(position);
@@ -248,7 +249,7 @@ public class OfflineFeedsFragment extends BaseFeedlistFragment implements OnItem
 
         @Override
         public boolean isEmpty() {
-            return m_enableParentBtn ? false : super.isEmpty();
+            return !m_enableParentBtn && super.isEmpty();
         }
 
 		@Override
@@ -282,13 +283,13 @@ public class OfflineFeedsFragment extends BaseFeedlistFragment implements OnItem
 
 			}
 
-			TextView tt = (TextView) v.findViewById(R.id.title);
+			TextView tt = v.findViewById(R.id.title);
 
 			if (tt != null) {
 				tt.setText(cursor.getString(cursor.getColumnIndex("title")));
 			}
 
-			TextView tu = (TextView) v.findViewById(R.id.unread_counter);
+			TextView tu = v.findViewById(R.id.unread_counter);
 
 			if (tu != null) {
 				tu.setText(String.valueOf(cursor.getInt(cursor.getColumnIndex("unread"))));

+ 6 - 6
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java

@@ -17,12 +17,6 @@ import android.net.Uri;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
 import android.provider.BaseColumns;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.app.ActivityOptionsCompat;
-import android.support.v4.app.Fragment;
-import android.support.v4.view.ViewCompat;
-import android.support.v4.widget.SimpleCursorAdapter;
-import android.support.v4.widget.SwipeRefreshLayout;
 import android.text.Html;
 import android.util.Log;
 import android.util.TypedValue;
@@ -76,6 +70,12 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.TimeZone;
 
+import androidx.core.app.ActivityCompat;
+import androidx.core.app.ActivityOptionsCompat;
+import androidx.core.view.ViewCompat;
+import androidx.cursoradapter.widget.SimpleCursorAdapter;
+import androidx.fragment.app.Fragment;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
 import jp.wasabeef.glide.transformations.CropCircleTransformation;
 
 public class OfflineHeadlinesFragment extends Fragment implements OnItemClickListener, AbsListView.OnScrollListener {

+ 8 - 7
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineMasterActivity.java

@@ -11,11 +11,6 @@ import android.os.Bundle;
 import android.os.Handler;
 import android.preference.PreferenceManager;
 import android.provider.BaseColumns;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentTransaction;
-import android.support.v4.widget.DrawerLayout;
-import android.support.v7.app.ActionBarDrawerToggle;
-import android.support.v7.widget.Toolbar;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.MenuItem;
@@ -24,6 +19,12 @@ import android.view.View;
 import org.fox.ttrss.Application;
 import org.fox.ttrss.R;
 
+import androidx.appcompat.app.ActionBarDrawerToggle;
+import androidx.appcompat.widget.Toolbar;
+import androidx.drawerlayout.widget.DrawerLayout;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentTransaction;
+
 public class OfflineMasterActivity extends OfflineActivity implements OfflineHeadlinesEventListener {
 	private final String TAG = this.getClass().getSimpleName();
 
@@ -49,14 +50,14 @@ public class OfflineMasterActivity extends OfflineActivity implements OfflineHea
 		
 		setContentView(R.layout.activity_master);
 
-		Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+		Toolbar toolbar = findViewById(R.id.toolbar);
 		setSupportActionBar(toolbar);
 
         setSmallScreen(findViewById(R.id.sw600dp_anchor) == null);
 
 		Application.getInstance().load(savedInstanceState);
 
-        m_drawerLayout = (DrawerLayout) findViewById(R.id.headlines_drawer);
+        m_drawerLayout = findViewById(R.id.headlines_drawer);
 
         if (m_drawerLayout != null) {
 

+ 2 - 1
org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineUploadService.java

@@ -11,7 +11,6 @@ import android.database.Cursor;
 import android.database.sqlite.SQLiteDatabase;
 import android.graphics.BitmapFactory;
 import android.os.Build;
-import android.support.v4.app.NotificationCompat;
 import android.util.Log;
 
 import com.google.gson.JsonElement;
@@ -26,6 +25,8 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 
+import androidx.core.app.NotificationCompat;
+
 public class OfflineUploadService extends IntentService {
 	private final String TAG = this.getClass().getSimpleName();
 

+ 3 - 2
org.fox.ttrss/src/main/java/org/fox/ttrss/util/ContextMenuRecyclerView.java

@@ -1,13 +1,14 @@
 package org.fox.ttrss.util;
 
 import android.content.Context;
-import android.support.annotation.Nullable;
-import android.support.v7.widget.RecyclerView;
 import android.util.AttributeSet;
 import android.view.ContextMenu;
 import android.view.View;
 import android.widget.AdapterView;
 
+import androidx.annotation.Nullable;
+import androidx.recyclerview.widget.RecyclerView;
+
 public class ContextMenuRecyclerView extends RecyclerView {
 
     private AdapterView.AdapterContextMenuInfo mContextMenuInfo;

+ 2 - 1
org.fox.ttrss/src/main/java/org/fox/ttrss/util/HeaderViewRecyclerAdapter.java

@@ -16,7 +16,6 @@ package org.fox.ttrss.util;
  * limitations under the License.
  */
 
-import android.support.v7.widget.RecyclerView;
 import android.view.View;
 import android.view.ViewGroup;
 
@@ -25,6 +24,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import androidx.recyclerview.widget.RecyclerView;
+
 /**
  * <p>
  * RecyclerView adapter designed to wrap an existing adapter allowing the addition of

+ 2 - 1
org.fox.ttrss/src/main/java/org/fox/ttrss/util/ImageCacheService.java

@@ -13,7 +13,6 @@ import android.content.IntentFilter;
 import android.graphics.BitmapFactory;
 import android.os.Build;
 import android.os.Environment;
-import android.support.v4.app.NotificationCompat;
 import android.util.Log;
 
 import org.fox.ttrss.CommonActivity;
@@ -31,6 +30,8 @@ import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.util.Date;
 
+import androidx.core.app.NotificationCompat;
+
 public class ImageCacheService extends IntentService {
 
 	@SuppressWarnings("unused")

+ 4 - 3
org.fox.ttrss/src/main/java/org/fox/ttrss/util/ScrimInsetsFrameLayout.java

@@ -20,12 +20,13 @@ import android.content.res.TypedArray;
 import android.graphics.Canvas;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
-import android.support.v4.view.ViewCompat;
 import android.util.AttributeSet;
 import android.widget.FrameLayout;
 
 import org.fox.ttrss.R;
 
+import androidx.core.view.ViewCompat;
+
 /**
  * A layout that draws something in the insets passed to {@link #fitSystemWindows(Rect)}, i.e. the area above UI chrome
  * (status and navigation bars, overlay action bars).
@@ -135,7 +136,7 @@ public class ScrimInsetsFrameLayout extends FrameLayout {
         mOnInsetsCallback = onInsetsCallback;
     }
 
-    public static interface OnInsetsCallback {
-        public void onInsetsChanged(Rect insets);
+    public interface OnInsetsCallback {
+        void onInsetsChanged(Rect insets);
     }
 }

+ 3 - 2
org.fox.ttrss/src/main/java/org/fox/ttrss/widget/WidgetUpdateService.java

@@ -11,8 +11,6 @@ import android.net.NetworkInfo;
 import android.os.Build;
 import android.os.Handler;
 import android.preference.PreferenceManager;
-import android.support.annotation.NonNull;
-import android.support.v4.app.JobIntentService;
 import android.util.Log;
 import android.widget.RemoteViews;
 
@@ -26,6 +24,9 @@ import org.fox.ttrss.util.SimpleLoginManager;
 
 import java.util.HashMap;
 
+import androidx.annotation.NonNull;
+import androidx.core.app.JobIntentService;
+
 public class WidgetUpdateService extends JobIntentService {
     private final String TAG = this.getClass().getSimpleName();
     private SharedPreferences m_prefs;

+ 2 - 2
org.fox.ttrss/src/main/res/layout/activity_logcat.xml

@@ -6,7 +6,7 @@
 
     <include layout="@layout/toolbar" android:id="@+id/toolbar" />
 
-    <android.support.v4.widget.SwipeRefreshLayout
+    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
         android:id="@+id/logcat_swipe_container"
         android:layout_below="@+id/toolbar"
         android:layout_alignParentBottom="true"
@@ -21,6 +21,6 @@
             android:layout_width="match_parent"
             android:layout_height="match_parent"/>
 
-    </android.support.v4.widget.SwipeRefreshLayout>
+    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
 
 </RelativeLayout>

+ 2 - 2
org.fox.ttrss/src/main/res/layout/activity_master.xml

@@ -1,4 +1,4 @@
-    <android.support.v4.widget.DrawerLayout
+    <androidx.drawerlayout.widget.DrawerLayout
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:fitsSystemWindows="true"
         android:id="@+id/headlines_drawer"
@@ -41,4 +41,4 @@
 
         </org.fox.ttrss.util.ScrimInsetsFrameLayout>
 
-    </android.support.v4.widget.DrawerLayout>
+    </androidx.drawerlayout.widget.DrawerLayout>

+ 2 - 2
org.fox.ttrss/src/main/res/layout/article_pager.xml

@@ -5,12 +5,12 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent">
 
-    <android.support.v4.view.ViewPager
+    <androidx.viewpager.widget.ViewPager
         android:id="@+id/article_pager"
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:layout_above="@+id/article_pager_indicator"
-        android:layout_alignParentTop="true"></android.support.v4.view.ViewPager>
+        android:layout_alignParentTop="true"/>
 
     <com.viewpagerindicator.UnderlinePageIndicator
         android:id="@+id/article_pager_indicator"

+ 1 - 1
org.fox.ttrss/src/main/res/layout/feeds_row_toggle.xml

@@ -36,7 +36,7 @@
         android:textColor="?feedlistTextColor"
         android:textSize="14sp" />
 
-    <android.support.v7.widget.SwitchCompat
+    <androidx.appcompat.widget.SwitchCompat
         android:id="@+id/row_switch"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"

+ 2 - 2
org.fox.ttrss/src/main/res/layout/fragment_cats.xml

@@ -4,7 +4,7 @@
     android:layout_width="match_parent"
     android:layout_height="fill_parent" >
 
-    <android.support.v4.widget.SwipeRefreshLayout
+    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
     	android:id="@+id/feeds_swipe_container"
     	android:layout_width="match_parent"
     	android:layout_height="match_parent" >
@@ -16,5 +16,5 @@
 	        android:layout_width="match_parent"
 	        android:layout_height="match_parent" >
 	    </ListView>
-	</android.support.v4.widget.SwipeRefreshLayout>
+	</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
 </FrameLayout>

+ 2 - 2
org.fox.ttrss/src/main/res/layout/fragment_feeds.xml

@@ -4,7 +4,7 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent" >
 
-    <android.support.v4.widget.SwipeRefreshLayout 
+    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
     	android:id="@+id/feeds_swipe_container"
     	android:layout_width="match_parent"
     	android:layout_height="match_parent">
@@ -18,5 +18,5 @@
             android:layout_alignParentLeft="true"
             android:layout_alignParentStart="true">
         </ListView>
-    </android.support.v4.widget.SwipeRefreshLayout>
+    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
 </RelativeLayout>

+ 2 - 2
org.fox.ttrss/src/main/res/layout/fragment_headlines.xml

@@ -6,7 +6,7 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent">
 
-    <android.support.v4.widget.SwipeRefreshLayout 
+    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
     	android:id="@+id/headlines_swipe_container"
     	android:layout_width="match_parent"
     	android:layout_height="match_parent" >
@@ -17,7 +17,7 @@
 		   android:scrollbars="vertical"
 	       android:layout_width="match_parent"
 	       android:layout_height="match_parent" />
-	</android.support.v4.widget.SwipeRefreshLayout>
+	</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
 
     <com.shamanland.fab.FloatingActionButton
         android:id="@+id/headlines_fab"

+ 2 - 2
org.fox.ttrss/src/main/res/layout/fragment_headlines_offline.xml

@@ -6,7 +6,7 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent">
 
-    <android.support.v4.widget.SwipeRefreshLayout 
+    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
     	android:id="@+id/headlines_swipe_container"
     	android:layout_width="match_parent"
     	android:layout_height="match_parent" >
@@ -16,7 +16,7 @@
            android:drawSelectorOnTop="true"
 	       android:layout_width="match_parent"
 	       android:layout_height="match_parent" />
-	</android.support.v4.widget.SwipeRefreshLayout>
+	</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
 
     <com.shamanland.fab.FloatingActionButton
         android:id="@+id/headlines_fab"

+ 1 - 1
org.fox.ttrss/src/main/res/layout/toolbar.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.v7.widget.Toolbar
+<androidx.appcompat.widget.Toolbar
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:id="@+id/toolbar"

+ 1 - 1
tt-rss-android.iml

@@ -13,7 +13,7 @@
     <content url="file://$MODULE_DIR$">
       <excludeFolder url="file://$MODULE_DIR$/.gradle" />
     </content>
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
+    <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
   </component>
 </module>