Skip to content

Commit ae62a94

Browse files
Migrate to AndroidX
- Migrate to AndroidX - Update compileSdkVersion - Update targetSdkVersion - Update buildToolsVersion
1 parent bdfd900 commit ae62a94

File tree

18 files changed

+102
-94
lines changed

18 files changed

+102
-94
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ Firstly you need to place `Filter` above your `RecyclerView` in the layout file
4242

4343
```xml
4444
<?xml version="1.0" encoding="utf-8"?>
45-
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
45+
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
4646
xmlns:app="http://schemas.android.com/apk/res-auto"
4747
xmlns:tools="http://schemas.android.com/tools"
4848
android:layout_width="match_parent"
4949
android:layout_height="match_parent">
5050

51-
<android.support.design.widget.AppBarLayout
51+
<com.google.android.material.appbar.AppBarLayout
5252
android:layout_width="match_parent"
5353
android:layout_height="wrap_content">
5454

55-
<android.support.v7.widget.Toolbar
55+
<androidx.appcompat.widget.Toolbar
5656
android:layout_width="match_parent"
5757
android:layout_height="?attr/actionBarSize"
5858
android:background="@color/colorPrimary"
@@ -63,7 +63,7 @@ Firstly you need to place `Filter` above your `RecyclerView` in the layout file
6363
android:layout_width="match_parent"
6464
android:layout_height="match_parent">
6565

66-
<android.support.v7.widget.AppCompatImageView
66+
<androidx.appcompat.widget.AppCompatImageView
6767
android:layout_width="24dp"
6868
android:layout_height="24dp"
6969
android:layout_centerVertical="true"
@@ -78,7 +78,7 @@ Firstly you need to place `Filter` above your `RecyclerView` in the layout file
7878
android:textColor="@android:color/white"
7979
android:textSize="20sp" />
8080

81-
<android.support.v7.widget.AppCompatImageView
81+
<androidx.appcompat.widget.AppCompatImageView
8282
android:layout_width="24dp"
8383
android:layout_height="24dp"
8484
android:layout_alignParentRight="true"
@@ -88,16 +88,16 @@ Firstly you need to place `Filter` above your `RecyclerView` in the layout file
8888

8989
</RelativeLayout>
9090

91-
</android.support.v7.widget.Toolbar>
92-
</android.support.design.widget.AppBarLayout>
91+
</androidx.appcompat.widget.Toolbar>
92+
</com.google.android.material.appbar.AppBarLayout>
9393

9494
<FrameLayout
9595
android:layout_width="match_parent"
9696
android:layout_height="match_parent"
9797
android:background="#E4E6E3"
9898
app:layout_behavior="@string/appbar_scrolling_view_behavior">
9999

100-
<android.support.v7.widget.RecyclerView
100+
<androidx.recyclerview.widget.RecyclerView
101101
android:id="@+id/list"
102102
android:layout_width="match_parent"
103103
android:layout_height="wrap_content"
@@ -110,7 +110,7 @@ Firstly you need to place `Filter` above your `RecyclerView` in the layout file
110110
android:layout_height="wrap_content" />
111111

112112
</FrameLayout>
113-
</android.support.design.widget.CoordinatorLayout>
113+
</androidx.coordinatorlayout.widget.CoordinatorLayout>
114114

115115
```
116116

app/build.gradle

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 24
5-
buildToolsVersion "24.0.1"
4+
compileSdkVersion 33
5+
buildToolsVersion "20.0.3"
66

