Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace android support to androidx #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
defaultConfig {
minSdkVersion MIN_SDK_VERSION as int
targetSdkVersion TARGET_SDK_VERSION as int
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
Expand All @@ -27,8 +27,8 @@ androidExtensions {
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
api "com.android.support:appcompat-v7:${SUPPORT_LIB_VERSION}"
api "com.android.support:exifinterface:${SUPPORT_LIB_VERSION}"
api "androidx.appcompat:appcompat:${ANDROIDX_VERSION}"
api "androidx.exifinterface:exifinterface:${ANDROIDX_VERSION}"
api 'com.squareup.okhttp3:okhttp:3.10.0'
api 'com.google.code.gson:gson:2.8.5'
api 'com.qiniu:qiniu-android-sdk:7.3.3'
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/com/astuetz/PagerSlidingTabStrip.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import androidx.core.content.ContextCompat;
import androidx.viewpager.widget.ViewPager;
import androidx.viewpager.widget.ViewPager.OnPageChangeListener;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.TypedValue;
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/com/bumptech/glide/Glide.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import android.os.Handler;
import android.os.Looper;
import android.os.ParcelFileDescriptor;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/com/bumptech/glide/RequestManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
* built in Activity and Fragment lifecycle handling, use the static Glide.load methods with your Fragment or Activity.
*
* @see Glide#with(android.app.Activity)
* @see Glide#with(android.support.v4.app.FragmentActivity)
* @see Glide#with(androidx.fragment.app.FragmentActivity)
* @see Glide#with(android.app.Fragment)
* @see Glide#with(android.support.v4.app.Fragment)
* @see Glide#with(androidx.fragment.app.Fragment)
* @see Glide#with(Context)
*/
public class RequestManager implements LifecycleListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import android.util.Log;

import com.bumptech.glide.RequestManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.annotation.SuppressLint;
import android.app.Activity;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;

import com.bumptech.glide.RequestManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import android.graphics.Rect;
import android.graphics.RectF;
import android.net.Uri;
import android.support.media.ExifInterface;
import androidx.exifinterface.media.ExifInterface;
import android.util.Log;
import android.util.Pair;

Expand Down
10 changes: 5 additions & 5 deletions core/src/main/java/com/theartofdev/edmodo/cropper/CropImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
import android.os.Parcel;
import android.os.Parcelable;
import android.provider.MediaStore;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.support.v4.app.Fragment;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.fragment.app.Fragment;

import com.quxianggif.core.R;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.media.ExifInterface;
import androidx.exifinterface.media.ExifInterface;
import android.util.AttributeSet;
import android.util.Pair;
import android.view.LayoutInflater;
Expand Down
6 changes: 5 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ COMPILE_SDK_VERSION=29
TARGET_SDK_VERSION=29
MIN_SDK_VERSION=16
SUPPORT_LIB_VERSION=27.1.1
ANDROIDX_VERSION=1.1.0
VERSION_CODE = 18
VERSION_NAME = 1.0.3
VERSION_NAME = 1.0.3

android.useAndroidX=true
android.enableJetifier=true
18 changes: 9 additions & 9 deletions main/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ dependencies {
api fileTree(include: ['*.jar'], dir: 'libs')
api project(':core')
api project(':network')
api "com.android.support:recyclerview-v7:${SUPPORT_LIB_VERSION}"
api "com.android.support:cardview-v7:${SUPPORT_LIB_VERSION}"
api "com.android.support:design:${SUPPORT_LIB_VERSION}"
api "com.android.support:palette-v7:${SUPPORT_LIB_VERSION}"
api "com.android.support:percent:${SUPPORT_LIB_VERSION}"
api "com.android.support:preference-v7:${SUPPORT_LIB_VERSION}"
api "com.android.support:preference-v14:${SUPPORT_LIB_VERSION}"
api 'com.android.support:multidex:1.0.3'
api 'com.android.support.constraint:constraint-layout:1.1.3'
api "androidx.recyclerview:recyclerview:${ANDROIDX_VERSION}"
api "androidx.cardview:cardview:1.0.0"
api 'com.google.android.material:material:1.0.0'
api "androidx.palette:palette:1.0.0"
api "androidx.percentlayout:percentlayout:1.0.0"
api "androidx.preference:preference:${ANDROIDX_VERSION}"
// api "com.android.support:preference-v14:${SUPPORT_LIB_VERSION}"
api 'androidx.multidex:multidex:2.0.1'
api 'androidx.constraintlayout:constraintlayout:1.1.3'
api 'org.greenrobot:eventbus:3.0.0'
api 'de.hdodenhof:circleimageview:2.1.0'
api 'com.umeng.umsdk:analytics:7.5.4'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.quxianggif

import android.support.test.InstrumentationRegistry
import android.support.test.runner.AndroidJUnit4
import androidx.test.InstrumentationRegistry
import androidx.test.runner.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith
Expand Down
2 changes: 1 addition & 1 deletion main/src/main/java/com/quxianggif/GifFunApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package com.quxianggif

import android.app.Application
import android.content.Context
import android.support.multidex.MultiDex
import androidx.multidex.MultiDex
import com.quxianggif.core.GifFun
import com.umeng.analytics.MobclickAgent
import com.umeng.commonsdk.UMConfigure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

package com.quxianggif.comments.adapter

import android.support.v7.app.AlertDialog
import android.support.v7.widget.RecyclerView
import androidx.appcompat.app.AlertDialog
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package com.quxianggif.comments.adapter

import android.app.Activity
import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ package com.quxianggif.comments.ui
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import android.support.v7.widget.SimpleItemAnimator
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.SimpleItemAnimator
import android.text.TextUtils
import android.view.View
import android.widget.Toast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package com.quxianggif.comments.view

import android.content.Context
import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.util.AttributeSet
import android.view.View

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package com.quxianggif.common.adapter
import android.app.Activity
import android.content.Context
import android.net.Uri
import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ package com.quxianggif.common.adapter
import android.annotation.TargetApi
import android.app.Activity
import android.os.Build
import android.support.v4.content.ContextCompat
import android.support.v7.app.AlertDialog
import android.support.v7.widget.CardView
import android.support.v7.widget.RecyclerView
import androidx.core.content.ContextCompat
import androidx.appcompat.app.AlertDialog
import androidx.cardview.widget.CardView
import androidx.recyclerview.widget.RecyclerView
import android.text.SpannableString
import android.text.Spanned
import android.text.TextPaint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ package com.quxianggif.common.adapter
import android.annotation.TargetApi
import android.app.Activity
import android.os.Build
import android.support.v7.widget.CardView
import android.support.v7.widget.RecyclerView
import android.support.v7.widget.StaggeredGridLayoutManager
import androidx.cardview.widget.CardView
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.StaggeredGridLayoutManager
import android.transition.Transition
import android.transition.TransitionInflater
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

package com.quxianggif.common.callback

import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import android.support.v7.widget.StaggeredGridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.StaggeredGridLayoutManager


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package com.quxianggif.common.holder

import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.view.View
import android.widget.ImageView
import android.widget.TextView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package com.quxianggif.common.holder

import android.content.Context
import android.support.v7.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import android.annotation.TargetApi
import android.content.Context
import android.graphics.Point
import android.os.Build
import android.support.annotation.IdRes
import androidx.annotation.IdRes
import android.transition.TransitionValues
import android.transition.Visibility
import android.util.AttributeSet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import android.graphics.Outline
import android.graphics.Rect
import android.graphics.drawable.ColorDrawable
import android.os.Build
import android.support.annotation.ColorInt
import android.support.annotation.DrawableRes
import android.support.v4.content.ContextCompat
import androidx.annotation.ColorInt
import androidx.annotation.DrawableRes
import androidx.core.content.ContextCompat
import android.transition.Transition
import android.transition.TransitionValues
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import android.annotation.TargetApi
import android.content.Context
import android.content.res.TypedArray
import android.os.Build
import android.support.annotation.Keep
import androidx.annotation.Keep
import android.transition.TransitionValues
import android.transition.Visibility
import android.util.AttributeSet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package com.quxianggif.common.transitions

import android.annotation.TargetApi
import android.os.Build
import android.support.annotation.IdRes
import androidx.annotation.IdRes
import android.transition.Transition
import android.transition.TransitionSet
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import android.Manifest
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.support.v4.app.Fragment
import androidx.fragment.app.Fragment
import com.quxianggif.R
import com.quxianggif.common.callback.PermissionListener
import com.quxianggif.core.extension.logDebug
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import android.content.Context
import android.database.Cursor
import android.os.Bundle
import android.provider.MediaStore
import android.support.v7.widget.GridLayoutManager
import androidx.recyclerview.widget.GridLayoutManager
import android.util.DisplayMetrics
import android.view.LayoutInflater
import android.view.View
Expand Down
10 changes: 5 additions & 5 deletions main/src/main/java/com/quxianggif/common/ui/BaseActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import android.content.Context
import android.content.pm.PackageManager
import android.graphics.Color
import android.os.Bundle
import android.support.annotation.CallSuper
import android.support.v4.app.ActivityCompat
import android.support.v4.content.ContextCompat
import android.support.v7.app.AppCompatActivity
import android.support.v7.widget.Toolbar
import androidx.annotation.CallSuper
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
import android.view.MenuItem
import android.view.View
import android.view.ViewStub
Expand Down
6 changes: 3 additions & 3 deletions main/src/main/java/com/quxianggif/common/ui/BaseFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
package com.quxianggif.common.ui

import android.content.pm.PackageManager
import android.support.annotation.CallSuper
import android.support.v4.app.Fragment
import android.support.v4.content.ContextCompat
import androidx.annotation.CallSuper
import androidx.fragment.app.Fragment
import androidx.core.content.ContextCompat
import android.view.View
import android.view.ViewStub
import android.widget.Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.provider.Settings
import android.support.v7.app.AlertDialog
import androidx.appcompat.app.AlertDialog
import android.view.LayoutInflater
import android.view.View
import android.view.View.OnClickListener
Expand Down
Loading