
This commit allows F-Droid to hide itself from the laucher. It can be hidden either as response to a panic trigger or as a manual action by long pressing the floating search button. The latter needs to be explicitly enabled in the settings. Once hidden, a semi-functional fake calculator app appears in the launcher that can be used to bring F-Droid back by entering a pre-defined PIN.
60 lines
2.4 KiB
XML
60 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<android.support.constraint.ConstraintLayout 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">
|
|
|
|
<ImageView
|
|
android:id="@+id/launcherIcon"
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:layout_marginLeft="24dp"
|
|
android:layout_marginStart="24dp"
|
|
android:layout_marginTop="16dp"
|
|
android:contentDescription="@string/hiding_calculator"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:srcCompat="@mipmap/ic_calculator_launcher" />
|
|
|
|
<TextView
|
|
android:id="@+id/appName"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="0dp"
|
|
android:layout_marginLeft="8dp"
|
|
android:layout_marginStart="8dp"
|
|
android:gravity="center_vertical"
|
|
android:text="@string/hiding_calculator"
|
|
android:textSize="18sp"
|
|
app:layout_constraintBottom_toBottomOf="@+id/launcherIcon"
|
|
app:layout_constraintStart_toEndOf="@+id/launcherIcon"
|
|
app:layout_constraintTop_toTopOf="@+id/launcherIcon" />
|
|
|
|
<TextView
|
|
android:id="@+id/pin"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="0dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_marginStart="8dp"
|
|
android:gravity="center_vertical"
|
|
android:text="@integer/unhidePin"
|
|
android:textColor="@color/red"
|
|
android:textSize="18sp"
|
|
app:layout_constraintBottom_toBottomOf="@+id/launcherIcon"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toEndOf="@+id/appName"
|
|
app:layout_constraintTop_toTopOf="@+id/launcherIcon" />
|
|
|
|
<TextView
|
|
android:id="@+id/warningText"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="8dp"
|
|
android:layout_marginRight="8dp"
|
|
android:layout_marginTop="8dp"
|
|
android:text="@string/hiding_dialog_warning"
|
|
android:textColor="?android:textColorPrimary"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="@+id/launcherIcon"
|
|
app:layout_constraintTop_toBottomOf="@+id/launcherIcon" />
|
|
|
|
</android.support.constraint.ConstraintLayout> |