Commit 58c3a5fc authored by Thomas's avatar Thomas
Browse files

Comment #467 #464 - apply theme on buttons

parent b09e21a5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 -> {
+2 −0
Original line number Diff line number Diff line
@@ -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 -> {
+3 −1
Original line number Diff line number Diff line
<?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"
+3 −2
Original line number Diff line number Diff line
@@ -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>
 No newline at end of file
</androidx.core.widget.NestedScrollView>
 No newline at end of file