fedilab-Android-App/app/src/main/res/layouts/mastodon/layout/popup_add_filter.xml

235 lines
9.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!--
Copyright 20222 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>.
-->
<androidx.core.widget.NestedScrollView 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="wrap_content">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp">
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/add_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/title"
android:importantForAutofill="noExcludeDescendants"
android:inputType="text"
android:singleLine="true" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/filter_expire" />
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/filter_expire"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/filter_context"
android:textSize="12sp" />
<TextView
android:id="@+id/contextDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/filter_context_explanations"
android:textColor="?colorPrimary"
android:textSize="12sp" />
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/context_home"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/context_home_list" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/context_public"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/context_public" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/context_notification"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/context_notification" />
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/context_conversation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/context_conversation" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/context_profiles"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/profiles" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/filter_action"
android:textSize="12sp" />
<TextView
android:id="@+id/actionDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/filter_action_explanations"
android:textColor="?colorPrimary"
android:textSize="12sp" />
<RadioGroup
android:id="@+id/location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RadioButton
android:id="@+id/action_hide"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hide_with_warning" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/val1_more"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:text="@string/hide_with_warning_description"
android:textSize="12sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RadioButton
android:id="@+id/action_remove"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/hide_completely" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:text="@string/hide_completely_description"
android:textSize="12sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</RadioGroup>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="@string/keyword_or_phrase" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="116dp"
android:layout_height="wrap_content"
android:hint="@string/context_whole_word" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/lv_keywords"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<com.google.android.material.button.MaterialButton
android:id="@+id/add_keyword"
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="10dp"
android:text="@string/add_keyword"
app:icon="@drawable/ic_baseline_add_24" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.core.widget.NestedScrollView>