Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new alert banner style, updated vector graphics to 1.8 #106

Merged
merged 1 commit into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions app/src/main/res/drawable/ic_info.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="40dp"
android:height="40dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFF"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z" />
android:width="35dp"
android:height="35dp"
android:viewportWidth="35"
android:viewportHeight="35">
<path
android:pathData="M17.5,0C22.3361,0 26.4617,1.7117 29.877,5.135C33.2924,8.5583 35,12.68 35,17.5C35,22.32 33.2924,26.4417 29.877,29.865C26.4617,33.2883 22.3361,35 17.5,35C12.6639,35 8.5382,33.2883 5.123,29.865C1.7076,26.4417 0,22.32 0,17.5C0,12.68 1.7076,8.5583 5.123,5.135C8.5382,1.7117 12.6639,0 17.5,0ZM19.2623,26.2911V22.7582H15.7377V26.2911H19.2623ZM19.2623,19.2254V8.7089H15.7377V19.2254H19.2623Z"
android:strokeAlpha="0.7"
android:fillColor="#ffffff"
android:fillAlpha="0.7"/>
</vector>
14 changes: 8 additions & 6 deletions app/src/main/res/drawable/ic_keyboard_arrow_right.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="40dp"
android:height="40dp"
android:viewportWidth="24"
android:width="14dp"
android:height="24dp"
android:viewportWidth="14"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFF"
android:pathData="M9.29,15.88L13.17,12 9.29,8.12c-0.39,-0.39 -0.39,-1.02 0,-1.41 0.39,-0.39 1.02,-0.39 1.41,0l4.59,4.59c0.39,0.39 0.39,1.02 0,1.41L10.7,17.3c-0.39,0.39 -1.02,0.39 -1.41,0 -0.38,-0.39 -0.39,-1.03 0,-1.42z" />
<path
android:pathData="M0.4578,23.53C1.066,24.1567 2.0466,24.1567 2.6549,23.53L12.9703,12.9017C13.0854,12.7834 13.1767,12.6428 13.239,12.4881C13.3013,12.3334 13.3333,12.1675 13.3333,12C13.3333,11.8325 13.3013,11.6666 13.239,11.5119C13.1767,11.3572 13.0854,11.2166 12.9703,11.0983L2.6549,0.47C2.0466,-0.1567 1.066,-0.1567 0.4578,0.47C-0.1505,1.0967 -0.1505,2.1071 0.4578,2.7338L9.445,12.0064L0.4453,21.279C-0.1505,21.8929 -0.1505,22.9161 0.4578,23.53Z"
android:strokeAlpha="0.8"
android:fillColor="#ffffff"
android:fillAlpha="0.8"/>
</vector>
14 changes: 3 additions & 11 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,14 @@
</LinearLayout>

<TextView
style="@style/AlertBanner"
android:id="@+id/banner_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:drawableStart="@drawable/ic_info"
android:drawableEnd="@drawable/ic_keyboard_arrow_right"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:padding="32dp"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold"
android:visibility="gone"
tools:background="@color/tangerine"
tools:text="You may have been in contact with COVID-19"
tools:visibility="visible" />
tools:background="@color/tangerine"
tools:visibility="visible"/>

<ImageView
android:layout_width="300sp"
Expand Down
17 changes: 12 additions & 5 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@
<item name="android:textColor">@color/primaryText</item>
</style>

<style name="AlertDialogCustom" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:textSize">16sp</item>
<style name="AlertBanner" parent="@style/AppTheme">
<item name="colorPrimary">@color/tangerine</item>
<item name="android:background">?selectableItemBackground</item>
<item name="android:drawableStart">@drawable/ic_info</item>
<item name="android:drawableEnd">@drawable/ic_keyboard_arrow_right</item>
<item name="android:drawablePadding">16dp</item>
<item name="android:gravity">center_vertical</item>
<item name="android:textSize">18sp</item>
<item name="android:padding">32dp</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">@color/white</item>
<item name="fontFamily">@font/montserrat</item>
</style>

</resources>