Temperature Converter Application Using Sketchware Watch the above video if you get stuck ! :) 1)Create the following layout.The image below shows the app UI. The app has got an Edittext at the top. Below the Edittext there is a Horizontal Linear Layout . Inside the Linear Layout ,two Buttons are placed . One is Convert Button and the other is to Swap . 2)Create a Variable named c .On onCreate event , set the variable c to 0 as shown in the screenshot below 3) Navigate to the onClick event of Button .Here you have to place an if else block. The if else block first checks whether the variable c is zero or not . If the value of variable c is zero , then the app converts the temperture input from celsius to fahrenheit . If the value is one , then the input fahrenheit value is converted to celsius . Refer the screenshot below to add further blocks 4) Next Navigate to onClick event of the Swap Button
Add AutoCompleteTextview To Your App 1)Navigate to activity_main.xml .You have to add some code here. Watch the above video for reference . After adding the code, your activity_main.xml will look like this: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout 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:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".MainActivity"> <AutoCompleteTextView android:id="@+id/autocompleteView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentStart="true" andro