When I check the QuickContactBadge in FrameLayout , I found the following code:
public QuickContactBadge(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); TypedArray a = context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.QuickContactBadge, defStyle, 0); mMode = a.getInt(com.android.internal.R.styleable.QuickContactBadge_quickContactWindowSize, QuickContact.MODE_MEDIUM); a.recycle(); init(); mBadgeBackground = getBackground(); }
I really don't understand the value of the defstyle parameter and 0 in obtainStyledAttributes() . I looked at the link, but still do not know what it was used for.
source share