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

Update project #50

Open
wants to merge 2 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
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Check this [project on Behance] (https://www.behance.net/gallery/20411445/Mobile

1. Include the library as local library project.

``` compile 'com.yalantis:phoenix:1.2.3' ```
``` implementation 'com.yalantis:phoenix:1.2.4' ```

2. Include the PullToRefreshView widget in your layout.

Expand Down Expand Up @@ -69,6 +69,11 @@ If you need to change progress state:

# Changelog

### Version: 1.2.4

* Update dependencies
* Migrate to AndroidX

### Version: 1.2

* Sample updated with RecyclerView example
Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha1'
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

Expand All @@ -16,6 +17,7 @@ allprojects {
group = GROUP

repositories {
google()
mavenCentral()
}
}
Expand Down
8 changes: 6 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

VERSION_NAME=1.2.3
VERSION_CODE=8
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

VERSION_NAME=1.2.4
VERSION_CODE=9
GROUP=com.yalantis

POM_DESCRIPTION=Android Library to add beautiful Pull-to-Refresh widget
Expand Down
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Nov 30 13:15:11 EET 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
18 changes: 9 additions & 9 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
compileSdkVersion 33
buildToolsVersion '30.0.3'

defaultConfig {
minSdkVersion 9
targetSdkVersion 23
versionCode 8
versionName "1.2.3"
targetSdkVersion 33
versionCode 9
versionName "1.2.4"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:23.1.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.appcompat:appcompat:1.5.1"
}

apply from: '../mavenpush.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

import android.content.Context;
import android.content.res.TypedArray;
import android.support.annotation.NonNull;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
Expand All @@ -17,6 +14,10 @@
import android.widget.AbsListView;
import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.core.view.MotionEventCompat;
import androidx.core.view.ViewCompat;

import com.yalantis.phoenix.refresh_view.BaseRefreshView;
import com.yalantis.phoenix.refresh_view.SunRefreshView;
import com.yalantis.phoenix.util.Utils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import android.graphics.PixelFormat;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;

import androidx.annotation.NonNull;

import com.yalantis.phoenix.PullToRefreshView;

Expand Down
54 changes: 30 additions & 24 deletions mavenpush.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'

def sonatypeRepositoryUrl
Expand All @@ -21,51 +21,57 @@ def getRepositoryPassword() {
}

afterEvaluate { project ->
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

pom.artifactId = POM_ARTIFACT_ID
publishing {
publications {
mavenJava(MavenPublication) {

repository(url: sonatypeRepositoryUrl) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
artifactId = POM_ARTIFACT_ID

pom.project {
name POM_NAME
packaging POM_PACKAGING
description POM_DESCRIPTION
url POM_URL
pom {
name = POM_NAME
packaging = POM_PACKAGING
description = POM_DESCRIPTION
url = POM_URL

scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
url = POM_SCM_URL
connection = POM_SCM_CONNECTION
developerConnection = POM_SCM_DEV_CONNECTION
}

licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
name = POM_LICENCE_NAME
url = POM_LICENCE_URL
distribution = POM_LICENCE_DIST
}
}

developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
id = POM_DEVELOPER_ID
name = POM_DEVELOPER_NAME
}
}
}
}
}

repositories {
maven {
url = sonatypeRepositoryUrl

credentials {
username = getRepositoryUsername()
password = getRepositoryPassword()
}
}
}
}

signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
sign publishing.publications.mavenJava
}

task androidJavadocs(type: Javadoc) {
Expand Down
23 changes: 12 additions & 11 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
compileSdkVersion 33
buildToolsVersion '30.0.3'

defaultConfig {
applicationId "com.yalantis.phoenix.sample"
minSdkVersion 9
targetSdkVersion 23
versionCode 2
versionName "2.0"
minSdkVersion 14
targetSdkVersion 33
versionCode 3
versionName "2.1"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile project(':library')
implementation project(':library')

implementation "com.google.android.material:material:1.6.1"
implementation "androidx.recyclerview:recyclerview:1.2.1"
}
3 changes: 2 additions & 1 deletion sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<activity
android:name=".PullToRefreshActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
android:screenOrientation="fullSensor"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.yalantis.phoenix.sample;

import android.os.Bundle;
import android.support.v4.app.Fragment;

import androidx.fragment.app.Fragment;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.ListView;

import androidx.annotation.NonNull;

import com.yalantis.phoenix.PullToRefreshView;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.yalantis.phoenix.sample;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;

import com.google.android.material.tabs.TabLayout;

/**
* Created by Oleksii Shliama.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package com.yalantis.phoenix.sample;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.yalantis.phoenix.PullToRefreshView;

import java.util.Map;
Expand Down
6 changes: 3 additions & 3 deletions sample/src/main/res/layout/activity_pull_to_refresh.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
android:layout_height="match_parent"
android:orientation="vertical">

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"/>

<android.support.design.widget.TabLayout
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

<android.support.v4.view.ViewPager
<androidx.viewpager.widget.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/res/layout/fragment_recycler_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down