[go: nahoru, domu]

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

Bugfixes #56

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
More generic CategoryArrayAdapter
  • Loading branch information
maxme committed Sep 18, 2013
commit ede697af959fdd232315cbd0cc9cb74fb78f6b0d
4 changes: 3 additions & 1 deletion src/org/wordpress/android/ui/posts/CategoryArrayAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@
import java.util.List;

public class CategoryArrayAdapter extends ArrayAdapter<CategoryNode> {
int mResourceId;

public CategoryArrayAdapter(Context context, int resource, List<CategoryNode> objects) {
super(context, resource, objects);
mResourceId = resource;
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View rowView = inflater.inflate(R.layout.categories_row, parent, false);
View rowView = inflater.inflate(mResourceId, parent, false);
TextView textView = (TextView) rowView.findViewById(R.id.categoryRowText);
ImageView levelIndicatorView = (ImageView) rowView.findViewById(R.id.categoryRowLevelIndicator);
textView.setText(Html.fromHtml(getItem(position).getName()));
Expand Down