From abfc49aed0933ece50d58f1118096f169ca7dc66 Mon Sep 17 00:00:00 2001 From: zt515 Date: Fri, 3 Nov 2017 02:18:50 +0800 Subject: [PATCH] UI: prepare for advanced package manager --- .../component/setup/BaseFileInstaller.java | 1 + .../neoterm/ui/pm/PackageManagerActivity.kt | 4 +- .../res/layout/layout_pm_package_list.xml | 18 +++++++++ app/src/main/res/layout/ui_pm.xml | 39 ++++++++++++------- app/src/main/res/layout/ui_pm_single_tab.xml | 19 +++++++++ app/src/main/res/values/dimens.xml | 1 + 6 files changed, 65 insertions(+), 17 deletions(-) create mode 100644 app/src/main/res/layout/layout_pm_package_list.xml create mode 100644 app/src/main/res/layout/ui_pm_single_tab.xml diff --git a/app/src/main/java/io/neoterm/component/setup/BaseFileInstaller.java b/app/src/main/java/io/neoterm/component/setup/BaseFileInstaller.java index fb317c6..d4b6818 100644 --- a/app/src/main/java/io/neoterm/component/setup/BaseFileInstaller.java +++ b/app/src/main/java/io/neoterm/component/setup/BaseFileInstaller.java @@ -130,6 +130,7 @@ public final class BaseFileInstaller { if (symlinks.isEmpty()) throw new RuntimeException("No SYMLINKS.txt encountered"); for (Pair symlink : symlinks) { + NLog.INSTANCE.e("Setup", "Linking " + symlink.first + " to " + symlink.second); Os.symlink(symlink.first, symlink.second); } diff --git a/app/src/main/java/io/neoterm/ui/pm/PackageManagerActivity.kt b/app/src/main/java/io/neoterm/ui/pm/PackageManagerActivity.kt index 630b06f..0d047e0 100644 --- a/app/src/main/java/io/neoterm/ui/pm/PackageManagerActivity.kt +++ b/app/src/main/java/io/neoterm/ui/pm/PackageManagerActivity.kt @@ -49,12 +49,12 @@ class PackageManagerActivity : AppCompatActivity(), SearchView.OnQueryTextListen override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setContentView(R.layout.ui_pm) + setContentView(R.layout.ui_pm_single_tab) val toolbar = findViewById(R.id.pm_toolbar) setSupportActionBar(toolbar) supportActionBar?.setDisplayHomeAsUpEnabled(true) - recyclerView = findViewById(R.id.package_list) + recyclerView = findViewById(R.id.pm_package_list) recyclerView.setHasFixedSize(true) adapter = PackageAdapter(this, COMPARATOR, object : PackageAdapter.Listener { override fun onModelClicked(model: PackageModel) { diff --git a/app/src/main/res/layout/layout_pm_package_list.xml b/app/src/main/res/layout/layout_pm_package_list.xml new file mode 100644 index 0000000..b221567 --- /dev/null +++ b/app/src/main/res/layout/layout_pm_package_list.xml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/ui_pm.xml b/app/src/main/res/layout/ui_pm.xml index 1878d90..512b6e8 100644 --- a/app/src/main/res/layout/ui_pm.xml +++ b/app/src/main/res/layout/ui_pm.xml @@ -1,27 +1,36 @@ - - + android:layout_height="wrap_content" + android:orientation="vertical"> - + + + + + + android:layout_below="@id/pm_tab_header"/> - + diff --git a/app/src/main/res/layout/ui_pm_single_tab.xml b/app/src/main/res/layout/ui_pm_single_tab.xml new file mode 100644 index 0000000..a3f02d4 --- /dev/null +++ b/app/src/main/res/layout/ui_pm_single_tab.xml @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 6fedbc9..dcaf36f 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -13,6 +13,7 @@ 24dp 4dp 48dp + 48dp 16dp 4dp