parent
b09e21a589
commit
58c3a5fc35
|
@ -159,6 +159,7 @@ public class FilterActivity extends BaseActivity implements FilterAdapter.Delete
|
|||
|
||||
KeywordAdapter keywordAdapter = new KeywordAdapter(filterParams.keywords);
|
||||
popupAddFilterBinding.lvKeywords.setAdapter(keywordAdapter);
|
||||
popupAddFilterBinding.lvKeywords.setNestedScrollingEnabled(false);
|
||||
popupAddFilterBinding.lvKeywords.setLayoutManager(new LinearLayoutManager(context));
|
||||
|
||||
popupAddFilterBinding.addKeyword.setOnClickListener(v -> {
|
||||
|
|
|
@ -29,6 +29,7 @@ import java.util.List;
|
|||
import app.fedilab.android.R;
|
||||
import app.fedilab.android.client.entities.api.Filter;
|
||||
import app.fedilab.android.databinding.DrawerKeywordBinding;
|
||||
import app.fedilab.android.helper.ThemeHelper;
|
||||
|
||||
public class KeywordAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
private final List<Filter.KeywordsParams> keywordsParamsList;
|
||||
|
@ -86,6 +87,7 @@ public class KeywordAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
} else {
|
||||
holder.binding.mainContainer.setVisibility(View.VISIBLE);
|
||||
}
|
||||
holder.binding.deleteKeyword.setBackgroundTintList(ThemeHelper.getButtonActionColorStateList(context));
|
||||
holder.binding.wholeWord.setOnCheckedChangeListener((compoundButton, checked) -> keywordsParams.whole_word = checked);
|
||||
holder.binding.wholeWord.setChecked(keywordsParams.whole_word != null && keywordsParams.whole_word);
|
||||
holder.binding.deleteKeyword.setOnClickListener(v -> {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/main_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -17,7 +18,8 @@
|
|||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/whole_word"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp" />
|
||||
android:layout_height="48dp"
|
||||
app:buttonTint="@color/cyanea_accent_dark_reference" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/delete_keyword"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
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"
|
||||
<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">
|
||||
|
@ -220,6 +220,7 @@
|
|||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/lv_keywords"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
@ -238,4 +239,4 @@
|
|||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
Loading…
Reference in New Issue