New Search Everywhere
This commit is contained in:
parent
41502ee01e
commit
df9a451242
24 changed files with 516 additions and 140 deletions
21
app/src/main/res/layout/activity_search.xml
Normal file
21
app/src/main/res/layout/activity_search.xml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?colorPrimary"
|
||||
android:elevation="@dimen/toolbar_elevation"
|
||||
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
|
||||
|
||||
<ListView
|
||||
android:dividerHeight="0dp"
|
||||
android:divider="@null"
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</LinearLayout>
|
||||
44
app/src/main/res/layout/item_search.xml
Normal file
44
app/src/main/res/layout/item_search.xml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?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="64dp"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="16dp">
|
||||
|
||||
<com.kabouzeid.materialmusic.view.SquareImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:fontFamily="sans-serif"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sub_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:fontFamily="sans-serif"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
@ -10,11 +10,10 @@
|
|||
app:showAsAction="always"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_search"
|
||||
android:icon="@drawable/abc_ic_search_api_mtrl_alpha"
|
||||
android:title="@string/action_search"
|
||||
app:actionViewClass="android.support.v7.widget.SearchView"
|
||||
app:showAsAction="collapseActionView|ifRoom"/>
|
||||
android:id="@+id/action_search"
|
||||
android:icon="@drawable/abc_ic_search_api_mtrl_alpha"
|
||||
android:title="@string/action_search"
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_playing_queue"
|
||||
|
|
|
|||
11
app/src/main/res/menu/menu_search.xml
Normal file
11
app/src/main/res/menu/menu_search.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<menu 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"
|
||||
tools:context="com.kabouzeid.materialmusic.ui.activities.SearchActivity">
|
||||
<item
|
||||
android:id="@+id/action_search"
|
||||
android:icon="@drawable/abc_ic_search_api_mtrl_alpha"
|
||||
android:title="@string/action_search"
|
||||
app:actionViewClass="android.support.v7.widget.SearchView"
|
||||
app:showAsAction="ifRoom|collapseActionView"/>
|
||||
</menu>
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
<color name="materialmusic_music_controller_container_color">@color/grey_400</color>
|
||||
|
||||
<color name="materialmusic_dark_color">@color/grey_900</color>
|
||||
<color name="materialmusic_dark_color_darker">@color/black</color>
|
||||
<color name="materialmusic_dark_color_darker">#161616</color>
|
||||
|
||||
<color name="materialmusic_dark_accent_color">@color/pink_500</color>
|
||||
<color name="materialmusic_dark_accent_color_darker">@color/pink_600</color>
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@
|
|||
<string name="close">Close</string>
|
||||
<string name="save_as_playlist">Save as playlist</string>
|
||||
<string name="credits">Material Music is a completely free material designed music player by <b>Karim Abou Zeid</b>.\n\n<a href="https://plus.google.com/+KarimAbouZeid23697">Google+</a>   <a href="https://twitter.com/karim23697">Twitter</a></string>
|
||||
|
||||
<string name="title_activity_search">SearchActivity</string>
|
||||
<string name="more">more</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue