Skip to content

Commit

Permalink
Migrate to AndroidX
Browse files Browse the repository at this point in the history
- Migrate to AndroidX
- Update compileSdkVersion
- Update targetSdkVersion
- Update buildToolsVersion
  • Loading branch information
dmytro1morozov committed Sep 20, 2022
1 parent bdfd900 commit ae62a94
Show file tree
Hide file tree
Showing 18 changed files with 102 additions and 94 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ Firstly you need to place `Filter` above your `RecyclerView` in the layout file

```xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.design.widget.AppBarLayout
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

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

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

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

</RelativeLayout>

</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#E4E6E3"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

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

</FrameLayout>
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

```

Expand Down
13 changes: 7 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
compileSdkVersion 33
buildToolsVersion "20.0.3"

defaultConfig {
applicationId "com.yalantis.fitfilter"
minSdkVersion 18
targetSdkVersion 24
targetSdkVersion 33
versionCode 1
versionName "1.0"
}
Expand All @@ -21,8 +21,9 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:24.2.0'
implementation 'com.facebook.fresco:fresco:0.13.0'
implementation 'com.android.support:design:24.2.0'
implementation project(':filter')

implementation "androidx.appcompat:appcompat:1.5.1"
implementation "com.google.android.material:material:1.6.1"
implementation "com.facebook.fresco:fresco:2.6.0"
}
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
android:largeHeap="true"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".ExampleActivity">
<activity android:name=".ExampleActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;

/**
* Created by galata on 17.09.16.
*/
Expand Down
13 changes: 7 additions & 6 deletions app/src/main/java/com/yalantis/fitfilter/ExampleActivity.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.yalantis.fitfilter;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.util.DiffUtil;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.imagepipeline.core.ImagePipelineConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

import android.content.Context;
import android.graphics.drawable.GradientDrawable;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;

import com.facebook.drawee.view.SimpleDraweeView;

import java.util.List;
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/com/yalantis/fitfilter/Tag.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.yalantis.fitfilter;

import android.support.annotation.NonNull;

import androidx.annotation.NonNull;

import com.yalantis.filter.model.FilterModel;

Expand Down
18 changes: 9 additions & 9 deletions app/src/main/res/layout/activity_example.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.design.widget.AppBarLayout
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
Expand All @@ -20,7 +20,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v7.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_centerVertical="true"
Expand All @@ -35,7 +35,7 @@
android:textColor="@android:color/white"
android:textSize="20sp" />

<android.support.v7.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentRight="true"
Expand All @@ -45,16 +45,16 @@

</RelativeLayout>

</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#E4E6E3"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -67,4 +67,4 @@
android:layout_height="wrap_content" />

</FrameLayout>
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
6 changes: 3 additions & 3 deletions app/src/main/res/layout/item_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
android:layout_marginRight="16dp"
android:background="#ebebeb" />

<android.support.v7.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/view_likes"
android:layout_width="24dp"
android:layout_height="24dp"
Expand All @@ -104,7 +104,7 @@
android:textColor="#827f93"
android:textSize="12sp" />

<android.support.v7.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/view_chat"
android:layout_width="24dp"
android:layout_height="24dp"
Expand All @@ -125,7 +125,7 @@
android:textColor="#827f93"
android:textSize="12sp" />

<android.support.v7.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/view_settings"
android:layout_width="24dp"
android:layout_height="24dp"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:1.0.0"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:1.7.10"
}
}

Expand Down
15 changes: 8 additions & 7 deletions filter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:1.0.0"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:1.7.10"
}
}

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
compileSdkVersion 33
buildToolsVersion "20.0.3"

defaultConfig {
minSdkVersion 18
targetSdkVersion 24
targetSdkVersion 33
versionCode 1
versionName "1.0"
}
Expand All @@ -35,7 +35,8 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:24.2.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.0.0"
implementation 'com.android.support:design:24.2.0'

implementation "org.jetbrains.kotlin:kotlin-stdlib:1.7.10"
implementation "androidx.appcompat:appcompat:1.5.1"
implementation "com.google.android.material:material:1.6.1"
}
Loading

0 comments on commit ae62a94

Please sign in to comment.