You can view new updated simple calculator with ViemModel and LiveData in my new blog https://androidtuts4u.blogspot.com/2021/10/simple-calculator-with-viewmodel-and.html To create a calculator first we need to create the layout of the calculator. Layout is created using XML file given below <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" > <EditText android:id="@+id/result_id" android:layout_width="fill_parent" android:layout_height="120dp" /> <Button android:id="@+id/Btn7_id" android:layout_width="70dp" android:layout_height="60dp" android:layout_below="@id/result_id" ...
Comments
Post a Comment