CSE651C, B.Ramamurthy 9/19/2018"> CSE651C, B.Ramamurthy 9/19/2018">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

Android App Computations

Similar presentations


Presentation on theme: "Android App Computations"— Presentation transcript:

1 Android App Computations
CSE651C, B.Ramamurthy 9/19/2018

2 Text Input: EditText widget
<EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="textPersonName" android:ems="10" android:layout_marginTop="25dp" android:hint="Enter your name" /> CSE651C, B.Ramamurthy 9/19/2018

3 Add a button <Button android:id="@+id/button_compute"
android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:text=“Add” /> CSE651C, B.Ramamurthy 9/19/2018

4 A simple Calculator (Adder)
We will create proof of concept for a simple roundtrip from UI to Control and back. XML JavaXML Create two EditText for two operands to allow user input One button for initiating Add : “Add” button, with a function connected to it. In Java MainActivity program, write a function, that extracts the two operands and adds them. CSE651C, B.Ramamurthy 9/19/2018

5 Code Snippets Look at the code snippets in the CodeSnippets.docx file.
Create Basic or Empty app and add the XML and Java code snippets to the appropriate locations. Execute the code and deploy it on the emulator. CSE651C, B.Ramamurthy 9/19/2018

6 Summary We looked at a new UI component EditText
We also learned how to add control logic to your app. CSE651C, B.Ramamurthy 9/19/2018


Download ppt "Android App Computations"

Similar presentations


Ads by Google