package jasenmoloy.wirelesscontrol.helpers;

import android.widget.Button;

/**
 * Created by jasenmoloy on 5/20/16.
 */
public class UIHelper {

    /**
     * Visually and functionally enables a button
     * @param button        The button to enable
     */
    public static void enableButton(Button button) {
        button.setAlpha(1.0f);
        button.setClickable(true);
    }

    /**
     * Visually and functionally disables a button
     * @param button        The button to disable
     */
    public static void disableButton(Button button) {
        button.setAlpha(0.25f); //Make the button transparent to visually show the button is disabled.
        button.setClickable(false);
    }
}

@@ -57,21 +57,82 @@
 oid.
-widget.Button
+content.Context;%0Aimport android.widget.Button;%0Aimport android.widget.Toast
 ;%0A%0A/
@@ -756,11 +756,156 @@
 );%0A    %7D
+%0A%0A    public static void displayToast(Context context, int duration, String text) %7B%0A        Toast.makeText(context, text, duration).show();%0A    %7D
 %0A%7D%0A

Add ability to display toasts