Updated hide fragment layout and design of the filter window
This commit is contained in:
parent
dad52724db
commit
169e9ab5ad
@ -56,6 +56,7 @@
|
||||
|
||||
<activity
|
||||
android:name="a.i"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:exported="true" />
|
||||
|
||||
<activity-alias
|
||||
|
@ -2,7 +2,9 @@ package com.topjohnwu.magisk.redesign.hide
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Insets
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import com.topjohnwu.magisk.R
|
||||
import com.topjohnwu.magisk.databinding.FragmentHideMd2Binding
|
||||
@ -19,14 +21,18 @@ class HideFragment : CompatFragment<HideViewModel, FragmentHideMd2Binding>() {
|
||||
override fun onAttach(context: Context) {
|
||||
super.onAttach(context)
|
||||
activity.setTitle(R.string.magiskhide)
|
||||
setHasOptionsMenu(true)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
binding.hideActionScrollUp.setOnClickListener {
|
||||
binding.hideScrollContainer.fullScroll(View.FOCUS_UP)
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
inflater.inflate(R.menu.menu_hide_md2, menu)
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
when (item.itemId) {
|
||||
R.id.action_focus_up -> binding.hideScrollContainer.fullScroll(View.FOCUS_UP)
|
||||
}
|
||||
return super.onOptionsItemSelected(item)
|
||||
}
|
||||
|
||||
}
|
@ -1,10 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<group
|
||||
android:pivotX="256"
|
||||
android:pivotY="256"
|
||||
android:rotation="180">
|
||||
<path
|
||||
android:fillColor="?colorOnSurface"
|
||||
android:pathData="M16.59,9.42L12,4.83L7.41,9.42L6,8L12,2L18,8L16.59,9.42M16.59,15.42L12,10.83L7.41,15.42L6,14L12,8L18,14L16.59,15.42M16.59,21.42L12,16.83L7.41,21.42L6,20L12,14L18,20L16.59,21.42Z" />
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="m256.238,430.145 l-89.77,-94.898 29.059,-27.488 60.633,64.098 60.273,-64.059 29.133,27.41zM422,392v-272c0,-66.168 -53.832,-120 -120,-120h-92c-66.168,0 -120,53.832 -120,120v272c0,66.168 53.832,120 120,120h92c66.168,0 120,-53.832 120,-120zM302,40c44.113,0 80,35.887 80,80v272c0,44.113 -35.887,80 -80,80h-92c-44.113,0 -80,-35.887 -80,-80v-272c0,-44.113 35.887,-80 80,-80zM256,81c-11.047,0 -20,8.953 -20,20s8.953,20 20,20 20,-8.953 20,-20 -8.953,-20 -20,-20zM256,161c-11.047,0 -20,8.953 -20,20s8.953,20 20,20 20,-8.953 20,-20 -8.953,-20 -20,-20zM256,241c-11.047,0 -20,8.953 -20,20s8.953,20 20,20 20,-8.953 20,-20 -8.953,-20 -20,-20zM256,241" />
|
||||
</group>
|
||||
</vector>
|
@ -36,7 +36,7 @@
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?styleCardVariant"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
app:cardCornerRadius="24dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:layout_marginEnd="@dimen/l1">
|
||||
@ -99,6 +99,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/l1"
|
||||
app:cardCornerRadius="24dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/hide_filter_barrier"
|
||||
@ -170,18 +171,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/hide_action_scroll_up"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:layout_marginBottom="@{viewModel.insets.bottom + (int) @dimen/l1}"
|
||||
app:backgroundTint="?colorSurface"
|
||||
app:srcCompat="@drawable/ic_up_md2"
|
||||
app:tint="?colorOnSurface"
|
||||
tools:layout_marginBottom="64dp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</layout>
|
9
app/src/main/res/menu/menu_hide_md2.xml
Normal file
9
app/src/main/res/menu/menu_hide_md2.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/action_focus_up"
|
||||
android:icon="@drawable/ic_up_md2"
|
||||
android:title="@string/hide_scroll_up"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
@ -80,5 +80,6 @@
|
||||
<string name="superuser_toggle_revoke">Revoke</string>
|
||||
|
||||
<string name="hide_filter_hint">Filter by name</string>
|
||||
<string name="hide_scroll_up">Scroll up</string>
|
||||
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user