Skip to content

Commit

Permalink
fix toolbar colors (fix #1562)
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Sep 15, 2019
1 parent c98aa93 commit f7455f1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
4 changes: 3 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp">
android:elevation="4dp"
app:theme="@style/ThemeOverlay.AppCompat.Dark"
app:popupTheme="@style/Theme.Bubble.ToolbarPopup">

<RelativeLayout
android:id="@+id/uploadedAnswersContainer"
Expand Down
13 changes: 8 additions & 5 deletions app/src/main/res/layout/toolbar.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
app:theme="@style/ThemeOverlay.AppCompat.Dark"
app:popupTheme="@style/Theme.Bubble.ToolbarPopup">
</androidx.appcompat.widget.Toolbar>
2 changes: 2 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<item name="android:popupMenuStyle">@style/Theme.Bubble.Popup</item>
</style>

<style name="Theme.Bubble.ToolbarPopup" parent="Theme.AppCompat.DayNight.NoActionBar"/>

<style name="Theme.Bubble.Popup" parent="Widget.AppCompat.Light.PopupMenu">
<item name="android:popupBackground">@drawable/speech_bubble_none</item>
<item name="android:popupAnimationStyle">@style/Animation.Popup.Bubble</item>
Expand Down

0 comments on commit f7455f1

Please sign in to comment.