Calculator_Fragment

The activity (GUI) for the calculator. Display and Buttons are managed here.

Author

"Martin Krischik" «krischik@users.sourceforge.net»

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
a button for the haptic feedback.
Link copied to clipboard
private val Key_CLx: Int = 56
Clear button
Link copied to clipboard
val TAG: String
logging tag
Link copied to clipboard
protected open var Text_Display: TextView
The text field to update

Functions

Link copied to clipboard
protected open fun After_Views()
Called when the views are injected.
Link copied to clipboard
open fun asFragment(): Fragment
Returns the instance as a Fragment (saves you an instanceOf check and cast)
Link copied to clipboard
abstract fun bindService(Service: Calculator_Service)
Bind or unbind the calculator service
Link copied to clipboard
a button for the haptic feedback.
Link copied to clipboard
open fun displayException(Exception: Throwable)
display additional information on the error.
Link copied to clipboard
Text currently displayed
Link copied to clipboard
open fun getDisplayText(i: Int): Array<Short>
Link copied to clipboard
Set the indicators (Shift, Alpha, Deg, Grad, Gra, etc.
Link copied to clipboard
open fun getJavaText(): String
open fun getJavaText(i: Int): String
Link copied to clipboard
abstract fun getResources(): Resources
Link copied to clipboard
private open fun initKeyboard()
create buttons
Link copied to clipboard
open fun onActivityCreated(savedInstanceState: Bundle)
Called when a fragment is first attached to its activity.
Link copied to clipboard
open fun onAttach(activity: Activity)
Called when a fragment is first attached to its activity.
Link copied to clipboard
open fun onCreate(savedInstanceState: Bundle)
Called when the activity is first created.
Link copied to clipboard
open fun onDetach()
Called when the fragment is no longer attached to its activity.
Link copied to clipboard
open fun onResume()
Called when the fragment is visible to the user and actively running.
Link copied to clipboard
open fun onSaveInstanceState(outState: Bundle)
Called to ask the fragment to save its current dynamic state, so it can later be reconstructed in a new instance of its process is restarted.
Link copied to clipboard
protected open fun redrawAll()
Link copied to clipboard
open fun setDisplayText(Row: Int, Text: Array<Short>)
Set text to be displayed (calculator alpha codes).
Link copied to clipboard
fun setIndicators(Indicators: Array<Boolean>)
Set the indicators (Shift, Alpha, Deg, Grad, Gra, etc.
Link copied to clipboard
open fun setJavaText(javaText: String)
Set javaText to be displayed (java string).
Link copied to clipboard
open fun setOnOff(on: Boolean)
set the calculators on of status.
Link copied to clipboard
open fun setPressedKey(pressedKey: Short)
Get calculator key code of the currently pressed key.
Link copied to clipboard
open fun toString(): String
Generate string for debug purpose