in facebook-login/src/main/java/com/facebook/login/widget/LoginButton.java [819:859]
protected void parseLoginButtonAttributes(
final Context context,
final AttributeSet attrs,
final int defStyleAttr,
final int defStyleRes) {
this.toolTipMode = ToolTipMode.DEFAULT;
final TypedArray a =
context
.getTheme()
.obtainStyledAttributes(
attrs, R.styleable.com_facebook_login_view, defStyleAttr, defStyleRes);
try {
confirmLogout =
a.getBoolean(R.styleable.com_facebook_login_view_com_facebook_confirm_logout, true);
loginText = a.getString(R.styleable.com_facebook_login_view_com_facebook_login_text);
logoutText = a.getString(R.styleable.com_facebook_login_view_com_facebook_logout_text);
toolTipMode =
ToolTipMode.fromInt(
a.getInt(
R.styleable.com_facebook_login_view_com_facebook_tooltip_mode,
ToolTipMode.DEFAULT.getValue()));
// If no button radius specified, defaults to 'com_facebook_button_corner_radius'
if (a.hasValue(R.styleable.com_facebook_login_view_com_facebook_login_button_radius)) {
customButtonRadius =
a.getDimension(
R.styleable.com_facebook_login_view_com_facebook_login_button_radius, 0.0f);
}
customButtonTransparency =
a.getInteger(
R.styleable.com_facebook_login_view_com_facebook_login_button_transparency,
MAX_BUTTON_TRANSPARENCY);
if (customButtonTransparency < MIN_BUTTON_TRANSPARENCY) {
customButtonTransparency = MIN_BUTTON_TRANSPARENCY;
}
if (customButtonTransparency > MAX_BUTTON_TRANSPARENCY) {
customButtonTransparency = MAX_BUTTON_TRANSPARENCY;
}
} finally {
a.recycle();
}
}