Added Redirect settings page

This commit is contained in:
partisan 2025-05-20 14:31:24 +02:00
parent 4ce065425b
commit e8549c8841
13 changed files with 268 additions and 35 deletions

View file

@ -15,7 +15,7 @@
android:id="@+id/titleText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Support Pulse Development 💖"
android:text="@string/donate_title"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginBottom="8dp" />
@ -24,7 +24,7 @@
android:id="@+id/descText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Pulse is free and open-source. You can support future development through Ko-fi. As a thank-you, donors get special animation effects!"
android:text="@string/donate_description"
android:textSize="16sp"
android:layout_marginBottom="12dp" />
@ -43,14 +43,14 @@
android:id="@+id/kofiButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Donate via Ko-fi 💙"
android:text="@string/donate_button"
android:layout_marginBottom="12dp" />
<TextView
android:id="@+id/postDonatePrompt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Already donated? Tap below to activate your token."
android:text="@string/donate_post_prompt"
android:textSize="16sp"
android:layout_marginTop="24dp"
android:layout_marginBottom="8dp" />
@ -59,7 +59,7 @@
android:id="@+id/openTokenSection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="I have a token"
android:text="@string/donate_have_token"
android:layout_marginBottom="16dp" />
<!-- Token activation section (initially hidden) -->
@ -74,7 +74,7 @@
android:id="@+id/instruction"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Enter your Ko-fi token:"
android:text="@string/donate_token_instruction"
android:textSize="16sp"
android:layout_marginBottom="8dp" />
@ -82,7 +82,7 @@
android:id="@+id/tokenInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="token:abcd1234efgh5678"
android:hint="@string/donate_token_hint"
android:inputType="text"
android:maxLength="32"
android:layout_marginBottom="12dp"/>
@ -91,7 +91,7 @@
android:id="@+id/verifyButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Activate Token" />
android:text="@string/donate_token_activate" />
<TextView
android:id="@+id/resultText"

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
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:padding="32dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- Redirect on WiFi -->
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switchRedirectWifi"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/redirect_wifi"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<!-- Redirect on Data -->
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switchRedirectData"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/redirect_data"
app:layout_constraintTop_toBottomOf="@id/switchRedirectWifi"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="16dp" />
<!-- Redirect only international numbers -->
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switchRedirectInternational"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/redirect_international"
app:layout_constraintTop_toBottomOf="@id/switchRedirectData"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="16dp" />
<!-- Redirect only on roaming -->
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switchRedirectRoaming"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/redirect_roaming"
app:layout_constraintTop_toBottomOf="@id/switchRedirectInternational"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="16dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>