Java code file

the extends the TextView class MyTextView {public
// called when the code created with the
public MyTextView (the Context context) {
the this (context, null);
}

XML identification // This method is called when creating Textview, reflecting the underlying would go to pick up an attribute value AttribestSet
public MyTextView (the Context context, AttributeSet attrs @Nullable) {
the this (context, attrs, 0);
}

// constructor to the first and the second uses
public MyTextView (the Context context, AttributeSet attrs @Nullable, int defStyleAttr) {
Super (context, attrs, defStyleAttr);
}

// solve a problem, it is necessary to obtain a focus Textview natural
@Override
public Boolean isFocused (http://www.amjmh.com/v/) {
return to true;
}
}

Guess you like

Origin www.cnblogs.com/ly570/p/11373136.html