package com.aajtech.ui.android.widget;

import javax.inject.Inject;

import com.aajtech.ui.android.style.StyleResolver;
import com.aajtech.ui.core.api.Button;

import android.content.Context;

public class AndroidButton extends AndroidLabel implements Button {
	@Inject
	public AndroidButton(Context context, StyleResolver styleResolver) {
		this(new android.widget.Button(context), styleResolver);
	}

	public AndroidButton(android.widget.Button button, StyleResolver styleResolver) {
		super(button, styleResolver);
	}
}

@@ -339,46 +339,21 @@
 %7B%0A%09%09
-this(new android.widget.Button
+super
 (context
 ), s
@@ -348,17 +348,16 @@
 (context
-)
 , styleR
@@ -445,32 +445,32 @@
 tyleResolver) %7B%0A
-
 %09%09super(button, 
@@ -487,11 +487,422 @@
 ver);%0A%09%7D
+%0A%0A%09@Override%0A%09android.widget.Button buildControl(Context context, int styleResource) %7B%0A%09%09android.widget.Button button = styleResource == 0 ? new android.widget.Button(context) : new android.widget.Button(context, null, styleResource);%0A%09%09// Set focusable to false so it can be added to lists.%0A%09%09// Click event on lists fails randomly if the widget is focusable. %0A%09%09button.setFocusable(false);%0A%09%09return button;%0A%09%7D
 %0A%7D%0A

Button focusable set to false