Main_Activity

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 open class On_Large_Screen_Changed
check for changes of the screen size
Link copied to clipboard
open class Pager_Adapter
Link copied to clipboard
private open class Toogle_On_Off

Properties

Link copied to clipboard
Calculator fragment
Link copied to clipboard
listener handling setting changes.
Link copied to clipboard
private open var CPU_Thread: Thread
Thread in which the virtual calculator CPU is running.
Link copied to clipboard
vertical padding
Link copied to clipboard
private open var Large_Screen: Large_Screen_Type
use large screen.
Link copied to clipboard
open var Layout: ViewGroup
Top, root, widget which always is a layout of some kind.
Link copied to clipboard
protected open var Menu: Menu_Fragment
Menu fragment
Link copied to clipboard
open var Menu_On_Off: MenuItem
the on off action bar enty
Link copied to clipboard
private open var On_Off_Switch: SwitchCompat
the view of the on of menue etnry.
Link copied to clipboard
open var Pager: ViewPager
Handles the pages in phone view.
Link copied to clipboard
protected open var Preferences: IPreferences_
The application preferences
Link copied to clipboard
protected open var Printer: Printer_Fragment
Printer fragment (tablet only)
Link copied to clipboard
private open var Tablet_View: Boolean
Tablet view active — valid after After_Views
Link copied to clipboard
private val TAG: String
class logger tag.

Functions

Link copied to clipboard
protected open fun After_Views()
called after the views have been injected.
Link copied to clipboard
private open fun After_Views_Phone()
called after the views have been injected on phones.
Link copied to clipboard
private open fun After_Views_Tablet()
called after the views have been injected on tablets.
Link copied to clipboard
Bind the fragment to its activity.
Link copied to clipboard
open fun bindCPUThread(CPU_Thread: Thread)
Set calculator Thread so the canvas can wake up the calculator after key / touch screen clicks.
Link copied to clipboard
open fun bindService(Service: Calculator_Service)
Bind or unbind the calculator service
Link copied to clipboard
the print display button was clicked
Link copied to clipboard
open fun buttonClearClick()
the clear printout button was clicked
Link copied to clipboard
open fun buttonFeedClick()
he form feed button was clicked
Link copied to clipboard
open fun buttonPrintClick()
the print display button was clicked
Link copied to clipboard
Calculator fragment
Link copied to clipboard
Text currently displayed
Link copied to clipboard
open fun getDisplayText(Row: Int): Array<Short>
Link copied to clipboard
get calculator from service
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
open fun getName(): String
Returns the name of the resources (used for logging and idempotency of registration).
Link copied to clipboard
open fun getPressedKey(): Short
Get calculator key code of the currently pressed key.
Link copied to clipboard
open fun getPrintout(): String
Text currently displayed
Link copied to clipboard
open fun getReadKey(): Short
Get calculator key code of the last key (de)pressed.
Link copied to clipboard
private open fun Is_New_Version(): Boolean
check if the app was updated
Link copied to clipboard
open fun isIdleNow(): Boolean
Returns true if resource is currently idle.
Link copied to clipboard
Check if a calculator key code is available
Link copied to clipboard
copy text to clip board
Link copied to clipboard
copy text to clip board
Link copied to clipboard
open fun Menu_Documents()
show documents activity
Link copied to clipboard
open fun Menu_Feedback()
show feedback activity
Link copied to clipboard
open fun Menu_Help()
show help activity
Link copied to clipboard
open fun Menu_Reset()
copy text to clip board
Link copied to clipboard
open fun Menu_Settings()
show preferences
Link copied to clipboard
open fun onCreate(Saved_Instance_State: Bundle)
Called when the activity is first created.
Link copied to clipboard
open fun onCreateOptionsMenu(menu: Menu): Boolean
Initialize the contents of the Activity's standard options menu.
Link copied to clipboard
protected open fun onDestroy()
Link copied to clipboard
open fun onKeyUp(keyCode: Int, event: KeyEvent): Boolean
handles key hits.
Link copied to clipboard
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(Out_State: Bundle)
Link copied to clipboard
open fun onStart()
Open calculator and load file (if one was passed).
Link copied to clipboard
Calculator fragment
Link copied to clipboard
open fun registerIdleTransitionCallback(callback: ResourceCallback)
Registers the given ResourceCallback with the resource.
Link copied to clipboard
Start service if it is not currently running.
Link copied to clipboard
open fun setDisplayText(Row: Int, Alpha_Text: Array<Short>)
Set text to be displayed (calculator alpha codes).
Link copied to clipboard
open fun setIndicators(Indicators: Array<Boolean>)
Set the indicators (Shift, Alpha, Deg, Grad, Gra, etc.
Link copied to clipboard
open fun setJavaText(Text: String)
Set text 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(Pressed_Key: Short)
Get calculator key code of the currently pressed key.
Link copied to clipboard
open fun setPrintout(Text: String)
Set text to be displayed (java string).
Link copied to clipboard
open fun setReadKey(Read_Key: Short)
Get calculator key code of the last key (de)pressed.
Link copied to clipboard
open fun setReadKeys(readKeys: Array<Short>)
Get calculator key code of the last key (de)pressed.
Link copied to clipboard
open fun Show_Menu(view: View)
show the action bar (a click event handler, declared in the layout xml)
Link copied to clipboard
open fun stopCalculator()
Stop the calculator
Link copied to clipboard
private open fun Switch_Display()
switch between large and normal display
Link copied to clipboard
switches the page (in phone layout).
Link copied to clipboard
open fun Tablet_View(): Boolean
check if wa are in tablet mode
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.