Calculator_Button_3

A Button to control a NumberPickerDialog

╔═══════════╗
║┌─────────┐║paddingTop
║│╔═══════╗│║topMargin
║│║ Shift ║│║
║│╚═══════╝│║bottomMargin
╟┼─────────┼╢Split_1
║│╔═══════╗│║topMargin
║│║Button ║│║
║│╚═══════╝│║bottomMargin
╟┼─────────┼╢Split_2
║│╔═══════╗│║topMargin
║│║ Alpha ║│║
║│╚═══════╝│║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 Alpha: TextView
Alpha text
Link copied to clipboard
private val Alpha_Background: Int
background drawable for alpha text
Link copied to clipboard
private val Alpha_Color: Int
text colour for alpha text
Link copied to clipboard
protected open var Alpha_Description: String
Link copied to clipboard
private open var Alpha_Height: Int
alpha height.
Link copied to clipboard
private val Alpha_Text: String
string to display for alpha text
Link copied to clipboard
private open var Alpha_Width: Int
alpha width.
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
Make buttons inscription smaller when large scale is active.
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_Alpha_Color: Int
default text colour for the alpha text
Link copied to clipboard
private open var Default_Button_Bold: Boolean
default text colour for the 2ndF text
Link copied to clipboard
private open var Default_Button_Margin: Float
Margin around the button
Link copied to clipboard
default values have been initialised.
Link copied to clipboard
private open var Default_Large_Scale: Float
Make buttons inscription smaller when large scale is active.
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 Main_Description: 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
protected open var Shift_Description: String
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
Link copied to clipboard
Text size for SHIFT, INV, 2ndF etc.

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