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

Add check box #23

Merged
merged 3 commits into from
Jun 18, 2024
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
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ android {
applicationId "com.klee.sapio"
minSdk 21
targetSdk 33
versionCode 42
versionName "1.4.2"
versionCode 43
versionName "1.5"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
10 changes: 9 additions & 1 deletion app/src/main/java/com/klee/sapio/ui/view/WarningFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,16 @@ class WarningFragment : Fragment() {
findNavController().navigate(R.id.action_warningFragment_to_chooseAppFragment)
}

mBinding.proceedButton.isEnabled = mDeviceConfiguration.getGmsType() != GmsType.GOOGLE_PLAY_SERVICES
mBinding.checkbox.setOnClickListener {
updateProceedButton()
}

updateProceedButton()
return mBinding.root
}

private fun updateProceedButton() {
mBinding.proceedButton.isEnabled =
mDeviceConfiguration.getGmsType() != GmsType.GOOGLE_PLAY_SERVICES && mBinding.checkbox.isChecked
}
jonathanklee marked this conversation as resolved.
Show resolved Hide resolved
}
21 changes: 21 additions & 0 deletions app/src/main/res/layout/fragment_warning.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,25 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<LinearLayout
android:layout_margin="25dp"
android:orientation="horizontal"
android:gravity="left"
app:layout_constraintTop_toBottomOf="@id/reportAppDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<CheckBox
android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

<TextView
android:id="@+id/checkboxText"
android:text="@string/i_have_read_and_i_understand_the_rating_rules"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>

</LinearLayout>
jonathanklee marked this conversation as resolved.
Show resolved Hide resolved

</androidx.constraintlayout.widget.ConstraintLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<resources>
<string name="next">Suivant</string>
<string name="previous">Précédent</string>
<string name="warning_desc"><![CDATA[Vous êtes sur le point d\'évaluer le fonctionnement d\'une application Android sur un appareil AOSP déGooglisé.<br><br>Par conséquent, votre appareil ne doit pas avoir les Google Play Services d\'installés.<br><br>Soyez certains de bien comprendre les <a href="%1$s">règles d\'évaluation</a> avant de contribuer.<br><br>Veuillez noter qu\'il n\'est pas nécessaire d\'évaluer les applications disponibles sur F-Droid car elles n\'ont pas de dépendances vers les Google Play Services.]]></string>
<string name="warning_desc"><![CDATA[Vous êtes sur le point d\'évaluer le fonctionnement d\'une application Android sur un appareil AOSP déGooglisé.<br><br>Par conséquent, votre appareil ne doit pas avoir les Google Play Services d\'installés.<br><br>Soyez certains de bien comprendre les <a href="%1$s">règles d\'évaluation</a> avant de contribuer.]]></string>
<string name="proceed">Commencer</string>
<string name="select_button">Sélectionner</string>
<string name="select_application_text">Selectionnez l\'application à évaluer</string>
Expand Down Expand Up @@ -37,4 +37,5 @@
<string name="unknown">Inconnu</string>
<string name="share">Partager</string>
<string name="rating_rules"><![CDATA[<a href="%1$s">Règles d\'évaluation</a>]]></string>
<string name="i_have_read_and_i_understand_the_rating_rules">J\'ai lu et je comprends les règles d\'évaluation</string>
</resources>
3 changes: 2 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<string name="app_name" translatable="false">Sapio</string>
<string name="next">Next</string>
<string name="previous">Previous</string>
<string name="warning_desc"><![CDATA[You are tasked with evaluating the behavior of an Android application on a deGoogled bare Android Open Source Project (AOSP) device.<br><br>Therefore, your device must not have the official Google Play Services installed<br><br>Make sure to understand properly the <a href="%1$s">rating rules</a> before contributing.<br><br>Please note that there is no need to evaluate applications which are available on F-Droid, as they are free from any dependencies on Google Play Services.]]></string>
<string name="warning_desc"><![CDATA[You are tasked with evaluating the behavior of an Android application on a deGoogled bare Android Open Source Project (AOSP) device.<br><br>Therefore, your device must not have the official Google Play Services installed<br><br>Make sure to understand properly the <a href="%1$s">rating rules</a> before contributing.]]></string>
<string name="proceed">Proceed</string>
<string name="select_button">Select</string>
<string name="select_application_text">Select the application to evaluate</string>
Expand Down Expand Up @@ -42,4 +42,5 @@
<string name="share">Share</string>
<string name="donate">Donate</string>
<string name="rating_rules"><![CDATA[<a href="%1$s">Rating rules</a>]]></string>
<string name="i_have_read_and_i_understand_the_rating_rules">I have read and I understand the rating rules</string>
</resources>
Loading