Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download KFS crosswords in .jpz format #149

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -26,21 +26,25 @@ public SeparatedRecyclerViewAdapter(int textViewId) {
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
if(viewType == HEADER){
// For headers, we can create a simple text holder.
TextView view = (TextView) LayoutInflater.from(viewGroup.getContext())
.inflate(textViewId, viewGroup, false);
return new SimpleTextViewHolder(view);
} else {
RecyclerView.ViewHolder result = null;
while(result == null){
for(RecyclerView.Adapter sectionAdapter : sections.values()){
try {
result = sectionAdapter.onCreateViewHolder(viewGroup, viewType);
} catch(Exception e){
e.printStackTrace();
}
// For puzzle views, any sectionAdapter can be used to create the view holder, so find
// the first one that gives us a result.
for(RecyclerView.Adapter sectionAdapter : sections.values()){
RecyclerView.ViewHolder result = null;
try {
result = sectionAdapter.onCreateViewHolder(viewGroup, viewType);
} catch(Exception e){
e.printStackTrace();
}
if (result != null) {
return result;
}
}
return result;
return null;
}
}