Skip to content

Commit

Permalink
Put search view into tool bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Kentaro Takiguchi committed May 23, 2015
1 parent e0c3910 commit 0295529
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
24 changes: 18 additions & 6 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,32 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.etsy.android.grid.StaggeredGridView
xmlns:app="http://schemas.android.com/apk/res-auto"
<com.etsy.android.grid.StaggeredGridView xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/channel_recipe_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:column_count="2"
app:item_margin="8dp" />

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:minHeight="?attr/actionBarSize" />
android:layout_margin="@dimen/spacing_medium">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:minHeight="?attr/actionBarSize">

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:hint="@string/feeling_lucky" />
</android.support.v7.widget.Toolbar>
</android.support.v7.widget.CardView>
</FrameLayout>
<!-- The navigation drawer -->
<ListView
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<color name="deep_orange">#FFA726</color>
<color name="lightgray">#fafaf5</color>
<color name="black">#484432</color>
<color name="darkgray">#7b7769</color>
<color name="dark_gray">#7b7769</color>
<color name="gray">#a3a090</color>
<color name="border">#dbdbce</color>
<color name="transparent">#00000000</color>
Expand All @@ -24,7 +24,7 @@
<color name="navigation_bar">@android:color/black</color>

<color name="text_color_primary">@color/black</color>
<color name="text_color_secondary">@color/darkgray</color>
<color name="text_color_secondary">@color/dark_gray</color>
<color name="text_color_tertiary">@color/gray</color>
<color name="text_color_hint">@color/border</color>

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
<string name="placeholder_query_input">What do you feel like eating?</string>
<string name="drawer_open">open drawer</string>
<string name="drawer_close">close drawer</string>
<string name="feeling_lucky">I\'m Feeling Lucky</string>
</resources>
7 changes: 5 additions & 2 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<resources xmlns:tools="http://schemas.android.com/tools">

<style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light"></style>
<style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light">
<item name="actionMenuTextColor">@android:color/black</item>
<item name="android:textColorSecondary">@android:color/black</item>
</style>

<!-- Base application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
Expand All @@ -13,7 +16,7 @@
<item name="windowNoTitle">true</item>

<!-- Toolbar Theme / Apply white arrow -->
<item name="colorControlNormal">@android:color/white</item>
<item name="colorControlNormal">@color/dark_gray</item>

<!-- Material Theme -->
<item name="colorPrimary">@color/primary</item>
Expand Down

0 comments on commit 0295529

Please sign in to comment.