Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
More dark theme updates
Browse files Browse the repository at this point in the history
- Updated colorPrimary to be Indigo A200
- Replace MDC PNG with a Vector + text
- Updated the navigation drawer header to
  follow the design(ish)
- Use a dark map style in dark theme

BUG: 128252138

Change-Id: I716aa0addf15e1d2d522b8261ec059d7b87c6642
  • Loading branch information
Chris Banes authored and thagikura committed Aug 14, 2019
1 parent 77d092d commit 986c761
Show file tree
Hide file tree
Showing 58 changed files with 393 additions and 87 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
33 changes: 33 additions & 0 deletions mobile/src/main/res/drawable/ic_logo_components.xml
@@ -0,0 +1,33 @@
<!--
Copyright 2019 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
https://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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="48dp"
android:viewportHeight="48.0"
android:viewportWidth="48.0"
android:width="48dp">
<path
android:fillColor="#212121"
android:pathData="M7.16,4h33.68C42.59,4 44,5.41 44,7.16v33.68c0,1.74 -1.41,3.16 -3.16,3.16H7.16C5.41,44 4,42.59 4,40.84V7.16C4,5.41 5.41,4 7.16,4z"/>
<path
android:fillColor="#fff"
android:pathData="M9,29h10l10,-10V9H9z"/>
<path
android:fillColor="#00E676"
android:pathData="M29,29m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0"/>
<path
android:fillColor="#B2FF59"
android:pathData="M29,19c-5.52,0 -10,4.48 -10,10h10V19z"/>
</vector>
2 changes: 0 additions & 2 deletions mobile/src/main/res/layout/activity_main.xml
Expand Up @@ -22,7 +22,6 @@
android:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.google.samples.apps.iosched.ui.MainActivity"
tools:openDrawer="start">

Expand All @@ -37,7 +36,6 @@
android:layout_width="@dimen/nav_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:menu="@menu/navigation" />

<com.google.samples.apps.iosched.widget.FadingSnackbar
Expand Down
2 changes: 1 addition & 1 deletion mobile/src/main/res/layout/fragment_info_event.xml
Expand Up @@ -117,7 +117,7 @@
android:minHeight="@dimen/a11y_min_touch_target"
android:onClick="@{() -> viewModel.onWifiConnect()}"
android:text="@{viewModel.wifiPassword.concat(` ` + @string/tap_to_join_network)}"
android:textColor="@color/indigo"
android:textColor="?attr/colorSecondary"
app:layout_constraintBaseline_toBaselineOf="@id/wifi_password_label"
app:layout_constraintEnd_toStartOf="@id/guideline_end"
app:layout_constraintStart_toEndOf="@id/wifi_label_barrier"
Expand Down
13 changes: 8 additions & 5 deletions mobile/src/main/res/layout/fragment_settings.xml
Expand Up @@ -156,14 +156,17 @@
android:padding="@dimen/margin_normal"
android:text="@string/version_name" />

<ImageView
android:layout_width="match_parent"
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/margin_normal"
android:contentDescription="@string/built_with_material_content_description"
android:drawablePadding="@dimen/margin_small"
android:drawableStart="@drawable/ic_logo_components"
android:gravity="center"
android:paddingHorizontal="@dimen/margin_normal"
android:scaleType="fitStart"
android:src="@drawable/built_with_material" />
android:text="@string/built_with_material_components"
android:textAppearance="?attr/textAppearanceBody1" />

</LinearLayout>

Expand Down
58 changes: 29 additions & 29 deletions mobile/src/main/res/layout/navigation_header.xml
Expand Up @@ -29,34 +29,25 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:onClick="@{() -> viewModel.onProfileClicked()}"
app:navHeaderContentDescription="@{viewModel.currentUserInfo}">

<ImageView
android:layout_width="0dp"
android:layout_height="0dp"
android:contentDescription="@null"
android:scaleType="centerCrop"
app:layout_constraintDimensionRatio="16:10"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/customize_schedule" />

<!-- TODO scrim behind the text elements -->

<TextView
android:id="@+id/user_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_normal"
android:layout_marginStart="@dimen/margin_normal"
android:layout_marginBottom="2dp"
android:layout_marginStart="@dimen/nav_account_text_keyline"
android:layout_marginTop="@dimen/margin_small"
android:fontFamily="sans-serif-medium"
android:lines="1"
android:textAppearance="?textAppearanceBody1"
android:textAppearance="?attr/textAppearanceBody1"
app:layout_constraintBottom_toTopOf="@id/user_email"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navHeaderTitle="@{viewModel.currentUserInfo}"
tools:text="Guest" />

Expand All @@ -65,30 +56,39 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/margin_small"
android:layout_marginEnd="@dimen/margin_normal"
android:layout_marginStart="@dimen/margin_normal"
android:lines="1"
android:textAppearance="?textAppearanceBody2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:textAppearance="?attr/textAppearanceCaption"
app:layout_constraintBottom_toTopOf="@id/divider"
app:layout_constraintStart_toStartOf="@id/user_name"
app:layout_constraintTop_toBottomOf="@id/user_name"
app:navHeaderSubtitle="@{viewModel.currentUserInfo}"
tools:text="Tap to sign in" />

<ImageView
android:id="@+id/user_avatar"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_width="@dimen/nav_account_image_size"
android:layout_height="@dimen/nav_account_image_size"
android:layout_gravity="center_vertical|start"
android:layout_marginBottom="@dimen/margin_small"
android:layout_marginStart="@dimen/margin_normal"
android:layout_margin="@dimen/margin_small"
android:contentDescription="@null"
app:layout_constraintBottom_toTopOf="@id/user_name"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/divider"
app:layout_constraintEnd_toStartOf="@id/user_name"
app:layout_constraintTop_toTopOf="parent"
app:clipToCircle="@{true}"
app:imageUri="@{viewModel.currentUserImageUri}"
app:placeholder="@{@drawable/ic_default_profile_avatar}"
tools:srcCompat="@drawable/ic_default_profile_avatar" />

<View
android:id="@+id/divider"
android:layout_width="0dp"
android:layout_height="1dp"
android:background="?android:attr/listDivider"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>


</layout>

0 comments on commit 986c761

Please sign in to comment.