總覽
源碼
<?xml version="1.0" encoding="utf-8"?>
< androidx.constraintlayout.widget.ConstraintLayout xmlns: android= " http://schemas.android.com/apk/res/android" xmlns: app= " http://schemas.android.com/apk/res-auto" xmlns: tools= " http://schemas.android.com/tools" android: id= " @+id/mainConstraintLayout" android: layout_width= " match_parent" android: layout_height= " match_parent" android: animateLayoutChanges= " true" tools: context= " .activities.MainActivity" > < Viewandroid: id= " @+id/top_background" android: layout_width= " 0dp" android: layout_height= " 0dp" android: background= " ?attr/foreground_color" app: layout_constraintBottom_toTopOf= " @+id/inputHorizontalScrollView" app: layout_constraintEnd_toEndOf= " parent" app: layout_constraintStart_toStartOf= " parent" app: layout_constraintTop_toTopOf= " parent" /> < HorizontalScrollViewandroid: id= " @+id/inputHorizontalScrollView" android: layout_width= " match_parent" android: layout_height= " 0dp" android: background= " ?attr/foreground_color" android: overScrollMode= " never" android: scrollbars= " none" app: layout_constraintBottom_toTopOf= " @+id/guideline1" app: layout_constraintTop_toBottomOf= " @+id/menuButton" > < EditTextandroid: id= " @+id/input" style = " @style/RobotoFontCondensedMedium " android: layout_width= " wrap_content" android: layout_height= " match_parent" android: layout_gravity= " right" android: autofillHints= " false" android: background= " ?attr/foreground_color" android: inputType= " textNoSuggestions" android: maxLength= " 10000" android: paddingHorizontal= " 10dp" android: singleLine= " true" android: text= " " android: textAlignment= " textEnd" android: textColor= " ?attr/text_color" android: textSize= " 55sp" tools: ignore= " RtlCompat" /> </ HorizontalScrollView> < HorizontalScrollViewandroid: id= " @+id/resultDisplayHorizontalScrollView" android: layout_width= " match_parent" android: layout_height= " 0dp" android: background= " ?attr/foreground_color" android: fillViewport= " true" android: overScrollMode= " never" android: scrollbars= " none" app: layout_constraintBottom_toTopOf= " @+id/guideline2" app: layout_constraintTop_toTopOf= " @+id/guideline1" > < LinearLayoutandroid: layout_width= " wrap_content" android: layout_height= " match_parent" android: gravity= " end" android: orientation= " horizontal" > < TextViewandroid: id= " @+id/resultDisplay" style = " @style/RobotoFontCondensedMedium " android: layout_width= " wrap_content" android: layout_height= " match_parent" android: background= " ?attr/foreground_color" android: paddingHorizontal= " 10dp" android: paddingBottom= " 4dp" android: scrollHorizontally= " true" android: singleLine= " true" android: text= " " android: textAlignment= " textEnd" android: textColor= " ?attr/text_second_color" android: textIsSelectable= " true" android: textSize= " 35sp" /> </ LinearLayout> </ HorizontalScrollView> < com.sothree.slidinguppanel.SlidingUpPanelLayoutandroid: id= " @+id/sliding_layout" android: layout_width= " match_parent" android: layout_height= " 0dp" android: gravity= " top" app: layout_constraintBottom_toBottomOf= " parent" app: layout_constraintTop_toBottomOf= " @+id/resultDisplayHorizontalScrollView" app: umanoPanelHeight= " 41dp" app: umanoScrollableView= " @id/history_recylcle_view" app: umanoShadowHeight= " 0dp" tools: ignore= " MissingConstraints" > < androidx.constraintlayout.widget.ConstraintLayoutandroid: id= " @+id/constraintLayout2" android: layout_width= " match_parent" android: layout_height= " match_parent" tools: context= " .activities.MainActivity" > < TableLayoutandroid: id= " @+id/tableLayout" android: layout_width= " match_parent" android: layout_height= " 0dp" android: paddingHorizontal= " 8dp" android: paddingTop= " 12dp" android: paddingBottom= " 0dp" app: layout_constraintBottom_toBottomOf= " parent" app: layout_constraintTop_toTopOf= " parent" > < TableRowandroid: layout_width= " match_parent" android: layout_height= " wrap_content" android: layout_marginBottom= " 1dp" android: layout_weight= " 0" > < Buttonandroid: id= " @+id/squareButton" android: contentDescription= " @string/squareDesc" style = " @style/CalculatorButton.Function " android: layout_width= " 0dp" android: layout_height= " match_parent" android: layout_margin= " 0dp" android: layout_weight= " 1" android: onClick= " squareButton" android: text= " @string/square" android: textSize= " 26sp" /> < Buttonandroid: id= " @+id/piButton" style = " @style/CalculatorButton.Function " android: contentDescription= " @string/piDesc" android: layout_width= " 0dp" android: layout_height= " match_parent" android: layout_margin= " 0dp" android: layout_weight= " 1" android: onClick= " piButton" android: text= " @string/pi" android: textSize= " 26sp" /> < ImageButtonandroid: id= " @+id/exponentButton" style = " @style/CalculatorButton.Function " android: contentDescription= " @string/exponentDesc" android: layout_width= " 0dp" android: layout_height= " match_parent" android: layout_margin= " 0dp" android: layout_weight= " 1" android: onClick= " exponentButton" app: srcCompat= " @drawable/exponent" /> < Buttonandroid: id= " @+id/factorialButton" style = " @style/CalculatorButton.Function " android: contentDescription= " @string/factorialDesc" android: layout_width= " 0dp" android: layout_height= " match_parent" android: layout_margin= " 0dp" android: layout_weight= " 1" android: onClick= " factorialButton" android: text= " @string/factorial" android: textSize= " 26sp" /> < ImageButtonandroid: id= " @+id/scientistModeSwitchButton" style = " @style/Widget.AppCompat.Button.Borderless " android: contentDescription= " @string/scientificModeSwitchDesc" android: layout_width= " 0dp" android: layout_height= " match_parent" android: layout_margin= " 0dp" android: layout_weight= " 0.6" android: background= " @drawable/circle" android: backgroundTint= " ?attr/foreground_color" android: onClick