Skip to content

Commit 6c25e48

Browse files
author
GammaC0de
committed
Migrate to Jetpack
1 parent f71fddb commit 6c25e48

16 files changed

+34
-32
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ android {
1919
}
2020

2121
dependencies {
22-
implementation 'com.android.support:support-v4:23.4.0'
22+
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
2323
implementation files('libs/slf4j-android-1.6.1-RC1.jar')
2424
}

app/src/main/java/org/pyload/android/client/RemoteSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package org.pyload.android.client;
22

33
import android.os.Bundle;
4-
import android.support.v4.app.FragmentActivity;
4+
import androidx.fragment.app.FragmentActivity;
55
import android.view.MenuItem;
66

77
public class RemoteSettings extends FragmentActivity {

app/src/main/java/org/pyload/android/client/components/ExpandableListFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package org.pyload.android.client.components;
22

33

4-
import android.support.v4.app.Fragment;
4+
import androidx.fragment.app.Fragment;
55
import android.os.Bundle;
66
import android.os.Handler;
77
import android.view.ContextMenu;

app/src/main/java/org/pyload/android/client/components/FragmentPagerAdapter.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
package org.pyload.android.client.components;
1818

1919
import android.os.Parcelable;
20-
import android.support.v4.app.Fragment;
21-
import android.support.v4.app.FragmentManager;
22-
import android.support.v4.app.FragmentTransaction;
23-
import android.support.v4.view.PagerAdapter;
20+
import androidx.fragment.app.Fragment;
21+
import androidx.fragment.app.FragmentManager;
22+
import androidx.fragment.app.FragmentTransaction;
23+
import androidx.viewpager.widget.PagerAdapter;
2424
import android.util.Log;
2525
import android.view.View;
2626

2727
/**
28-
* Implementation of {@link android.support.v4.view.PagerAdapter} that
28+
* Implementation of {@link PagerAdapter} that
2929
* represents each page as a {@link Fragment} that is persistently kept in the
3030
* fragment manager as long as the user can return to the page.
3131
*/

app/src/main/java/org/pyload/android/client/components/FragmentTabsPager.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
import android.content.Context;
2424
import android.os.Bundle;
25-
import android.support.v4.app.Fragment;
26-
import android.support.v4.app.FragmentActivity;
27-
import android.support.v4.view.ViewPager;
25+
import androidx.fragment.app.Fragment;
26+
import androidx.fragment.app.FragmentActivity;
27+
import androidx.viewpager.widget.ViewPager;
2828
import android.view.View;
2929
import android.view.Window;
3030
import android.widget.TabHost;
@@ -72,8 +72,8 @@ public int getCurrentTab() {
7272
public Fragment getCurrentFragment() {
7373
return mTabsAdapter.getFragment(getCurrentTab());
7474
}
75-
76-
75+
76+
7777
/**
7878
* This is a helper class that implements the management of tabs and all
7979
* details of connecting a ViewPager with associated TabHost. It relies on a
@@ -150,16 +150,16 @@ public int getCount() {
150150
@Override
151151
public Fragment getItem(int position) {
152152
TabInfo info = mTabs.get(position);
153-
153+
154154
Fragment frag = Fragment.instantiate(mContext,
155155
info.clss.getName(), info.args);
156-
156+
157157
((TabHandler) frag).setPosition(position);
158-
158+
159159
return frag;
160160
}
161-
162-
161+
162+
163163
@Override
164164
public void onTabChanged(String tabId) {
165165
int position = mTabHost.getCurrentTab();
@@ -173,7 +173,7 @@ public void onPageScrolled(int position, float positionOffset,
173173

174174
@Override
175175
public void onPageSelected(int position) {
176-
176+
177177
Fragment pos = getFragment(position);
178178
if (pos != null)
179179
((TabHandler) pos).onSelected();

app/src/main/java/org/pyload/android/client/dialogs/AccountDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import android.app.Dialog;
55
import android.content.Context;
66
import android.os.Bundle;
7-
import android.support.v4.app.DialogFragment;
7+
import androidx.fragment.app.DialogFragment;
88
import android.view.LayoutInflater;
99
import android.view.View;
1010
import android.view.ViewGroup;

app/src/main/java/org/pyload/android/client/dialogs/CaptchaDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import android.graphics.Bitmap;
1212
import android.graphics.BitmapFactory;
1313
import android.os.Bundle;
14-
import android.support.v4.app.DialogFragment;
14+
import androidx.fragment.app.DialogFragment;
1515
import android.view.LayoutInflater;
1616
import android.view.View;
1717
import android.view.View.OnClickListener;

app/src/main/java/org/pyload/android/client/dialogs/FileInfoDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import android.app.Dialog;
88
import android.os.Bundle;
9-
import android.support.v4.app.DialogFragment;
9+
import androidx.fragment.app.DialogFragment;
1010
import android.view.LayoutInflater;
1111
import android.view.View;
1212
import android.view.ViewGroup;

app/src/main/java/org/pyload/android/client/fragments/ConfigSectionFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import android.content.Context;
1414
import android.graphics.Color;
1515
import android.os.Bundle;
16-
import android.support.v4.app.Fragment;
16+
import androidx.fragment.app.Fragment;
1717
import android.text.InputType;
1818
import android.text.method.PasswordTransformationMethod;
1919
import android.util.Log;

app/src/main/java/org/pyload/android/client/fragments/OverviewFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
import android.net.Uri;
2727
import android.os.Bundle;
2828
import android.os.Handler;
29-
import android.support.v4.app.ListFragment;
30-
import android.support.v4.app.NotificationCompat;
29+
import androidx.fragment.app.ListFragment;
30+
import androidx.core.app.NotificationCompat;
3131
import android.util.Log;
3232
import android.view.ContextMenu;
3333
import android.view.ContextMenu.ContextMenuInfo;

0 commit comments

Comments
 (0)