Multiplication button for widget
This commit is contained in:
parent
3a0ac43585
commit
fa0357a0b4
@ -9,6 +9,7 @@ import android.util.Log;
|
|||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.RemoteViews;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import jscl.AngleUnit;
|
import jscl.AngleUnit;
|
||||||
import jscl.NumeralBase;
|
import jscl.NumeralBase;
|
||||||
@ -59,6 +60,9 @@ public final class CalculatorButtons {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void initMultiplicationButton(@NotNull RemoteViews views) {
|
||||||
|
views.setTextViewText(R.id.multiplicationButton, CalculatorLocatorImpl.getInstance().getEngine().getMultiplicationSign());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void toggleEqualsButton(@Nullable SharedPreferences preferences,
|
public static void toggleEqualsButton(@Nullable SharedPreferences preferences,
|
||||||
|
@ -120,6 +120,8 @@ public class CalculatorWidgetProvider extends AppWidgetProvider {
|
|||||||
updateEditorState(context, views, editorState);
|
updateEditorState(context, views, editorState);
|
||||||
updateDisplayState(context, views, displayState);
|
updateDisplayState(context, views, displayState);
|
||||||
|
|
||||||
|
CalculatorButtons.initMultiplicationButton(views);
|
||||||
|
|
||||||
appWidgetManager.updateAppWidget(appWidgetId, views);
|
appWidgetManager.updateAppWidget(appWidgetId, views);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user