fedilab-Android-App/app/src/lite/res/layout/activity_settings.xml

634 lines
24 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2020 Thomas Schneider
This file is a part of Fedilab
This program is free software; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation; either version 3 of the
License, or (at your option) any later version.
Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along with Fedilab; if not,
see <http://www.gnu.org/licenses>.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/activity_vertical_margin"
android:scrollbars="none">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- EXPAND CW -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/expand_cw"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_expand_cw"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<!-- EXPAND Images -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/expand_image"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_expand_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/set_share_validation"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_share_validation"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/set_share_validation_fav"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_share_validation_fav"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<!-- DISPLAY QUICK REPLY -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_quick_reply"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_quick_reply_indication"
android:textColor="@color/mastodonC2"
android:textSize="12sp" />
</LinearLayout>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_quick_reply"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<!-- FIT PREVIEWS -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_fit_preview"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_fit_preview_indication"
android:textColor="@color/mastodonC2"
android:textSize="12sp" />
</LinearLayout>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_fit_preview"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<!-- GIF AVATARS -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/set_disable_gif"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_disable_gif"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/set_disable_animated_emoji"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_disable_animated_emoji"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/set_display_card"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_display_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_clear_cache_exit"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_clear_cache_exit_indication"
android:textColor="@color/mastodonC2"
android:textSize="12sp" />
</LinearLayout>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_clear_cache_exit"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_display_content_after_fetch_more"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_display_content_after_fetch_more_indication"
android:textColor="@color/mastodonC2"
android:textSize="12sp" />
</LinearLayout>
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_display_content_after_fetch_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="10dp"
android:text="@string/set_notify"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_notify"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center" />
</LinearLayout>
<!-- Choose stream -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<Spinner
android:id="@+id/set_live_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<TextView
android:id="@+id/set_live_type_indication"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_option_margin"
android:textColor="@color/mastodonC2" />
<LinearLayout
android:id="@+id/live_notif_per_account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/set_allow_live_notifications_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_allow_live_notifications"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_allow_live_notifications_indication"
android:textColor="@color/mastodonC2"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_allow_live_notifications"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageButton
android:id="@+id/set_allow_live_notifications_others"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="end"
android:contentDescription="@string/live_notif"
android:padding="5dp"
android:src="@drawable/ic_account_circle_acct" />
</LinearLayout>
</LinearLayout>
<!-- TRUNCATE LONG TOOTS -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:text="@string/set_truncate_toot"
android:textSize="16sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/set_truncate_toots"
android:layout_width="20dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:textSize="16sp" />
<SeekBar
android:id="@+id/set_truncate_size"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<!-- NSFW Timeout -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:text="@string/set_nsfw_timeout"
android:textSize="16sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/set_nsfw_timeout_value"
android:layout_width="20dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:textSize="16sp" />
<SeekBar
android:id="@+id/set_nsfw_timeout"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_weight="1"
android:text="@string/set_automatically_split_toot"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/set_automatically_split_toot"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:id="@+id/set_split_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<EditText
android:id="@+id/set_split_text"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:inputType="number"
android:textSize="16sp" />
<SeekBar
android:id="@+id/set_split_size"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:id="@+id/toot_visibility_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:layout_marginBottom="@dimen/settings_option_margin"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/toots_visibility_tilte"
android:textSize="16sp" />
<ImageButton
android:id="@+id/set_toot_visibility"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="20dp"
android:contentDescription="@string/toot_visibility_tilte"
android:padding="5dp"
android:src="@drawable/ic_public" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:text="@string/set_invidious"
android:textSize="16sp" />
<EditText
android:id="@+id/set_invidious_host"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_option_margin"
android:hint="@string/set_invidious_host"
android:inputType="textWebEditText" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_option_margin"
android:text="@string/set_nitter"
android:textSize="16sp" />
<EditText
android:id="@+id/set_nitter_host"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_option_margin"
android:hint="@string/set_nitter_host"
android:inputType="textWebEditText" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_bibliogram"
android:textSize="16sp" />
<EditText
android:id="@+id/set_bibliogram_host"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_option_margin"
android:hint="@string/set_bibliogram_host"
android:inputType="textWebEditText" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_libreddit"
android:textSize="16sp" />
<EditText
android:id="@+id/set_libreddit_host"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/settings_option_margin"
android:hint="@string/set_libreddit_host"
android:inputType="textWebEditText" />
</LinearLayout>
</ScrollView>