Calculator_Button_2

A Button to control a NumberPickerDialog

╔═══════════╗
║┌─────────┐║paddingTop
║│╔═══════╗│║topMargin
║│║ Shift ║│║
║│╚═══════╝│║bottomMargin
╟┼─────────┼╢Split
║│╔═══════╗│║topMargin
║│║Button ║│║
║│╚═══════╝│║bottomMargin
║└─────────┘║paddingBottom
╚═══════════╝

Author

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

Since

1.0

Constructors

Link copied to clipboard
constructor(context: Context)
Simple constructor to use when creating a view from code.
constructor(context: Context, attrs: AttributeSet)
Constructor that is called when inflating a view from XML.
constructor(context: Context, attrs: AttributeSet, defStyle: Int)
Perform inflation from XML and apply a class-specific base style.

Properties

Link copied to clipboard
open var Button: Button
Button.
Link copied to clipboard
private val Button_Background: Int
Background for button
Link copied to clipboard
private val Button_Bold: Boolean
Button text should be displayed in bold
Link copied to clipboard
private open var Button_Height: Int
button height.
Link copied to clipboard
private val Button_Text: String
text to display on button
Link copied to clipboard
private val Button_Text_Color: Int
Text colour for button
Link copied to clipboard
private val Button_Text_Size: Float
text size for button
Link copied to clipboard
private open var Button_Width: Int
button width.
Link copied to clipboard
private open var Default_Button_Bold: Boolean
default text colour for the 2ndF text
Link copied to clipboard
default values have been initialized.
Link copied to clipboard
private open var Default_Shift_Color: Int
default text colour for the shift text
Link copied to clipboard
private open var Default_Textsize: Float
default button text size
Link copied to clipboard
protected open var Gold_Description: String
Link copied to clipboard
protected open var Main_Function: String
Link copied to clipboard
open var Shift: TextView
shift text text.
Link copied to clipboard
private val Shift_Background: Int
background drawable for shift text
Link copied to clipboard
private val Shift_Color: Int
text colour for shift text
Link copied to clipboard
private open var Shift_Height: Int
shift height.
Link copied to clipboard
private val Shift_Text: String
string to display for shift text
Link copied to clipboard
private open var Shift_Width: Int
button width.
Link copied to clipboard
private val TAG: String
TAG as class name for logging

Functions

Link copied to clipboard
protected open fun After_Views()
update the text displayed on the button.
Link copied to clipboard
protected open fun generateDefaultLayoutParams(): LayoutParams
Returns a set of default layout parameters.
Link copied to clipboard
protected open fun generateLayoutParams(p: LayoutParams): LayoutParams
Returns a safe set of layout parameters based on the supplied layout params.
open fun generateLayoutParams(attrs: AttributeSet): LayoutParams
Returns a new set of layout parameters based on the supplied attributes set.
Link copied to clipboard
open fun getButton(): Button
get the actual button
Link copied to clipboard
private open fun Init_Defaults(context: Context)
Initialise default values
Link copied to clipboard
protected open fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int)
Called from layout when this view should assign a size and position to each of its children.
Link copied to clipboard
protected open fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)
Measure the view and its content to determine the measured width and the measured height.
Link copied to clipboard
open fun Shift(): TextView
shift text view — used for unit testing
Link copied to clipboard
open fun switchDisplay(Large_Screen: Boolean)
switch display for button
Link copied to clipboard
open fun toString(): String