From b730cb099f775b650b0c0738c2d88edafeb63d04 Mon Sep 17 00:00:00 2001 From: Somethingweirdhere Date: Sat, 16 Jun 2018 11:49:02 +0200 Subject: [PATCH] Fixed 4. buggy behavior when adding a new tab. --- .../newpipe/settings/ContentSettingsMain.java | 3 -- .../settings/ContentSettingsMainDialog.java | 11 +---- .../res/layout/dialog_contentsettingtab.xml | 40 +++---------------- 3 files changed, 6 insertions(+), 48 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsMain.java b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsMain.java index 0c31630e0..24eaa5aab 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsMain.java +++ b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsMain.java @@ -184,9 +184,6 @@ public class ContentSettingsMain extends Fragment { class TabViewHolder extends RecyclerView.ViewHolder { TextView text; - Button remove; - Button up; - Button down; public TabViewHolder(View itemView) { super(itemView); diff --git a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsMainDialog.java b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsMainDialog.java index 513c7cd69..aae4b4898 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsMainDialog.java +++ b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsMainDialog.java @@ -101,26 +101,17 @@ public class ContentSettingsMainDialog extends DialogFragment { class TabViewHolder extends RecyclerView.ViewHolder { TextView text; - Button add; - Button up; - Button down; View view; public TabViewHolder(View itemView) { super(itemView); text = itemView.findViewById(R.id.tabName); - add = itemView.findViewById(R.id.buttonAddRemove); - up = itemView.findViewById(R.id.buttonUp); - down = itemView.findViewById(R.id.buttonDown); - view = itemView; + view = itemView.findViewById(R.id.layout); } void bind(int position) { - up.setBackgroundResource(0); - down.setBackgroundResource(0); text.setText(allTabs[position]); - add.setBackgroundResource(0); view.setOnClickListener(v -> { addTab(position); }); diff --git a/app/src/main/res/layout/dialog_contentsettingtab.xml b/app/src/main/res/layout/dialog_contentsettingtab.xml index e2f0be6ae..947a5bdf6 100644 --- a/app/src/main/res/layout/dialog_contentsettingtab.xml +++ b/app/src/main/res/layout/dialog_contentsettingtab.xml @@ -1,51 +1,21 @@ - -