mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-11-20 17:14:49 +00:00
Fixed 4. buggy behavior when adding a new tab.
This commit is contained in:
committed by
Christian Schabesberger
parent
fc94f184d2
commit
b730cb099f
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user