Added individual service toggle and priority switch

This commit is contained in:
partisan 2025-05-01 13:24:13 +02:00
parent 707cd39ef8
commit b09b6578bb
13 changed files with 328 additions and 83 deletions

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#666"
android:pathData="M7,10h2v2H7v-2zm0,-4h2v2H7V6zm0,8h2v2H7v-2zm4,-8h2v2h-2V6zm0,4h2v2h-2v-2zm0,4h2v2h-2v-2z" />
</vector>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
@ -12,9 +13,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/description"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintEnd_toEndOf="parent" />
<ScrollView
android:id="@+id/scrollView"
@ -22,10 +23,10 @@
android:layout_height="0dp"
android:padding="16dp"
android:layout_marginVertical="16dp"
app:layout_constraintBottom_toTopOf="@+id/toggle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/description"
app:layout_constraintBottom_toTopOf="@id/toggle"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/description">
app:layout_constraintEnd_toEndOf="parent">
<LinearLayout
android:layout_width="match_parent"
@ -36,65 +37,54 @@
android:id="@+id/redirectionDelay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:contentDescription="@string/redirection_delay_description"
android:stepSize="0.5"
android:valueFrom="2"
android:valueTo="4" />
android:valueTo="4"
android:contentDescription="@string/redirection_delay_description" />
<TextView
android:id="@+id/description2"
android:textSize="12sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/redirection_delay_description" />
android:text="@string/redirection_delay_description"
android:textSize="12sp" />
<Space
android:layout_marginVertical="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_marginVertical="8dp" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/popupPosition"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:endIconMode="custom"
app:endIconDrawable="@drawable/ic_baseline_check_circle_24"
android:hint="@string/popup_position"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:hint="@string/popup_position">
<com.google.android.material.textfield.TextInputEditText
android:inputType="number"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:inputType="number" />
</com.google.android.material.textfield.TextInputLayout>
<Space
android:layout_marginVertical="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_marginVertical="8dp" />
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginVertical="8dp"
android:background="?android:attr/listDivider" />
<CheckBox
android:id="@+id/fallback"
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/serviceRecycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layoutDirection="rtl"
android:text="@string/fallback"
android:textSize="16sp" />
<TextView
android:id="@+id/description3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/fallback_description"
android:textSize="12sp" />
android:layout_marginTop="16dp"
android:scrollbars="vertical" />
</LinearLayout>
</ScrollView>
@ -105,7 +95,6 @@
android:paddingVertical="12dp"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="8dp">
<ImageView
android:id="@+id/handle"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_drag_handle"
android:contentDescription="@null"
android:layout_gravity="center_vertical"
android:paddingEnd="8dp" />
<CheckBox
android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="Label"
android:textSize="16sp"
android:layout_gravity="center_vertical" />
</LinearLayout>

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Pulse</string>
<string name="description">L\'application essaiera de rediriger les appels sortants vers Signal/Telegram/Threema s\'ils sont disponibles. Pour fonctionner, l\'application nécessite de nombreuses permissions. Cliquez sur le bouton et accordez les autorisations nécéssaires jusqu\'à ce qu\'il soit activé.</string>
<string name="description">L\'application essaiera de rediriger les appels sortants vers Signal/Telegram/Threema/WhatsApp s\'ils sont disponibles. Pour fonctionner, l\'application nécessite de nombreuses permissions. Cliquez sur le bouton et accordez les autorisations nécéssaires jusqu\'à ce qu\'il soit activé.</string>
<string name="popup">Redirection vers %1$s</string>
<string name="destination_signal">Signal</string>
<string name="destination_telegram">Telegram</string>
<string name="destination_threema">Threema</string>
<string name="redirection_delay_description">Délai avant qu\'un appel ne soit redirigé.</string>
<string name="destination_whatsapp">WhatsApp</string>
</resources>

View file

@ -1,14 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Pulse</string>
<string name="description">Приложение будет пытаться перенаправить исходящие вызовы в Signal/Telegram/Threema. Для работы ему нужно много разрешений. Кликайте на переключатель и выдавайте разрешения пока он не включится.</string>
<string name="description">Приложение будет пытаться перенаправить исходящие вызовы в Signal/Telegram/Threema/WhatsApp. Для работы ему нужно много разрешений. Кликайте на переключатель и выдавайте разрешения пока он не включится.</string>
<string name="popup">Перенаправление в %1$s</string>
<string name="destination_signal">Signal</string>
<string name="destination_telegram">Telegram</string>
<string name="destination_threema">Threema</string>
<string name="destination_whatsapp">WhatsApp</string>
<string name="redirection_delay_description">Задержка до того, как звонок будет перенаправлен.</string>
<string name="popup_position">Позиция всплывающего окна</string>
<string name="fallback">Обратная совместимость</string>
<string name="fallback_description">Перенаправлять в WhatsApp, если другие недоступны.</string>
<string name="fallback_destination_whatsapp">WhatsApp</string>
</resources>

View file

@ -1,14 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Pulse</string>
<string name="description">The app will try to redirect outgoing calls to Signal/Telegram/Threema if available. For work it requires many permissions. Click on the toggle and grant permissions until it turns ON.</string>
<string name="description">The app will try to redirect outgoing calls to Signal/Telegram/Threema/WhatsApp if available. For work it requires many permissions. Click on the toggle and grant permissions until it turns ON.</string>
<string name="popup">Redirecting to %1$s</string>
<string name="destination_signal">Signal</string>
<string name="destination_telegram">Telegram</string>
<string name="destination_threema">Threema</string>
<string name="destination_whatsapp">WhatsApp</string>
<string name="redirection_delay_description">The delay before a call will be redirected.</string>
<string name="popup_position">Popup position</string>
<string name="fallback">Fallback</string>
<string name="fallback_description">Redirect to WhatsApp if no other available.</string>
<string name="fallback_destination_whatsapp">WhatsApp</string>
</resources>