@Test public void testStartMarginMatchesSmallIcon() { SubheaderListItem subheader = new SubheaderListItem(mActivity, "text"); subheader.setTextStartMarginType(SubheaderListItem.TEXT_START_MARGIN_TYPE_SMALL); TextListItem item = new TextListItem(mActivity); item.setTitle("title"); item.setPrimaryActionIcon(android.R.drawable.sym_def_app_icon, false); setupPagedListView(Arrays.asList(subheader, item)); assertThat(getViewHolderAtPosition(0).getText().getLeft(), is(equalTo(getTextViewHolderAtPosition(1).getTitle().getLeft()))); }
public void setTextStartMarginType(@TextStartMarginType int type) { mTextStartMarginType = type; markDirty(); }
SubheaderListItem extends ListItem<SubheaderListItem.ViewHolder> { public void setTextStartMarginType(@TextStartMarginType int type) { mTextStartMarginType = type; markDirty(); } }
SubheaderListItem extends ListItem<SubheaderListItem.ViewHolder> { public void setTextStartMarginType(@TextStartMarginType int type) { mTextStartMarginType = type; markDirty(); } SubheaderListItem(Context context, String text); }
SubheaderListItem extends ListItem<SubheaderListItem.ViewHolder> { public void setTextStartMarginType(@TextStartMarginType int type) { mTextStartMarginType = type; markDirty(); } SubheaderListItem(Context context, String text); static ViewHolder createViewHolder(View itemView); void setTextStartMarginType(@TextStartMarginType int type); void setText(String text); @Override int getViewType(); }
SubheaderListItem extends ListItem<SubheaderListItem.ViewHolder> { public void setTextStartMarginType(@TextStartMarginType int type) { mTextStartMarginType = type; markDirty(); } SubheaderListItem(Context context, String text); static ViewHolder createViewHolder(View itemView); void setTextStartMarginType(@TextStartMarginType int type); void setText(String text); @Override int getViewType(); static final int TEXT_START_MARGIN_TYPE_NONE; static final int TEXT_START_MARGIN_TYPE_SMALL; static final int TEXT_START_MARGIN_TYPE_LARGE; }