mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-29 04:17:12 +01:00
Prepare to add post filter.
This commit is contained in:
parent
c3b2ffa653
commit
06d1d028eb
@ -32,7 +32,13 @@
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:replace="android:label">
|
||||
<activity android:name=".activities.SubredditFilterPopularAndAllActivity"
|
||||
<activity android:name=".activities.CustomizePostFilterActivity"
|
||||
android:parentActivityName=".activities.SettingsActivity"
|
||||
android:label="@string/customize_post_filter_activity_label"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
<activity
|
||||
android:name=".activities.SubredditFilterPopularAndAllActivity"
|
||||
android:label="@string/subreddit_filter_popular_and_all_activity_label"
|
||||
android:parentActivityName=".activities.SettingsActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
|
@ -6,6 +6,7 @@ import dagger.Component;
|
||||
import ml.docilealligator.infinityforreddit.activities.AccountPostsActivity;
|
||||
import ml.docilealligator.infinityforreddit.activities.AccountSavedThingActivity;
|
||||
import ml.docilealligator.infinityforreddit.activities.CommentActivity;
|
||||
import ml.docilealligator.infinityforreddit.activities.CustomizePostFilterActivity;
|
||||
import ml.docilealligator.infinityforreddit.activities.FullMarkdownActivity;
|
||||
import ml.docilealligator.infinityforreddit.activities.CreateMultiRedditActivity;
|
||||
import ml.docilealligator.infinityforreddit.activities.CustomThemeListingActivity;
|
||||
@ -227,4 +228,6 @@ public interface AppComponent {
|
||||
void inject(MiscellaneousPreferenceFragment miscellaneousPreferenceFragment);
|
||||
|
||||
void inject(SubredditFilterPopularAndAllActivity subredditFilterPopularAndAllActivity);
|
||||
|
||||
void inject(CustomizePostFilterActivity customizePostFilterActivity);
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class PostFilter {
|
||||
public int maxVote = -1;
|
||||
public int minVote = -1;
|
||||
public int maxComments = -1;
|
||||
public int minComments = -1;
|
||||
public int maxAwards = -1;
|
||||
public int minAwards = -1;
|
||||
public boolean onlyNSFW;
|
||||
public boolean onlySpoiler;
|
||||
public String postTitleRegex;
|
||||
public ArrayList<String> postTitleExcludesStrings;
|
||||
public ArrayList<String> excludesSubreddits;
|
||||
public ArrayList<String> excludesUsers;
|
||||
public ArrayList<Flair> containsFlairs;
|
||||
public ArrayList<Flair> excludesFlairs;
|
||||
public ArrayList<Integer> containsPostTypes;
|
||||
}
|
@ -0,0 +1,161 @@
|
||||
package ml.docilealligator.infinityforreddit.activities;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
import com.google.android.material.appbar.CollapsingToolbarLayout;
|
||||
import com.google.android.material.checkbox.MaterialCheckBox;
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
import com.r0adkll.slidr.Slidr;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.Infinity;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
|
||||
import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper;
|
||||
import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils;
|
||||
|
||||
public class CustomizePostFilterActivity extends BaseActivity {
|
||||
|
||||
@BindView(R.id.coordinator_layout_customize_post_filter_activity)
|
||||
CoordinatorLayout coordinatorLayout;
|
||||
@BindView(R.id.appbar_layout_customize_post_filter_activity)
|
||||
AppBarLayout appBarLayout;
|
||||
@BindView(R.id.collapsing_toolbar_layout_customize_post_filter_activity)
|
||||
CollapsingToolbarLayout collapsingToolbarLayout;
|
||||
@BindView(R.id.toolbar_customize_post_filter_activity)
|
||||
Toolbar toolbar;
|
||||
@BindView(R.id.post_type_text_linear_layout_customize_post_filter_activity)
|
||||
LinearLayout postTypeTextLinearLayout;
|
||||
@BindView(R.id.post_type_text_text_view_customize_post_filter_activity)
|
||||
TextView postTypeTextTextView;
|
||||
@BindView(R.id.post_type_text_check_box_customize_post_filter_activity)
|
||||
MaterialCheckBox postTypeTextCheckBox;
|
||||
@BindView(R.id.post_type_link_linear_layout_customize_post_filter_activity)
|
||||
LinearLayout postTypeLinkLinearLayout;
|
||||
@BindView(R.id.post_type_link_text_view_customize_post_filter_activity)
|
||||
TextView postTypeLinkTextView;
|
||||
@BindView(R.id.post_type_link_check_box_customize_post_filter_activity)
|
||||
MaterialCheckBox postTypeLinkCheckBox;
|
||||
@BindView(R.id.post_type_image_linear_layout_customize_post_filter_activity)
|
||||
LinearLayout postTypeImageLinearLayout;
|
||||
@BindView(R.id.post_type_image_text_view_customize_post_filter_activity)
|
||||
TextView postTypeImageTextView;
|
||||
@BindView(R.id.post_type_image_check_box_customize_post_filter_activity)
|
||||
MaterialCheckBox postTypeImageCheckBox;
|
||||
@BindView(R.id.post_type_video_linear_layout_customize_post_filter_activity)
|
||||
LinearLayout postTypeVideoLinearLayout;
|
||||
@BindView(R.id.post_type_video_text_view_customize_post_filter_activity)
|
||||
TextView postTypeVideoTextView;
|
||||
@BindView(R.id.post_type_video_check_box_customize_post_filter_activity)
|
||||
MaterialCheckBox postTypeVideoCheckBox;
|
||||
@BindView(R.id.title_excludes_strings_text_input_edit_text_customize_post_filter_activity)
|
||||
TextInputEditText titleExcludesStringsTextInputEditText;
|
||||
@BindView(R.id.title_excludes_regex_text_input_edit_text_customize_post_filter_activity)
|
||||
TextInputEditText titleExcludesRegexTextInputEditText;
|
||||
@BindView(R.id.excludes_subreddits_text_input_edit_text_customize_post_filter_activity)
|
||||
TextInputEditText excludesSubredditsTextInputEditText;
|
||||
@BindView(R.id.excludes_users_text_input_edit_text_customize_post_filter_activity)
|
||||
TextInputEditText excludesUsersTextInputEditText;
|
||||
@BindView(R.id.excludes_flairs_text_input_edit_text_customize_post_filter_activity)
|
||||
TextInputEditText excludesFlairsTextInputEditText;
|
||||
@BindView(R.id.contains_flairs_text_input_edit_text_customize_post_filter_activity)
|
||||
TextInputEditText containsFlairsTextInputEditText;
|
||||
@BindView(R.id.min_vote_text_input_edit_text_customize_post_filter_activity)
|
||||
TextInputEditText minVoteTextInputEditText;
|
||||
@BindView(R.id.max_vote_text_input_edit_text_customize_post_filter_activity)
|
||||
TextInputEditText maxVoteTextInputEditText;
|
||||
@BindView(R.id.min_comments_text_input_edit_text_customize_post_filter_activity)
|
||||
TextInputEditText minCommentsTextInputEditText;
|
||||
@BindView(R.id.max_comments_text_input_edit_text_customize_post_filter_activity)
|
||||
TextInputEditText maxCommentsTextInputEditText;
|
||||
@BindView(R.id.min_awards_text_input_edit_text_customize_post_filter_activity)
|
||||
TextInputEditText minAwardsTextInputEditText;
|
||||
@BindView(R.id.max_awards_text_input_edit_text_customize_post_filter_activity)
|
||||
TextInputEditText maxAwardsTextInputEditText;
|
||||
@Inject
|
||||
RedditDataRoomDatabase mRedditDataRoomDatabase;
|
||||
@Inject
|
||||
@Named("default")
|
||||
SharedPreferences mSharedPreferences;
|
||||
@Inject
|
||||
CustomThemeWrapper mCustomThemeWrapper;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
((Infinity) getApplication()).getAppComponent().inject(this);
|
||||
|
||||
setImmersiveModeNotApplicable();
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_customize_post_filter);
|
||||
|
||||
ButterKnife.bind(this);
|
||||
|
||||
applyCustomTheme();
|
||||
|
||||
if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) {
|
||||
Slidr.attach(this);
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && isChangeStatusBarIconColor()) {
|
||||
addOnOffsetChangedListener(appBarLayout);
|
||||
}
|
||||
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
setToolbarGoToTop(toolbar);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SharedPreferences getDefaultSharedPreferences() {
|
||||
return mSharedPreferences;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CustomThemeWrapper getCustomThemeWrapper() {
|
||||
return mCustomThemeWrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void applyCustomTheme() {
|
||||
coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
|
||||
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
|
||||
int primaryTextColor = mCustomThemeWrapper.getPrimaryTextColor();
|
||||
titleExcludesStringsTextInputEditText.setTextColor(primaryTextColor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.customize_post_filter_activity, menu);
|
||||
applyMenuItemTheme(menu);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
if (item.getItemId() == android.R.id.home) {
|
||||
finish();
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.action_save_customize_post_filter_activity) {
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package ml.docilealligator.infinityforreddit.activities;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
@ -329,7 +330,8 @@ public class FilteredThingActivity extends BaseActivity implements SortTypeSelec
|
||||
}
|
||||
|
||||
fab.setOnClickListener(view -> {
|
||||
|
||||
Intent intent = new Intent(this, CustomizePostFilterActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
if (mAccessToken != null) {
|
||||
|
390
app/src/main/res/layout/activity_customize_post_filter.xml
Normal file
390
app/src/main/res/layout/activity_customize_post_filter.xml
Normal file
@ -0,0 +1,390 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/coordinator_layout_customize_post_filter_activity"
|
||||
tools:application=".CustomizePostFilterActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar_layout_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:id="@+id/collapsing_toolbar_layout_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:titleEnabled="false"
|
||||
app:toolbarId="@+id/toolbar_customize_post_filter_activity">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"
|
||||
app:navigationIcon="?attr/homeAsUpIndicator" />
|
||||
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/post_type_text_linear_layout_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/post_type_text_text_view_customize_post_filter_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/bottom_sheet_post_text" />
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/post_type_text_check_box_customize_post_filter_activity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/post_type_link_linear_layout_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/post_type_link_text_view_customize_post_filter_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/bottom_sheet_post_link" />
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/post_type_link_check_box_customize_post_filter_activity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/post_type_image_linear_layout_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/post_type_image_text_view_customize_post_filter_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/bottom_sheet_post_image" />
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/post_type_image_check_box_customize_post_filter_activity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/post_type_video_linear_layout_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/post_type_video_text_view_customize_post_filter_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/bottom_sheet_post_video" />
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/post_type_video_check_box_customize_post_filter_activity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/title_excludes_strings_text_input_edit_text_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
android:hint="@string/title_excludes_strings_hint" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/title_excludes_regex_text_input_edit_text_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
android:hint="@string/title_excludes_regex_hint" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/excludes_subreddits_text_input_edit_text_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
android:hint="@string/excludes_subreddits_hint" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/excludes_users_text_input_edit_text_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
android:hint="@string/excludes_users_hint" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/excludes_flairs_text_input_edit_text_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
android:hint="@string/excludes_flairs_hint" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/contains_flairs_text_input_edit_text_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
android:hint="@string/contains_flairs_hint" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/min_vote_text_input_edit_text_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
android:hint="@string/min_vote_hint" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/max_vote_text_input_edit_text_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
android:hint="@string/max_vote_hint" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/min_comments_text_input_edit_text_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
android:hint="@string/min_comments_hint" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/max_comments_text_input_edit_text_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
android:hint="@string/max_comments_hint" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/min_awards_text_input_edit_text_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
android:hint="@string/min_awards_hint" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/max_awards_text_input_edit_text_customize_post_filter_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
android:hint="@string/max_awards_hint" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
10
app/src/main/res/menu/customize_post_filter_activity.xml
Normal file
10
app/src/main/res/menu/customize_post_filter_activity.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/action_save_customize_post_filter_activity"
|
||||
android:orderInCategory="1"
|
||||
android:title="@string/action_save"
|
||||
android:icon="@drawable/ic_check_circle_toolbar_24dp"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
@ -34,6 +34,7 @@
|
||||
<string name="submit_crosspost_activity_label">Crosspost</string>
|
||||
<string name="give_award_activity_label">Give Award</string>
|
||||
<string name="subreddit_filter_popular_and_all_activity_label">r/all and r/popular</string>
|
||||
<string name="customize_post_filter_activity_label">Post Filter</string>
|
||||
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
@ -950,7 +951,18 @@
|
||||
<string name="select_video_quality">Select Video Quality</string>
|
||||
|
||||
<string name="hide_read_posts">Hide Read Posts</string>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
|
||||
<string name="title_excludes_strings_hint">Title: excludes keywords</string>
|
||||
<string name="title_excludes_regex_hint">Title: excludes regex</string>
|
||||
<string name="excludes_subreddits_hint">Excludes subreddits</string>
|
||||
<string name="excludes_users_hint">Excludes users</string>
|
||||
<string name="excludes_flairs_hint">Exclude flairs</string>
|
||||
<string name="contains_flairs_hint">Contains flairs</string>
|
||||
<string name="min_vote_hint">Min vote</string>
|
||||
<string name="max_vote_hint">Max vote</string>
|
||||
<string name="min_comments_hint">Min comments</string>
|
||||
<string name="max_comments_hint">Max comments</string>
|
||||
<string name="min_awards_hint">Min awards</string>
|
||||
<string name="max_awards_hint">Max awards</string>
|
||||
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user