Skip to content

Commit

Permalink
Migrate to AndroidX
Browse files Browse the repository at this point in the history
  • Loading branch information
gdingenen committed Sep 9, 2020
1 parent 65e620a commit 34b7ef7
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=emilsjolander
POM_DEVELOPER_NAME=Emil Sjolander
POM_DEVELOPER_EMAIL[email protected]
android.useAndroidX=true
android.enableJetifier=true
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apply plugin: 'com.android.library'

dependencies {
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.android.support:customview:28.0.0'
implementation 'androidx.annotation:annotation:1.0.0'
implementation 'androidx.customview:customview:1.0.0'
}

android {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.v4.view.AbsSavedState;
import androidx.customview.view.AbsSavedState;
import android.util.AttributeSet;
import android.view.View;
import java.util.ArrayList;
Expand Down
4 changes: 2 additions & 2 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ repositories {

dependencies {
compile project(':library')
compile 'com.android.support:appcompat-v7:28.0.0'
compile 'com.android.support:support-v4:28.0.0'
compile 'androidx.appcompat:appcompat:1.0.0'
compile 'androidx.legacy:legacy-support-v4:1.0.0'
compile 'com.nineoldandroids:library:2.4.0'
}

Expand Down
8 changes: 4 additions & 4 deletions sample/res/layout/main.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<android.support.v4.widget.DrawerLayout
<androidx.drawerlayout.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
Expand All @@ -9,7 +9,7 @@
android:layout_height="match_parent"
android:orientation="vertical">

<android.support.v4.widget.SwipeRefreshLayout
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
Expand All @@ -25,7 +25,7 @@
android:fastScrollEnabled="true"
android:overScrollMode="never"/>

</android.support.v4.widget.SwipeRefreshLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

<TextView
android:id="@+id/empty"
Expand Down Expand Up @@ -124,4 +124,4 @@
android:checked="true"/>
</LinearLayout>
</ScrollView>
</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.ActionBarActivity;

import androidx.appcompat.app.AppCompatActivity;
import androidx.legacy.app.ActionBarDrawerToggle;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
Expand All @@ -23,7 +24,7 @@
/**
* @author Emil Sjölander
*/
public class TestActivity extends ActionBarActivity implements
public class TestActivity extends AppCompatActivity implements
AdapterView.OnItemClickListener, StickyListHeadersListView.OnHeaderClickListener,
StickyListHeadersListView.OnStickyHeaderOffsetChangedListener,
StickyListHeadersListView.OnStickyHeaderChangedListener {
Expand Down

0 comments on commit 34b7ef7

Please sign in to comment.