77
defaultConfig {
88
applicationId "com.yalantis.fitfilter"
99
minSdkVersion 18
10-
targetSdkVersion 24
10+
targetSdkVersion 33
1111
versionCode 1
1212
versionName "1.0"
1313
}
@@ -21,8 +21,9 @@ android {
2121

2222
dependencies {
2323
implementation fileTree(include: ['*.jar'], dir: 'libs')
24-
implementation 'com.android.support:appcompat-v7:24.2.0'
25-
implementation 'com.facebook.fresco:fresco:0.13.0'
26-
implementation 'com.android.support:design:24.2.0'
2724
implementation project(':filter')
25+
26+
implementation "androidx.appcompat:appcompat:1.5.1"
27+
implementation "com.google.android.material:material:1.6.1"
28+
implementation "com.facebook.fresco:fresco:2.6.0"
2829
}

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
android:largeHeap="true"
1212
android:supportsRtl="true"
1313
android:theme="@style/AppTheme">
14-
<activity android:name=".ExampleActivity">
14+
<activity android:name=".ExampleActivity"
15+
android:exported="true">
1516
<intent-filter>
1617
<action android:name="android.intent.action.MAIN" />
1718

app/src/main/java/com/yalantis/fitfilter/DividerItemDecoration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
import android.content.Context;
44
import android.graphics.Canvas;
55
import android.graphics.drawable.Drawable;
6-
import android.support.v4.content.ContextCompat;
7-
import android.support.v7.widget.RecyclerView;
86
import android.view.View;
97

8+
import androidx.core.content.ContextCompat;
9+
import androidx.recyclerview.widget.RecyclerView;
10+
1011
/**
1112
* Created by galata on 17.09.16.
1213
*/

app/src/main/java/com/yalantis/fitfilter/ExampleActivity.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package com.yalantis.fitfilter;
22

33
import android.os.Bundle;
4-
import android.support.annotation.NonNull;
5-
import android.support.v4.content.ContextCompat;
6-
import android.support.v7.app.AppCompatActivity;
7-
import android.support.v7.util.DiffUtil;
8-
import android.support.v7.widget.LinearLayoutManager;
9-
import android.support.v7.widget.RecyclerView;
4+
5+
import androidx.annotation.NonNull;
6+
import androidx.appcompat.app.AppCompatActivity;
7+
import androidx.core.content.ContextCompat;
8+
import androidx.recyclerview.widget.DiffUtil;
9+
import androidx.recyclerview.widget.LinearLayoutManager;
10+
import androidx.recyclerview.widget.RecyclerView;
1011

1112
import com.facebook.drawee.backends.pipeline.Fresco;
1213
import com.facebook.imagepipeline.core.ImagePipelineConfig;

app/src/main/java/com/yalantis/fitfilter/QuestionsAdapter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
import android.content.Context;
44
import android.graphics.drawable.GradientDrawable;
5-
import android.support.v4.content.ContextCompat;
6-
import android.support.v7.widget.RecyclerView;
75
import android.view.LayoutInflater;
86
import android.view.View;
97
import android.view.ViewGroup;
108
import android.widget.TextView;
119

10+
import androidx.core.content.ContextCompat;
11+
import androidx.recyclerview.widget.RecyclerView;
12+
1213
import com.facebook.drawee.view.SimpleDraweeView;
1314

1415
import java.util.List;

app/src/main/java/com/yalantis/fitfilter/Tag.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.yalantis.fitfilter;
22

3-
import android.support.annotation.NonNull;
3+
4+
import androidx.annotation.NonNull;
45

56
import com.yalantis.filter.model.FilterModel;
67

app/src/main/res/layout/activity_example.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent">
77

8-
<android.support.design.widget.AppBarLayout
8+
<com.google.android.material.appbar.AppBarLayout
99
android:layout_width="match_parent"
1010
android:layout_height="wrap_content">
1111

12-
<android.support.v7.widget.Toolbar
12+
<androidx.appcompat.widget.Toolbar
1313
android:layout_width="match_parent"
1414
android:layout_height="?attr/actionBarSize"
1515
android:background="@color/colorPrimary"
@@ -20,7 +20,7 @@
2020
android:layout_width="match_parent"
2121
android:layout_height="match_parent">
2222

23-
<android.support.v7.widget.AppCompatImageView
23+
<androidx.appcompat.widget.AppCompatImageView
2424
android:layout_width="24dp"
2525
android:layout_height="24dp"
2626
android:layout_centerVertical="true"
@@ -35,7 +35,7 @@
3535
android:textColor="@android:color/white"
3636
android:textSize="20sp" />
3737

38-
<android.support.v7.widget.AppCompatImageView
38+
<androidx.appcompat.widget.AppCompatImageView
3939
android:layout_width="24dp"
4040
android:layout_height="24dp"
4141
android:layout_alignParentRight="true"
@@ -45,16 +45,16 @@
4545

4646
</RelativeLayout>
4747

48-
</android.support.v7.widget.Toolbar>
49-
</android.support.design.widget.AppBarLayout>
48+
</androidx.appcompat.widget.Toolbar>
49+
</com.google.android.material.appbar.AppBarLayout>
5050

5151
<FrameLayout
5252
android:layout_width="match_parent"
5353
android:layout_height="match_parent"
5454
android:background="#E4E6E3"
5555
app:layout_behavior="@string/appbar_scrolling_view_behavior">
5656

57-
<android.support.v7.widget.RecyclerView
57+
<androidx.recyclerview.widget.RecyclerView
5858
android:id="@+id/list"
5959
android:layout_width="match_parent"
6060
android:layout_height="wrap_content"
@@ -67,4 +67,4 @@
6767
android:layout_height="wrap_content" />
6868

6969
</FrameLayout>
70-
</android.support.design.widget.CoordinatorLayout>
70+
</androidx.coordinatorlayout.widget.CoordinatorLayout>

app/src/main/res/layout/item_list.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
android:layout_marginRight="16dp"
8484
android:background="#ebebeb" />
8585

86-
<android.support.v7.widget.AppCompatImageView
86+
<androidx.appcompat.widget.AppCompatImageView
8787
android:id="@+id/view_likes"
8888
android:layout_width="24dp"
8989
android:layout_height="24dp"
@@ -104,7 +104,7 @@
104104
android:textColor="#827f93"
105105
android:textSize="12sp" />
106106

107-
<android.support.v7.widget.AppCompatImageView
107+
<androidx.appcompat.widget.AppCompatImageView
108108
android:id="@+id/view_chat"
109109
android:layout_width="24dp"
110110
android:layout_height="24dp"
@@ -125,7 +125,7 @@
125125
android:textColor="#827f93"
126126
android:textSize="12sp" />
127127

128-
<android.support.v7.widget.AppCompatImageView
128+
<androidx.appcompat.widget.AppCompatImageView
129129
android:id="@+id/view_settings"
130130
android:layout_width="24dp"
131131
android:layout_height="24dp"

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
dependencies {
77
classpath 'com.android.tools.build:gradle:7.3.0'
88
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
9-
classpath "org.jetbrains.kotlin:kotlin-android-extensions:1.0.0"
9+
classpath "org.jetbrains.kotlin:kotlin-android-extensions:1.7.10"
1010
}
1111
}
1212

0 commit comments

Comments
 (0)