[app] Fix install dialog empty state (#607)

Co-authored-by: tehcneko <7764726+tehcneko@users.noreply.github.com>
This commit is contained in:
LoveSy 2021-05-17 17:20:42 +08:00 committed by GitHub
parent feadd30608
commit 7de566cd2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 1 deletions

View File

@ -73,6 +73,7 @@ import org.lsposed.manager.ConfigManager;
import org.lsposed.manager.R;
import org.lsposed.manager.adapters.AppHelper;
import org.lsposed.manager.databinding.ActivityModuleDetailBinding;
import org.lsposed.manager.databinding.DialogRecyclerviewBinding;
import org.lsposed.manager.databinding.ItemModuleBinding;
import org.lsposed.manager.databinding.ItemRepoRecyclerviewBinding;
import org.lsposed.manager.repo.RepoLoader;
@ -149,7 +150,7 @@ public class ModulesActivity extends BaseActivity implements ModuleUtil.ModuleLi
var userId = adapters.get(position).getUserId();
pickAdaptor.setFilter(m -> !snapshot.contains(m.packageName));
pickAdaptor.refresh();
var v = new RecyclerView(ModulesActivity.this);
var v = DialogRecyclerviewBinding.inflate(getLayoutInflater()).getRoot();
v.setAdapter(pickAdaptor);
v.setLayoutManager(new LinearLayoutManagerFix(ModulesActivity.this));
var dialog = new AlertDialog.Builder(ModulesActivity.this)

View File

@ -0,0 +1,25 @@
<!--
~ This file is part of LSPosed.
~
~ LSPosed is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ LSPosed is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2021 LSPosed Contributors
-->
<org.lsposed.manager.ui.widget.EmptyStateRecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:minHeight="?attr/listPreferredItemHeight" />