* Note that this class only handles the visual * aspects of the button. In order to trigger an action, register a listener using * {@link #setOnClickListener(OnClickListener)}. */ public class WearGoogleSignInButton extends LinearLayout { public WearGoogleSignInButton(Context context) { this(context, null); } public WearGoogleSignInButton(Context context, @Nullable AttributeSet attrs) { this(context, attrs, 0); } public WearGoogleSignInButton(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { this(context, attrs, defStyleAttr, 0); } public WearGoogleSignInButton( Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); LayoutInflater.from(context).inflate(R.layout.wear_google_signin_btn_layout, this); setGravity(Gravity.START | Gravity.CENTER_VERTICAL); setFocusable(true); } @Override public void setEnabled(boolean enabled) { super.setEnabled(enabled); for (int i = 0; i < getChildCount(); i++) { getChildAt(i).setEnabled(enabled); } } }