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()

Types

Link copied to clipboard
private class Font_Entry
The calculator specific font which consists of PNGs
Link copied to clipboard
private class Indicator
mapping between indicator, bitmap and drawable.

Properties

Link copied to clipboard
Text to be displayed on the calculator display.
Link copied to clipboard
open var Button_0: View
Link copied to clipboard
open var Calculator_Buttons_1: LinearLayout
calculator button table 1
Link copied to clipboard
open var Calculator_Buttons_2: LinearLayout
calculator button table 2
Link copied to clipboard
cross reference and cache all font characters.
Link copied to clipboard
open var Image_Character_0_0: ImageView
Link copied to clipboard
open var Image_Character_0_1: ImageView
Link copied to clipboard
open var Image_Character_0_10: ImageView
Link copied to clipboard
open var Image_Character_0_11: ImageView
Link copied to clipboard
open var Image_Character_0_12: ImageView
Link copied to clipboard
open var Image_Character_0_13: ImageView
Link copied to clipboard
open var Image_Character_0_14: ImageView
Link copied to clipboard
open var Image_Character_0_15: ImageView
Link copied to clipboard
open var Image_Character_0_2: ImageView
Link copied to clipboard
open var Image_Character_0_3: ImageView
Link copied to clipboard
open var Image_Character_0_4: ImageView
Link copied to clipboard
open var Image_Character_0_5: ImageView
Link copied to clipboard
open var Image_Character_0_6: ImageView
Link copied to clipboard
open var Image_Character_0_7: ImageView
Link copied to clipboard
open var Image_Character_0_8: ImageView
Link copied to clipboard
open var Image_Character_0_9: ImageView
Link copied to clipboard
open var Image_Character_1_0: ImageView
Link copied to clipboard
open var Image_Character_1_1: ImageView
Link copied to clipboard
open var Image_Character_1_10: ImageView
Link copied to clipboard
open var Image_Character_1_11: ImageView
Link copied to clipboard
open var Image_Character_1_12: ImageView
Link copied to clipboard
open var Image_Character_1_13: ImageView
Link copied to clipboard
open var Image_Character_1_14: ImageView
Link copied to clipboard
open var Image_Character_1_15: ImageView
Link copied to clipboard
open var Image_Character_1_2: ImageView
Link copied to clipboard
open var Image_Character_1_3: ImageView
Link copied to clipboard
open var Image_Character_1_4: ImageView
Link copied to clipboard
open var Image_Character_1_5: ImageView
Link copied to clipboard
open var Image_Character_1_6: ImageView
Link copied to clipboard
open var Image_Character_1_7: ImageView
Link copied to clipboard
open var Image_Character_1_8: ImageView
Link copied to clipboard
open var Image_Character_1_9: ImageView
Link copied to clipboard
open var Image_Exponent_0: ImageView
Link copied to clipboard
open var Image_Exponent_1: ImageView
Link copied to clipboard
open var Image_Exponent_2: ImageView
Link copied to clipboard
open var Image_Exponent_3: ImageView
Link copied to clipboard
open var Indicator_0: TextView
Link copied to clipboard
open var Indicator_1: TextView
Link copied to clipboard
open var Indicator_10: TextView
Link copied to clipboard
open var Indicator_11: TextView
Link copied to clipboard
open var Indicator_12: TextView
Link copied to clipboard
open var Indicator_13: TextView
Link copied to clipboard
open var Indicator_14: TextView
Link copied to clipboard
open var Indicator_15: TextView
Link copied to clipboard
open var Indicator_16: TextView
Link copied to clipboard
open var Indicator_17: TextView
Link copied to clipboard
open var Indicator_18: TextView
Link copied to clipboard
open var Indicator_19: TextView
Link copied to clipboard
open var Indicator_2: TextView
Link copied to clipboard
open var Indicator_3: TextView
Link copied to clipboard
open var Indicator_4: TextView
Link copied to clipboard
open var Indicator_5: TextView
Link copied to clipboard
open var Indicator_6: TextView
Link copied to clipboard
open var Indicator_7: TextView
Link copied to clipboard
open var Indicator_8: TextView
Link copied to clipboard
open var Indicator_9: TextView
Link copied to clipboard
indicators to be displayed.
Link copied to clipboard
mapping between indicator, bitmap and drawable.
Link copied to clipboard
private open var Large_Screen: Large_Screen_Type
use large screen.
Link copied to clipboard
private open var numericWidgets: Array<ImageView>
Display characters.
Link copied to clipboard
open var Row_1: LinearLayout
first row need different weight depending on Large_Screen or not
Link copied to clipboard
open var Row_Weight_0: Float
first row need different weight depending on Large_Screen or not.
Link copied to clipboard
open var Row_Weight_1: Float
first row need different weight depending on Large_Screen or not.
Link copied to clipboard
private open var stepImages: Array<ImageView>
Step display.
Link copied to clipboard
val TAG: String
logging tag
Link copied to clipboard
color for active indicatiors
Link copied to clipboard
color for inactive indicatiors
Link copied to clipboard
private open var Text_Typeface: Typeface
Font to display printout text with
Link copied to clipboard
private open var textImages: Array<ImageView>
Display characters.

Functions

Link copied to clipboard
protected open fun afterViews()
Called when the views are injected.
Link copied to clipboard
abstract fun bindService(Service: Calculator_Service)
Bind or unbind the calculator service
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(Row: 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(Row: Int): String
Link copied to clipboard
abstract fun getResources(): Resources
Link copied to clipboard
private open fun Init_Keyboard(Activity: FragmentActivity)
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 onDestroy()
Called when the fragment is no longer in use.
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 after onRestoreInstanceState(Bundle), onRestart(), or onPause(), for your activity to start interacting with the user.
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
private open fun redrawAlphaText()
Link copied to clipboard
private open fun redrawIndicators()
Link copied to clipboard
private open fun redrawKeyBoard()
Link copied to clipboard
private open fun redrawNumericText()
Link copied to clipboard
private open fun redrawSteps()
Link copied to clipboard
open fun Send_Change_Keyboard(Change_Keyboard: Boolean)
send the change keyboard message when Change_Keyboard is true.
Link copied to clipboard
fun setDisplayText(Row: Int, Alpha_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 setOnOff(on: Boolean)
set the calculators on of status.
Link copied to clipboard
open fun setPressedKey(Pressed_Key: Short)
Get calculator key code of the currently pressed key.
Link copied to clipboard
open fun Switch_Display()
switch between large and normal display
private open fun Switch_Display(Group: ViewGroup, Large_Screen: Boolean)
switch display for view Group
Link copied to clipboard
open fun toString(): String
Generate string for debug purpose
Link copied to clipboard
private open fun Use_Large_Screen(): Boolean
use large screen.