aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2016-03-18 17:53:08 -0700
committerScott Jackson <daneren2005@gmail.com>2016-03-18 17:53:08 -0700
commit4077a554cd7a00b49c1ca88b3a7800222d6ebd10 (patch)
tree269d2deaf2c5d6dd3c642f2f7318a09d81764c29 /app/src/main
parent6e772d15f9407162d24773198b7f95ad700e4510 (diff)
downloaddsub-4077a554cd7a00b49c1ca88b3a7800222d6ebd10.tar.gz
dsub-4077a554cd7a00b49c1ca88b3a7800222d6ebd10.tar.bz2
dsub-4077a554cd7a00b49c1ca88b3a7800222d6ebd10.zip
Add sectionIndex to onBindHeaderHolder
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java2
-rw-r--r--app/src/main/java/github/daneren2005/dsub/adapter/EntryGridAdapter.java4
-rw-r--r--app/src/main/java/github/daneren2005/dsub/adapter/MainAdapter.java2
-rw-r--r--app/src/main/java/github/daneren2005/dsub/adapter/PodcastChannelAdapter.java5
-rw-r--r--app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java4
-rw-r--r--app/src/main/java/github/daneren2005/dsub/adapter/SettingsAdapter.java5
6 files changed, 8 insertions, 14 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java
index 5feaa482..207dc0b2 100644
--- a/app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java
+++ b/app/src/main/java/github/daneren2005/dsub/adapter/ArtistAdapter.java
@@ -92,7 +92,7 @@ public class ArtistAdapter extends SectionAdapter<Artist> implements FastScrolle
return new UpdateView.UpdateViewHolder(header, false);
}
@Override
- public void onBindHeaderHolder(UpdateView.UpdateViewHolder holder, String header) {
+ public void onBindHeaderHolder(UpdateView.UpdateViewHolder holder, String header, int sectionIndex) {
TextView folderName = (TextView) holder.getView().findViewById(R.id.select_artist_folder_2);
String musicFolderId = Util.getSelectedMusicFolderId(context);
diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/EntryGridAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/EntryGridAdapter.java
index 71e78e4b..b07d4731 100644
--- a/app/src/main/java/github/daneren2005/dsub/adapter/EntryGridAdapter.java
+++ b/app/src/main/java/github/daneren2005/dsub/adapter/EntryGridAdapter.java
@@ -16,14 +16,12 @@
package github.daneren2005.dsub.adapter;
import android.content.Context;
-import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
-import java.util.ArrayList;
import java.util.List;
import github.daneren2005.dsub.R;
@@ -96,7 +94,7 @@ public class EntryGridAdapter extends SectionAdapter<Entry> {
public UpdateViewHolder onCreateHeaderHolder(ViewGroup parent) {
return new UpdateViewHolder(header, false);
}
- public void onBindHeaderHolder(UpdateViewHolder holder, String header) {
+ public void onBindHeaderHolder(UpdateViewHolder holder, String header, int sectionIndex) {
}
diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/MainAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/MainAdapter.java
index 473366fe..dd70aa99 100644
--- a/app/src/main/java/github/daneren2005/dsub/adapter/MainAdapter.java
+++ b/app/src/main/java/github/daneren2005/dsub/adapter/MainAdapter.java
@@ -77,7 +77,7 @@ public class MainAdapter extends SectionAdapter<Integer> {
return new UpdateView.UpdateViewHolder(new BasicHeaderView(context, R.layout.album_list_header));
}
@Override
- public void onBindHeaderHolder(UpdateView.UpdateViewHolder holder, String header) {
+ public void onBindHeaderHolder(UpdateView.UpdateViewHolder holder, String header, int sectionIndex) {
UpdateView view = holder.getUpdateView();
CheckBox checkBox = (CheckBox) view.findViewById(R.id.item_checkbox);
diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/PodcastChannelAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/PodcastChannelAdapter.java
index aeb98a6b..97d29407 100644
--- a/app/src/main/java/github/daneren2005/dsub/adapter/PodcastChannelAdapter.java
+++ b/app/src/main/java/github/daneren2005/dsub/adapter/PodcastChannelAdapter.java
@@ -131,11 +131,11 @@ public class PodcastChannelAdapter extends SectionAdapter<Serializable> implemen
@Override
public UpdateView.UpdateViewHolder onCreateHeaderHolder(ViewGroup parent) {
- return new UpdateView.UpdateViewHolder(new BasicHeaderView(context, R.layout.newest_episode_header));
+ return new UpdateView.UpdateViewHolder(new BasicHeaderView(context, R.layout.expandable_header));
}
@Override
- public void onBindHeaderHolder(UpdateView.UpdateViewHolder holder, String header) {
+ public void onBindHeaderHolder(UpdateView.UpdateViewHolder holder, String header, int sectionIndex) {
UpdateView view = holder.getUpdateView();
ImageView toggleSelectionView = (ImageView) view.findViewById(R.id.item_select);
@@ -164,7 +164,6 @@ public class PodcastChannelAdapter extends SectionAdapter<Serializable> implemen
}
((ImageView) v).setImageResource(DrawableTint.getDrawableRes(context, selectToggleAttr));
-
}
});
toggleSelectionView.setImageResource(DrawableTint.getDrawableRes(context, selectToggleAttr));
diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java
index fbed4d7a..33bbb384 100644
--- a/app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java
+++ b/app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java
@@ -194,7 +194,7 @@ public abstract class SectionAdapter<T> extends RecyclerView.Adapter<UpdateViewH
for(List<T> section: sections) {
boolean validHeader = headers.get(subHeader) != null;
if(position == subPosition && validHeader) {
- onBindHeaderHolder(holder, headers.get(subHeader));
+ onBindHeaderHolder(holder, headers.get(subHeader), subHeader);
return;
}
@@ -289,7 +289,7 @@ public abstract class SectionAdapter<T> extends RecyclerView.Adapter<UpdateViewH
public UpdateViewHolder onCreateHeaderHolder(ViewGroup parent) {
return new UpdateViewHolder(new BasicHeaderView(context));
}
- public void onBindHeaderHolder(UpdateViewHolder holder, String header) {
+ public void onBindHeaderHolder(UpdateViewHolder holder, String header, int sectionIndex) {
UpdateView view = holder.getUpdateView();
if(view != null) {
view.setObject(header);
diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/SettingsAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/SettingsAdapter.java
index 51d08a99..4e75a2f7 100644
--- a/app/src/main/java/github/daneren2005/dsub/adapter/SettingsAdapter.java
+++ b/app/src/main/java/github/daneren2005/dsub/adapter/SettingsAdapter.java
@@ -16,15 +16,12 @@
package github.daneren2005.dsub.adapter;
import android.content.Context;
-import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.ImageView;
import android.widget.TextView;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import github.daneren2005.dsub.R;
@@ -82,7 +79,7 @@ public class SettingsAdapter extends SectionAdapter<Setting> {
View header = LayoutInflater.from(context).inflate(R.layout.user_header, parent, false);
return new UpdateView.UpdateViewHolder(header, false);
}
- public void onBindHeaderHolder(UpdateView.UpdateViewHolder holder, String description) {
+ public void onBindHeaderHolder(UpdateView.UpdateViewHolder holder, String description, int sectionIndex) {
View header = holder.getView();
RecyclingImageView coverArtView = (RecyclingImageView) header.findViewById(R.id.user_avatar);