mirror of
https://github.com/IllusionMan1212/NPS-Browser.git
synced 2026-10-24 02:12:37 +00:00
Change singleapp to fragment, put toolbar in activity, add search bar
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/>
|
||||
</vector>
|
||||
@@ -1,7 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
android:id="@+id/container"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activities.MainActivity" />
|
||||
android:clipChildren="false">
|
||||
|
||||
<include
|
||||
android:id="@+id/include"
|
||||
layout="@layout/appbar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="56dp"
|
||||
android:background="@color/colorAmoled"
|
||||
android:backgroundTint="@color/colorAmoled"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/include"
|
||||
tools:context=".activities.MainActivity" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
style="@style/Widget.MaterialComponents.Toolbar.Primary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/colorAmoled"
|
||||
android:theme="@style/NPSTheme.ActionBar"
|
||||
app:layout_scrollFlags="scroll|enterAlways|snap" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
@@ -7,8 +7,6 @@
|
||||
android:clipChildren="false"
|
||||
tools:context=".fragments.mainactivity.MainActivityFragment">
|
||||
|
||||
<include layout="@layout/appbar" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/appsRecycler"
|
||||
android:layout_width="match_parent"
|
||||
@@ -21,18 +19,21 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="2"
|
||||
tools:listitem="@layout/grid_item" />
|
||||
tools:listitem="@layout/recycler_item_grid" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/tsvChooserButton"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:src="@drawable/ic_add_yellow_24dp"
|
||||
android:src="@drawable/ic_add_24dp"
|
||||
app:borderWidth="2dp"
|
||||
app:fabCustomSize="52dp"
|
||||
app:layout_anchor="@+id/appsRecycler"
|
||||
app:layout_anchorGravity="bottom|center"
|
||||
app:maxImageSize="32dp" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="214dp"
|
||||
android:backgroundTint="@color/colorAmoled"
|
||||
app:cardBackgroundColor="@color/colorPrimary"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="false"
|
||||
@@ -34,7 +35,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_games_black_24dp" />
|
||||
app:srcCompat="@drawable/ic_games_placeholder_24dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/appTitle"
|
||||
+2
-1
@@ -15,6 +15,7 @@
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:backgroundTint="@color/colorAmoled"
|
||||
app:cardBackgroundColor="@color/colorPrimary"
|
||||
app:cardElevation="4dp"
|
||||
app:cardUseCompatPadding="false"
|
||||
@@ -32,7 +33,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_games_black_24dp" />
|
||||
app:srcCompat="@drawable/ic_games_placeholder_24dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/appTitle"
|
||||
@@ -7,24 +7,14 @@
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false">
|
||||
|
||||
<include
|
||||
android:id="@+id/include"
|
||||
layout="@layout/appbar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/prefs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="56dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/include">
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
+1
-1
@@ -173,7 +173,7 @@
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="141dp"
|
||||
android:contentDescription="Single app icon"
|
||||
app:srcCompat="@drawable/ic_games_black_24dp" />
|
||||
app:srcCompat="@drawable/ic_games_placeholder_24dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
<?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_search"
|
||||
android:icon="@drawable/ic_search_24dp"
|
||||
android:title="@string/search"
|
||||
app:iconTint="?attr/colorOnPrimary"
|
||||
app:actionViewClass="androidx.appcompat.widget.SearchView"
|
||||
app:showAsAction="always" />
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:icon="@drawable/ic_settings"
|
||||
@@ -6,5 +6,6 @@
|
||||
<color name="colorSecondary">#696969</color>
|
||||
<color name="colorSecondaryDark">#515151</color>
|
||||
<color name="colorOnSecondary">#DFFFFFFF</color>
|
||||
<color name="colorAmoled">#000000</color>
|
||||
<color name="colorAccent">#F93422</color>
|
||||
</resources>
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
<color name="colorSecondary">#999999</color>
|
||||
<color name="colorSecondaryDark">#888888</color>
|
||||
<color name="colorOnSecondary">#111111</color>
|
||||
<color name="colorAmoled">#FFFFFF</color>
|
||||
<color name="colorAccent">#F93422</color>
|
||||
</resources>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<resources>
|
||||
<string name="app_name">NPS Browser</string>
|
||||
<string name="title_activity_settings">Settings</string>
|
||||
<string name="search">Search</string>
|
||||
</resources>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<item name="colorSecondaryVariant">@color/colorSecondaryDark</item>
|
||||
<item name="colorOnSecondary">@color/colorOnSecondary</item>
|
||||
|
||||
<item name="android:statusBarColor">@color/colorPrimary</item>
|
||||
<item name="android:statusBarColor">@color/colorAmoled</item>
|
||||
<item name="alertDialogTheme">@style/NPSTheme.AlertDialog</item>
|
||||
</style>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceCategory android:title="Customization">
|
||||
<PreferenceCategory android:title="Appearance">
|
||||
|
||||
<com.illusionware.npsbrowser.ThemePreference
|
||||
android:defaultValue="2"
|
||||
|
||||
Reference in New Issue
Block a user