Skip to content

Commit

Permalink
Update onboarding pages and night mode
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel committed Nov 18, 2023
1 parent 924402f commit 05d8d85
Show file tree
Hide file tree
Showing 32 changed files with 456 additions and 15 deletions.
15 changes: 4 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ android {
versionNameSuffix "-beta.1"
versionCode versionCodeDate()
buildConfigField 'String', 'BASE_SOFTWARE_NAME', '"ooniprobe-android-dev"'
resValue "string", "APP_ID", "${applicationId}.dev"
resValue "string", "APP_NAME", "OONI Dev"
buildConfigField 'String', 'COUNTLY_KEY', '"e6c2cfe53e85951d50567467cef3f9fa2eab32c3"'
}
Expand All @@ -81,7 +80,6 @@ android {
versionNameSuffix "-experimental.1"
versionCode versionCodeDate()
buildConfigField 'String', 'BASE_SOFTWARE_NAME', '"ooniprobe-android-experimental"'
resValue "string", "APP_ID", "${applicationId}.experimental"
resValue "string", "APP_NAME", "OONI Exp"
buildConfigField 'String', 'COUNTLY_KEY', '"e6c2cfe53e85951d50567467cef3f9fa2eab32c3"'
}
Expand All @@ -92,6 +90,10 @@ android {
dimension 'license'
}
}
applicationVariants.all { variant ->
variant.resValue "string", "APP_ID", "\"${applicationId}\""
// TODO(aanorbel): Use similar solution to set `APP_NAME` in the format `provider` `testing`.
}
variantFilter { variant ->
def names = variant.flavors*.name
if (names.contains("fdroid") && (names.contains("experimental") || names.contains("dev"))) {
Expand Down Expand Up @@ -194,12 +196,3 @@ if (!getGradle().getStartParameter().getTaskRequests()
.toString().contains("Fdroid")){
apply plugin: 'com.google.gms.google-services'
}

preBuild.doFirst {
// copy resources to right folders here
/*android.applicationVariants.all { variant ->
variant.productFlavors.each { flavor ->
println "Flavor: ${flavor.name}"
}
}*/
}
Binary file modified app/src/dw/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/dw/res/drawable-xxxhdpi/info_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/dw/res/drawable-xxxhdpi/onboarding_1.png
Binary file not shown.
Binary file removed app/src/dw/res/drawable-xxxhdpi/onboarding_2.png
Binary file not shown.
Binary file removed app/src/dw/res/drawable-xxxhdpi/onboarding_3.png
Binary file not shown.
Binary file added app/src/dw/res/drawable/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions app/src/dw/res/layout/activity_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_collapseMode="parallax" >
<ImageView
<include
android:id="@+id/image"
android:layout_height="200dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/info_banner" />
layout="@layout/banner"/>
<TextView
android:id="@+id/version"
android:layout_width="match_parent"
Expand Down
21 changes: 21 additions & 0 deletions app/src/dw/res/layout/banner.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="180dp">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/info_banner" />
<ImageView
android:layout_marginTop="-90dp"
android:layout_marginBottom="-70dp"
android:layout_marginStart="-10dp"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentTop="true"
android:src="@drawable/logo"/>
</RelativeLayout>
56 changes: 56 additions & 0 deletions app/src/dw/res/layout/fragment_onboarding_1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/onboarding_background"
android:orientation="vertical">

<include
android:layout_width="match_parent"
android:layout_height="180dp"
layout="@layout/banner"
android:layout_marginBottom="@dimen/onboarding_image_margin_bottom"/>

<TextView
android:id="@+id/WhatIsOONIProbe_Title"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/Onboarding_WhatIsOONIProbe_Title"
android:textColor="@android:color/white" />

<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="16dp"
android:layout_marginVertical="8dp"
android:layout_weight="1">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Onboarding_WhatIsOONIProbe_Paragraph"
android:textColor="@android:color/white" />
</ScrollView>

<Button
android:id="@+id/master"
style="@style/TextAppearance.MaterialComponents.Body1"
android:layout_width="match_parent"
android:layout_height="64dp"
android:layout_marginHorizontal="64dp"
android:text="@string/Onboarding_WhatIsOONIProbe_GotIt"
android:textAllCaps="false"
android:textColor="@color/onboarding_background"
app:backgroundTint="@android:color/white"
app:cornerRadius="32dp" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="16dp"
android:src="@drawable/dots_1" />
</LinearLayout>
86 changes: 86 additions & 0 deletions app/src/dw/res/layout/fragment_onboarding_2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/onboarding_background_2"
android:orientation="vertical">

<include
android:layout_width="match_parent"
android:layout_height="180dp"
layout="@layout/banner"
android:layout_marginBottom="@dimen/onboarding_image_margin_bottom"/>

<TextView
android:id="@+id/heads_up"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/Onboarding_ThingsToKnow_Title"
android:textColor="@android:color/white" />

<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="16dp"
android:layout_marginVertical="8dp"
android:layout_weight="1">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:id="@+id/bullet1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Onboarding_ThingsToKnow_Bullet_1"
android:textColor="@android:color/white" />

<TextView
android:id="@+id/bullet2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Onboarding_ThingsToKnow_Bullet_2"
android:textColor="@android:color/white" />

<TextView
android:id="@+id/bullet3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Onboarding_ThingsToKnow_Bullet_3"
android:textColor="@android:color/white" />
</LinearLayout>
</ScrollView>

<Button
android:id="@+id/master"
style="@style/TextAppearance.MaterialComponents.Body1"
android:layout_width="match_parent"
android:layout_height="64dp"
android:layout_marginHorizontal="64dp"
android:text="@string/Onboarding_ThingsToKnow_Button"
android:textAllCaps="false"
android:textColor="@color/onboarding_background"
app:backgroundTint="@android:color/white"
app:cornerRadius="32dp" />

<Button
android:id="@+id/slave"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Onboarding_ThingsToKnow_LearnMore"
android:textAllCaps="false"
android:textColor="@android:color/white" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="16dp"
android:src="@drawable/dots_2" />
</LinearLayout>
103 changes: 103 additions & 0 deletions app/src/dw/res/layout/fragment_onboarding_3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/onboarding_background_3"
android:orientation="vertical">

<include
android:layout_width="match_parent"
android:layout_height="180dp"
layout="@layout/banner"
android:layout_marginBottom="@dimen/onboarding_image_margin_bottom"/>

<TextView
android:id="@+id/default_settings_title"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/Onboarding_DefaultSettings_Title"
android:textColor="@android:color/white" />

<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="16dp"
android:layout_marginVertical="8dp"
android:layout_weight="1">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"

android:text="@string/Onboarding_DefaultSettings_Header"
android:textColor="@android:color/white"
android:textStyle="bold" />

<TextView
android:id="@+id/bullet1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Onboarding_DefaultSettings_Bullet_1"
android:textColor="@android:color/white" />

<TextView
android:id="@+id/bullet2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Onboarding_DefaultSettings_Bullet_2"
android:textColor="@android:color/white" />

<TextView
android:id="@+id/bullet3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Onboarding_DefaultSettings_Bullet_3"
android:textColor="@android:color/white" />

<TextView
android:id="@+id/paragraph"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/Onboarding_DefaultSettings_Paragraph"
android:textColor="@android:color/white" />

</LinearLayout>
</ScrollView>

<Button
android:id="@+id/master"
style="@style/TextAppearance.MaterialComponents.Body1"
android:layout_width="match_parent"
android:layout_height="64dp"
android:layout_marginHorizontal="64dp"
android:text="@string/Modal_OK"
android:textAllCaps="false"
android:textColor="@color/onboarding_background"
app:backgroundTint="@android:color/white"
app:cornerRadius="32dp" />

<Button
android:id="@+id/slave"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Onboarding_DefaultSettings_Button_Change"
android:textAllCaps="false"
android:textColor="@android:color/white" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="16dp"
android:src="@drawable/dots_3" />
</LinearLayout>
Loading

0 comments on commit 05d8d85

Please sign in to comment.