[app] Update home design (#1076)
This commit is contained in:
parent
a13bceb731
commit
6c170ab4eb
|
|
@ -51,6 +51,7 @@ import org.lsposed.manager.util.chrome.LinkTransformationMethod;
|
|||
import java.util.Locale;
|
||||
|
||||
import rikka.core.res.ResourcesKt;
|
||||
import rikka.widget.borderview.BorderView;
|
||||
|
||||
public class HomeFragment extends BaseFragment {
|
||||
|
||||
|
|
@ -69,10 +70,12 @@ public class HomeFragment extends BaseFragment {
|
|||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
FragmentMainBinding mainBinding = FragmentMainBinding.inflate(inflater, container, false);
|
||||
snackbar = mainBinding.snackbar;
|
||||
binding = FragmentHomeBinding.bind(mainBinding.snackbar);
|
||||
return mainBinding.getRoot();
|
||||
binding = FragmentHomeBinding.inflate(inflater, container, false);
|
||||
|
||||
setupToolbar(binding.toolbar, R.string.app_name);
|
||||
binding.toolbar.setNavigationIcon(null);
|
||||
binding.nestedScrollView.getBorderViewDelegate().setBorderVisibilityChangedListener((top, oldTop, bottom, oldBottom) -> binding.appBar.setRaised(!top));
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -109,9 +112,6 @@ public class HomeFragment extends BaseFragment {
|
|||
.setView(binding.getRoot())
|
||||
.show();
|
||||
});
|
||||
Glide.with(binding.appIcon)
|
||||
.load(wrap(activity.getApplicationInfo(), getResources().getConfiguration().hashCode()))
|
||||
.into(binding.appIcon);
|
||||
int cardBackgroundColor;
|
||||
if (isBinderAlive) {
|
||||
if (!ConfigManager.isSepolicyLoaded()) {
|
||||
|
|
@ -151,7 +151,7 @@ public class HomeFragment extends BaseFragment {
|
|||
binding.download.setVisibility(View.GONE);
|
||||
}
|
||||
binding.statusIcon.setImageResource(R.drawable.ic_error);
|
||||
Snackbar.make(snackbar, R.string.lsposed_not_active, Snackbar.LENGTH_INDEFINITE).show();
|
||||
Snackbar.make(binding.snackbar, R.string.lsposed_not_active, Snackbar.LENGTH_INDEFINITE).show();
|
||||
}
|
||||
binding.status.setCardBackgroundColor(cardBackgroundColor);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
|
|
@ -172,7 +172,7 @@ public class HomeFragment extends BaseFragment {
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
if (requireInstalled && !ConfigManager.isBinderAlive()) {
|
||||
Snackbar.make(snackbar, R.string.lsposed_not_active, Snackbar.LENGTH_LONG).show();
|
||||
Snackbar.make(binding.snackbar, R.string.lsposed_not_active, Snackbar.LENGTH_LONG).show();
|
||||
} else {
|
||||
getNavController().navigate(fragment);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ import static android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS;
|
|||
import static androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy.PREVENT_WHEN_EMPTY;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ import android.widget.TextView;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ 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
|
||||
-->
|
||||
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/ic_launcher_background" />
|
||||
<size
|
||||
android:width="32dp"
|
||||
android:height="32dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:width="32dp"
|
||||
android:height="32dp">
|
||||
<inset
|
||||
android:inset="-8dp"
|
||||
android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</item>
|
||||
</layer-list>
|
||||
|
|
@ -18,23 +18,53 @@
|
|||
~ Copyright (C) 2021 LSPosed Contributors
|
||||
-->
|
||||
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/snackbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:consumeSystemWindowsInsets="start|end"
|
||||
app:edgeToEdge="true"
|
||||
app:fitsSystemWindowsInsets="start|end">
|
||||
|
||||
<rikka.material.widget.AppBarLayout
|
||||
android:id="@+id/app_bar"
|
||||
style="?appBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
app:logo="@drawable/ic_launcher"
|
||||
app:contentInsetStart="24dp"
|
||||
app:titleMarginStart="48dp"
|
||||
app:subtitleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle"
|
||||
app:titleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Title"
|
||||
app:popupTheme="?actionBarPopupTheme" />
|
||||
|
||||
</rikka.material.widget.AppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false"
|
||||
android:paddingTop="?actionBarSize"
|
||||
app:fitsSystemWindowsInsets="top|bottom"
|
||||
tools:ignore="MissingPrefix">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
<rikka.widget.borderview.BorderNestedScrollView
|
||||
android:id="@+id/nestedScrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="none">
|
||||
app:borderTopVisibility="whenTop"
|
||||
app:borderTopDrawable="@null"
|
||||
app:borderBottomVisibility="never">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -43,61 +73,22 @@
|
|||
android:orientation="vertical"
|
||||
tools:context=".ui.activity.MainActivity">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/app_icon"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="16dp"
|
||||
android:contentDescription="@string/app_name" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_toEndOf="@id/app_icon"
|
||||
android:contentDescription="@string/app_name"
|
||||
android:text="@string/app_name"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textSize="20sp"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
</RelativeLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
app:cardBackgroundColor="#4CAF50"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
style="@style/HomeItem.Primary">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="18dp"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingEnd="18dp"
|
||||
android:paddingBottom="20dp">
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/status_icon"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerVertical="true"
|
||||
app:srcCompat="@drawable/ic_check_circle"
|
||||
app:tint="?android:attr/textColorPrimaryInverse" />
|
||||
|
|
@ -106,9 +97,11 @@
|
|||
android:id="@+id/status_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_toEndOf="@id/status_icon"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="16sp"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorPrimaryInverse" />
|
||||
|
||||
<TextView
|
||||
|
|
@ -117,8 +110,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/status_title"
|
||||
android:layout_alignStart="@id/status_title"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorPrimaryInverse" />
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
|
@ -127,29 +119,18 @@
|
|||
android:id="@+id/modules"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:outlineAmbientShadowColor="#3A000000"
|
||||
android:outlineSpotShadowColor="#3A000000"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
style="@style/HomeItem.Secondary">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="18dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="18dp"
|
||||
android:paddingBottom="16dp">
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="12dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/modules_icon"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:contentDescription="@string/Modules"
|
||||
app:srcCompat="@drawable/ic_extension" />
|
||||
|
|
@ -158,10 +139,11 @@
|
|||
android:id="@+id/modules_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_toEndOf="@id/modules_icon"
|
||||
android:text="@string/Modules"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
android:textSize="16sp"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/modules_summary"
|
||||
|
|
@ -169,9 +151,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/modules_title"
|
||||
android:layout_alignStart="@id/modules_title"
|
||||
android:layout_marginTop="2dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="@android:color/darker_gray" />
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
|
@ -179,29 +159,18 @@
|
|||
android:id="@+id/download"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:outlineAmbientShadowColor="#3A000000"
|
||||
android:outlineSpotShadowColor="#3A000000"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
style="@style/HomeItem.Secondary">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="18dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="18dp"
|
||||
android:paddingBottom="16dp">
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="12dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/download_icon"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:contentDescription="@string/module_repo"
|
||||
app:srcCompat="@drawable/ic_get_app" />
|
||||
|
|
@ -210,10 +179,11 @@
|
|||
android:id="@+id/download_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_toEndOf="@id/download_icon"
|
||||
android:text="@string/module_repo"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
android:textSize="16sp"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/download_summary"
|
||||
|
|
@ -221,10 +191,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/download_title"
|
||||
android:layout_alignStart="@id/download_title"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="@string/module_repo_summary"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="@android:color/darker_gray" />
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
|
@ -232,84 +200,65 @@
|
|||
android:id="@+id/logs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/item_background_round_nopadding"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="horizontal"
|
||||
android:padding="18dp">
|
||||
style="@style/HomeItem.Tertiary">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@string/Logs"
|
||||
app:srcCompat="@drawable/ic_assignment" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:text="@string/Logs"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
android:textSize="16sp"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/item_background_round_nopadding"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="horizontal"
|
||||
android:padding="18dp">
|
||||
style="@style/HomeItem.Tertiary">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@string/Settings"
|
||||
app:srcCompat="@drawable/ic_settings" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:text="@string/Settings"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
android:textAppearance="?android:attr/textAppearanceListItem" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/about"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/item_background_round_nopadding"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="horizontal"
|
||||
android:padding="18dp">
|
||||
style="@style/HomeItem.Tertiary">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@string/About"
|
||||
app:srcCompat="@drawable/ic_info" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:text="@string/About"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
|
||||
android:textSize="16sp"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</rikka.widget.borderview.BorderNestedScrollView>
|
||||
</FrameLayout>
|
||||
</merge>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
|||
|
|
@ -22,4 +22,7 @@
|
|||
|
||||
<color name="ic_launcher_foreground">@color/material_pink_300</color>
|
||||
<color name="ic_launcher_background">@color/material_light_blue_50</color>
|
||||
|
||||
<color name="home_primary_outline_ambient_shadow_color">@color/material_grey_700</color>
|
||||
<color name="home_primary_outline_spot_shadow_color">@color/material_grey_600</color>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
<!--
|
||||
~ 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
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<dimen name="home_primary_elevation">12dp</dimen>
|
||||
<dimen name="home_secondary_elevation">8dp</dimen>
|
||||
</resources>
|
||||
|
|
@ -25,4 +25,7 @@
|
|||
|
||||
<color name="ic_launcher_foreground">@android:color/white</color>
|
||||
<color name="ic_launcher_background">@color/material_pink_200</color>
|
||||
|
||||
<color name="home_secondary_outline_ambient_shadow_color">@color/material_grey_500</color>
|
||||
<color name="home_secondary_outline_spot_shadow_color">@color/material_grey_300</color>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -22,4 +22,7 @@
|
|||
<dimen name="app_icon_size">48dp</dimen>
|
||||
<dimen name="tab_layout_height">48dp</dimen>
|
||||
<dimen name="colorpickerpreference_widget_size">32dp</dimen>
|
||||
|
||||
<dimen name="home_primary_elevation">6dp</dimen>
|
||||
<dimen name="home_secondary_elevation">2dp</dimen>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
~ Copyright (C) 2021 LSPosed Contributors
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<style name="Base.AppTheme.Light" parent="Theme.Material.Light.LightStatusBar">
|
||||
<item name="android:statusBarColor">?android:colorBackground</item>
|
||||
|
|
@ -128,4 +128,35 @@
|
|||
<item name="android:paddingBottom">24dp</item>
|
||||
</style>
|
||||
|
||||
<style name="HomeItem">
|
||||
<item name="android:layout_marginHorizontal">16dp</item>
|
||||
<item name="android:layout_marginTop">10dp</item>
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:focusable">true</item>
|
||||
<item name="cardCornerRadius">8dp</item>
|
||||
<item name="cardPreventCornerOverlap">false</item>
|
||||
</style>
|
||||
|
||||
<style name="HomeItem.Primary">
|
||||
<item name="cardElevation">@dimen/home_primary_elevation</item>
|
||||
</style>
|
||||
|
||||
<style name="HomeItem.Secondary">
|
||||
<item name="cardElevation">@dimen/home_secondary_elevation</item>
|
||||
<item name="android:outlineAmbientShadowColor" tools:targetApi="p">
|
||||
@color/home_secondary_outline_ambient_shadow_color
|
||||
</item>
|
||||
<item name="android:outlineSpotShadowColor" tools:targetApi="p">
|
||||
@color/home_secondary_outline_spot_shadow_color
|
||||
</item>
|
||||
</style>
|
||||
|
||||
<style name="HomeItem.Tertiary">
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="android:background">@drawable/item_background_round_nopadding</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
<item name="android:paddingHorizontal">16dp</item>
|
||||
<item name="android:paddingVertical">12dp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Reference in New Issue