feat(YouTube - Settings): Add ability to search in settings (#4881)
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
This commit is contained in:
parent
2593c004f4
commit
14a8f4fb96
46 changed files with 2346 additions and 1185 deletions
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle"
|
||||
android:id="@+id/revanced_settings_cursor">
|
||||
<solid android:color="?ytTextPrimary" />
|
||||
<size android:width="1dp" />
|
||||
</shape>
|
||||
|
|
@ -22,4 +22,8 @@
|
|||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
</style>
|
||||
<style name="revanced_searchbar_cursor">
|
||||
<item name="android:textCursorDrawable">@drawable/revanced_settings_cursor</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="54dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<ImageView
|
||||
android:id="@android:id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="18dp"
|
||||
android:contentDescription="@null" />
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:paddingVertical="8dp">
|
||||
<TextView
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/medium_font_size"
|
||||
android:textColor="?ytTextPrimary"
|
||||
android:textAlignment="viewStart" />
|
||||
<TextView
|
||||
android:id="@android:id/summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/small_font_size"
|
||||
android:textColor="?ytTextSecondary"
|
||||
android:textAlignment="viewStart"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- History icon -->
|
||||
<ImageView
|
||||
android:id="@+id/history_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:contentDescription="History icon"
|
||||
android:src="@drawable/yt_outline_arrow_time_vd_theme_24" />
|
||||
|
||||
<!-- Suggestion text -->
|
||||
<TextView
|
||||
android:id="@+id/suggestion_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -1,34 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical"
|
||||
android:transitionGroup="true">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/revanced_toolbar_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/yt_white1"
|
||||
android:elevation="0dp">
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical"
|
||||
android:transitionGroup="true">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/revanced_toolbar"
|
||||
<!-- Parent container for Toolbar and SearchView -->
|
||||
<FrameLayout
|
||||
android:id="@+id/revanced_toolbar_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/ytBrandBackgroundSolid"
|
||||
app:navigationIcon="@drawable/yt_outline_arrow_left_black_24"
|
||||
app:title="@string/revanced_settings_title" />
|
||||
android:background="@color/yt_white1"
|
||||
android:elevation="0dp">
|
||||
|
||||
<!-- Toolbar -->
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/revanced_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/ytBrandBackgroundSolid"
|
||||
app:navigationIcon="@drawable/yt_outline_arrow_left_black_24"
|
||||
app:title="@string/revanced_settings_title" />
|
||||
|
||||
<!-- Container for SearchView -->
|
||||
<FrameLayout
|
||||
android:id="@+id/revanced_search_view_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<android.widget.SearchView
|
||||
android:id="@+id/revanced_search_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="56dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:iconifiedByDefault="false"
|
||||
android:searchIcon="@null"
|
||||
android:queryBackground="@null"
|
||||
android:theme="@style/revanced_searchbar_cursor"
|
||||
android:padding="2dp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Container for fragments -->
|
||||
<FrameLayout
|
||||
android:id="@+id/revanced_settings_fragments"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:id="@+id/revanced_settings_fragments"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
</merge>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/action_search"
|
||||
android:icon="@drawable/yt_outline_search_black_24"
|
||||
android:title=""
|
||||
android:showAsAction="always"/>
|
||||
</menu>
|
||||
Loading…
Add table
Add a link
Reference in a new issue