mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-15 22:33:05 -08:00
Force reload modules, added view if modules are not found, show progress dialog when granting root
This commit is contained in:
@@ -9,6 +9,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.topjohnwu.magisk.module.Module;
|
||||
import com.topjohnwu.magisk.rv.ItemClickListener;
|
||||
@@ -22,6 +23,7 @@ import butterknife.ButterKnife;
|
||||
public abstract class BaseModuleFragment extends Fragment {
|
||||
|
||||
@BindView(R.id.recyclerView) RecyclerView recyclerView;
|
||||
@BindView(R.id.empty_rv) TextView emptyTv;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
@@ -29,6 +31,13 @@ public abstract class BaseModuleFragment extends Fragment {
|
||||
View view = inflater.inflate(R.layout.single_module_fragment, container, false);
|
||||
ButterKnife.bind(this, view);
|
||||
|
||||
if (listModules().size() == 0) {
|
||||
emptyTv.setVisibility(View.VISIBLE);
|
||||
recyclerView.setVisibility(View.GONE);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
recyclerView.setAdapter(new ModulesAdapter(listModules(), new ItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(View view, int position) {
|
||||
|
||||
Reference in New Issue
Block a user