@SuppressWarnings("ResourceType") @Test public void testSetTextFromXml() throws IOException, XmlPullParserException { final XmlResourceParser parser = mContext.getResources().getXml(R.layout.test_mixin_attributes); while (!TemplateLayout.class.getName().equals(parser.getName())) { parser.next(); } new HeaderMixin(mTemplateLayout, Xml.asAttributeSet(parser), 0); assertEquals("lorem ipsum", mHeaderTextView.getText()); }
public CharSequence getText() { final TextView titleView = getTextView(); return titleView != null ? titleView.getText() : null; }
HeaderMixin implements Mixin { public CharSequence getText() { final TextView titleView = getTextView(); return titleView != null ? titleView.getText() : null; } }
HeaderMixin implements Mixin { public CharSequence getText() { final TextView titleView = getTextView(); return titleView != null ? titleView.getText() : null; } HeaderMixin(@NonNull TemplateLayout layout, @Nullable AttributeSet attrs,
            @AttrRes int defStyleAttr); }
HeaderMixin implements Mixin { public CharSequence getText() { final TextView titleView = getTextView(); return titleView != null ? titleView.getText() : null; } HeaderMixin(@NonNull TemplateLayout layout, @Nullable AttributeSet attrs,
            @AttrRes int defStyleAttr); TextView getTextView(); void setText(int title); void setText(CharSequence title); CharSequence getText(); }
HeaderMixin implements Mixin { public CharSequence getText() { final TextView titleView = getTextView(); return titleView != null ? titleView.getText() : null; } HeaderMixin(@NonNull TemplateLayout layout, @Nullable AttributeSet attrs,
            @AttrRes int defStyleAttr); TextView getTextView(); void setText(int title); void setText(CharSequence title); CharSequence getText();  }