Now suggestion hints are light.
This commit is contained in:
parent
6d5b0a2b62
commit
5f61642f56
@ -15,7 +15,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".view.MainActivity"
|
android:name=".view.MainActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/AppTheme.NoActionBar">
|
android:theme="@style/MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
@ -101,7 +101,6 @@ public class MainActivity extends AppCompatActivity
|
|||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("StatementWithEmptyBody")
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onNavigationItemSelected(MenuItem item) {
|
public boolean onNavigationItemSelected(MenuItem item) {
|
||||||
// Handle navigation view item clicks here.
|
// Handle navigation view item clicks here.
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
|
android:theme="@style/CustomSearchStyle"
|
||||||
|
app:titleTextColor="@android:color/white"
|
||||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||||
|
|
||||||
</android.support.design.widget.AppBarLayout>
|
</android.support.design.widget.AppBarLayout>
|
||||||
|
95
app/src/main/res/layout/light_suggestion_hint.xml
Normal file
95
app/src/main/res/layout/light_suggestion_hint.xml
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="58dip"
|
||||||
|
android:background="@android:color/white"
|
||||||
|
style="@style/RtlOverlay.Widget.AppCompat.Search.DropDown">
|
||||||
|
|
||||||
|
<!-- Icons come first in the layout, since their placement doesn't depend on
|
||||||
|
the placement of the text views. -->
|
||||||
|
<ImageView
|
||||||
|
android:id="@android:id/icon1"
|
||||||
|
android:layout_width="48dip"
|
||||||
|
android:layout_height="48dip"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:tint="@android:color/black"
|
||||||
|
android:visibility="invisible"
|
||||||
|
style="@style/RtlOverlay.Widget.AppCompat.Search.DropDown.Icon1" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/edit_query"
|
||||||
|
android:layout_width="48dip"
|
||||||
|
android:layout_height="48dip"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:visibility="gone"
|
||||||
|
style="@style/RtlOverlay.Widget.AppCompat.Search.DropDown.Query" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@android:id/icon2"
|
||||||
|
android:layout_width="48dip"
|
||||||
|
android:layout_height="48dip"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
android:layout_alignWithParentIfMissing="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:visibility="gone"
|
||||||
|
style="@style/RtlOverlay.Widget.AppCompat.Search.DropDown.Icon2" />
|
||||||
|
|
||||||
|
|
||||||
|
<!-- The subtitle comes before the title, since the height of the title depends on whether the
|
||||||
|
subtitle is visible or gone. -->
|
||||||
|
<TextView android:id="@android:id/text2"
|
||||||
|
style="?android:attr/dropDownItemStyle"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="id/text2"
|
||||||
|
android:layout_height="29dip"
|
||||||
|
android:paddingBottom="4dip"
|
||||||
|
android:gravity="top"
|
||||||
|
android:layout_alignWithParentIfMissing="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:visibility="gone"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- The title is placed above the subtitle, if there is one. If there is no
|
||||||
|
subtitle, it fills the parent. -->
|
||||||
|
<TextView android:id="@android:id/text1"
|
||||||
|
style="?android:attr/dropDownItemStyle"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
tools:text="id/text1"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_above="@android:id/text2" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
@ -25,4 +25,9 @@
|
|||||||
<item name="android:textColorPrimary">@android:color/black</item>
|
<item name="android:textColorPrimary">@android:color/black</item>
|
||||||
<item name="android:textColorSecondary">@android:color/black</item>
|
<item name="android:textColorSecondary">@android:color/black</item>
|
||||||
</style>
|
</style>
|
||||||
|
<style name="CustomSearchStyle" parent="AppTheme">
|
||||||
|
<item name="suggestionRowLayout">@layout/light_suggestion_hint</item>
|
||||||
|
<item name="colorControlNormal">@android:color/white</item>
|
||||||
|
<item name="android:colorControlNormal">@android:color/white</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -5,6 +5,16 @@
|
|||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="MainActivity" parent="AppTheme.NoActionBar">
|
||||||
|
<item name="android:editTextColor">@android:color/white</item>
|
||||||
|
<item name="android:textColorHint">@android:color/white</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="CustomSearchStyle" parent="AppTheme">
|
||||||
|
<item name="suggestionRowLayout">@layout/light_suggestion_hint</item>
|
||||||
|
<item name="colorControlNormal">@android:color/white</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="AppTheme.NoActionBar">
|
<style name="AppTheme.NoActionBar">
|
||||||
<item name="windowActionBar">false</item>
|
<item name="windowActionBar">false</item>
|
||||||
<item name="windowNoTitle">true</item>
|
<item name="windowNoTitle">true</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user