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

Fix and upgrade many things #22

Open
wants to merge 22 commits 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
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Read how we did it [on our blog](https://yalantis.com/blog/develop-filter-animat
<img src="gif/dribbble.gif"/>

##Requirements
- Android SDK 18+
- Android SDK 19+

##Usage

Expand All @@ -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
22 changes: 13 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
compileSdkVersion 28

defaultConfig {
applicationId "com.yalantis.fitfilter"
minSdkVersion 18
targetSdkVersion 24
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
Expand All @@ -20,9 +19,14 @@ android {
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.facebook.fresco:fresco:0.13.0'
compile 'com.android.support:design:24.2.0'
compile project(':filter')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation ('com.facebook.fresco:fresco:1.13.0') {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
}
implementation 'com.google.android.material:material:1.0.0'
implementation "org.jetbrains:annotations:15.0"
implementation project(':filter')
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
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 androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;

import android.view.View;

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

import android.graphics.Color;
import android.os.Bundle;
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.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 Expand Up @@ -55,7 +55,7 @@ protected void onCreate(Bundle savedInstanceState) {


mRecyclerView = (RecyclerView) findViewById(R.id.list);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
mRecyclerView.setLayoutManager(new LinearLayoutManager(this, RecyclerView.VERTICAL, false));
mRecyclerView.setAdapter(mAdapter = new QuestionsAdapter(this, mAllQuestions = getQuestions()));
mRecyclerView.setItemAnimator(new FiltersListItemAnimator());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

import android.content.Context;
import android.graphics.drawable.GradientDrawable;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;

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


import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
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
14 changes: 11 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.0"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:1.0.0"
classpath 'com.android.tools.build:gradle:3.4.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.31"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:1.3.31"
}
}

allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}

Expand Down
25 changes: 7 additions & 18 deletions filter/build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
apply plugin: 'com.android.library'

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.0"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:1.0.0"
}
}

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

android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
compileSdkVersion 28

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

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:24.2.0'
compile "org.jetbrains.kotlin:kotlin-stdlib:1.0.0"
compile 'com.android.support:design:24.2.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.31"
implementation 'com.google.android.material:material:1.0.0'
}
2 changes: 1 addition & 1 deletion filter/src/main/java/com/yalantis/filter/Constant.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ package com.yalantis.filter
*/
object Constant {

val ANIMATION_DURATION: Long = 400
const val ANIMATION_DURATION: Long = 400

}
Loading