From 436b0624e78d0818e25d1ee92335b52335dfc9e3 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 8 Nov 2016 00:09:08 +0800 Subject: [PATCH] Seperate adapters into a package --- app/src/main/java/com/topjohnwu/magisk/MagiskHideFragment.java | 1 + app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java | 1 + app/src/main/java/com/topjohnwu/magisk/ReposFragment.java | 2 ++ .../topjohnwu/magisk/{ => adapters}/ApplicationAdapter.java | 3 ++- .../com/topjohnwu/magisk/{ => adapters}/ModulesAdapter.java | 3 ++- .../java/com/topjohnwu/magisk/{ => adapters}/ReposAdapter.java | 3 ++- .../{ => adapters}/SimpleSectionedRecyclerViewAdapter.java | 2 +- 7 files changed, 11 insertions(+), 4 deletions(-) rename app/src/main/java/com/topjohnwu/magisk/{ => adapters}/ApplicationAdapter.java (97%) rename app/src/main/java/com/topjohnwu/magisk/{ => adapters}/ModulesAdapter.java (98%) rename app/src/main/java/com/topjohnwu/magisk/{ => adapters}/ReposAdapter.java (99%) rename app/src/main/java/com/topjohnwu/magisk/{ => adapters}/SimpleSectionedRecyclerViewAdapter.java (99%) diff --git a/app/src/main/java/com/topjohnwu/magisk/MagiskHideFragment.java b/app/src/main/java/com/topjohnwu/magisk/MagiskHideFragment.java index b75303ac4..94fac596f 100644 --- a/app/src/main/java/com/topjohnwu/magisk/MagiskHideFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/MagiskHideFragment.java @@ -11,6 +11,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import com.topjohnwu.magisk.adapters.ApplicationAdapter; import com.topjohnwu.magisk.utils.Async; import com.topjohnwu.magisk.utils.Shell; diff --git a/app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java b/app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java index 6a138319c..612630105 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java @@ -16,6 +16,7 @@ import android.view.ViewGroup; import android.widget.TextView; import com.ipaulpro.afilechooser.utils.FileUtils; +import com.topjohnwu.magisk.adapters.ModulesAdapter; import com.topjohnwu.magisk.module.Module; import com.topjohnwu.magisk.utils.Async; import com.topjohnwu.magisk.utils.Logger; diff --git a/app/src/main/java/com/topjohnwu/magisk/ReposFragment.java b/app/src/main/java/com/topjohnwu/magisk/ReposFragment.java index f320c73c9..c9863f690 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ReposFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ReposFragment.java @@ -16,6 +16,8 @@ import android.view.ViewGroup; import android.widget.SearchView; import android.widget.TextView; +import com.topjohnwu.magisk.adapters.ReposAdapter; +import com.topjohnwu.magisk.adapters.SimpleSectionedRecyclerViewAdapter; import com.topjohnwu.magisk.module.Repo; import com.topjohnwu.magisk.utils.Async; import com.topjohnwu.magisk.utils.Logger; diff --git a/app/src/main/java/com/topjohnwu/magisk/ApplicationAdapter.java b/app/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java similarity index 97% rename from app/src/main/java/com/topjohnwu/magisk/ApplicationAdapter.java rename to app/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java index 9be829678..8d7f45903 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ApplicationAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java @@ -1,4 +1,4 @@ -package com.topjohnwu.magisk; +package com.topjohnwu.magisk.adapters; import android.content.Context; import android.content.pm.ApplicationInfo; @@ -13,6 +13,7 @@ import android.widget.CheckBox; import android.widget.ImageView; import android.widget.TextView; +import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.utils.Async; import java.util.Arrays; diff --git a/app/src/main/java/com/topjohnwu/magisk/ModulesAdapter.java b/app/src/main/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java similarity index 98% rename from app/src/main/java/com/topjohnwu/magisk/ModulesAdapter.java rename to app/src/main/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java index 79f17e367..70db85832 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ModulesAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java @@ -1,4 +1,4 @@ -package com.topjohnwu.magisk; +package com.topjohnwu.magisk.adapters; import android.content.Context; import android.os.AsyncTask; @@ -13,6 +13,7 @@ import android.widget.CheckBox; import android.widget.ImageView; import android.widget.TextView; +import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.module.Module; import com.topjohnwu.magisk.utils.Shell; diff --git a/app/src/main/java/com/topjohnwu/magisk/ReposAdapter.java b/app/src/main/java/com/topjohnwu/magisk/adapters/ReposAdapter.java similarity index 99% rename from app/src/main/java/com/topjohnwu/magisk/ReposAdapter.java rename to app/src/main/java/com/topjohnwu/magisk/adapters/ReposAdapter.java index 33c8708c7..b37419599 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ReposAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/adapters/ReposAdapter.java @@ -1,4 +1,4 @@ -package com.topjohnwu.magisk; +package com.topjohnwu.magisk.adapters; import android.animation.Animator; import android.animation.ObjectAnimator; @@ -19,6 +19,7 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.module.Repo; import com.topjohnwu.magisk.receivers.DownloadReceiver; import com.topjohnwu.magisk.utils.Async; diff --git a/app/src/main/java/com/topjohnwu/magisk/SimpleSectionedRecyclerViewAdapter.java b/app/src/main/java/com/topjohnwu/magisk/adapters/SimpleSectionedRecyclerViewAdapter.java similarity index 99% rename from app/src/main/java/com/topjohnwu/magisk/SimpleSectionedRecyclerViewAdapter.java rename to app/src/main/java/com/topjohnwu/magisk/adapters/SimpleSectionedRecyclerViewAdapter.java index 9b2295f51..710c2b236 100644 --- a/app/src/main/java/com/topjohnwu/magisk/SimpleSectionedRecyclerViewAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/adapters/SimpleSectionedRecyclerViewAdapter.java @@ -1,4 +1,4 @@ -package com.topjohnwu.magisk; +package com.topjohnwu.magisk.adapters; import android.content.Context; import android.support.v7.widget.RecyclerView;