General impovements of the ScientificActivity
This commit is contained in:
parent
c9a41c22fb
commit
ce425b3087
|
@ -34,7 +34,6 @@ class MainActivity : SimpleActivity(), Calculator {
|
||||||
|
|
||||||
calc = CalculatorImpl(this, applicationContext)
|
calc = CalculatorImpl(this, applicationContext)
|
||||||
|
|
||||||
btn_factorial.setOnClickListener{ calc.handleOperation(FACTORIAL); checkHaptic(it) }
|
|
||||||
btn_plus.setOnClickListener { calc.handleOperation(PLUS); checkHaptic(it) }
|
btn_plus.setOnClickListener { calc.handleOperation(PLUS); checkHaptic(it) }
|
||||||
btn_minus.setOnClickListener { calc.handleOperation(MINUS); checkHaptic(it) }
|
btn_minus.setOnClickListener { calc.handleOperation(MINUS); checkHaptic(it) }
|
||||||
btn_multiply.setOnClickListener { calc.handleOperation(MULTIPLY); checkHaptic(it) }
|
btn_multiply.setOnClickListener { calc.handleOperation(MULTIPLY); checkHaptic(it) }
|
||||||
|
|
|
@ -4,21 +4,19 @@ import android.os.Bundle
|
||||||
import com.simplemobiletools.calculator.R
|
import com.simplemobiletools.calculator.R
|
||||||
import com.simplemobiletools.calculator.extensions.config
|
import com.simplemobiletools.calculator.extensions.config
|
||||||
import com.simplemobiletools.calculator.extensions.updateViewColors
|
import com.simplemobiletools.calculator.extensions.updateViewColors
|
||||||
import com.simplemobiletools.calculator.helpers.*
|
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
|
import com.simplemobiletools.calculator.BuildConfig
|
||||||
|
import com.simplemobiletools.commons.extensions.*
|
||||||
|
|
||||||
class ScientificActivity : SimpleActivity() {
|
class ScientificActivity : SimpleActivity() {
|
||||||
|
|
||||||
// lateinit var calc: CalculatorImpl
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.scientific_activity)
|
setContentView(R.layout.scientific_activity)
|
||||||
//appLaunched(BuildConfig.APPLICATION_ID)
|
appLaunched(BuildConfig.APPLICATION_ID)
|
||||||
|
|
||||||
// calc = CalculatorImpl(this, applicationContext)
|
|
||||||
updateViewColors(calculator_holder, config.textColor)
|
updateViewColors(calculator_holder, config.textColor)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,14 +40,6 @@
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_factorial"
|
|
||||||
style="@style/MyButton"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="!"/>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_percent"
|
android:id="@+id/btn_percent"
|
||||||
style="@style/MyButton"
|
style="@style/MyButton"
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
android:paddingLeft="@dimen/activity_margin"
|
android:paddingLeft="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/activity_margin"
|
android:paddingRight="@dimen/activity_margin"
|
||||||
android:textSize="@dimen/display_text_size"
|
android:textSize="@dimen/display_text_size"
|
||||||
tools:text="0"/>
|
android:text="0"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in New Issue