How To Design A Temperature Conversion App 2018
Create a Temperature Converter Application In sketchware
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 iszero, 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. Refer the screenshot below and place the following block.
5) Run your app and see how the app performs! If you have any doubt please comment below
Popular posts from this blog
Add Edittext Inside Dialog Box If you haven`t yet watched the video... Watch it right now!!! The code used in the above video is available here. final EditText edittext1= new EditText(MainActivity.this); LinearLayout.LayoutParams lpar = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); edittext1.setLayoutParams(lpar); dialog.setView(edittext1); textview1.setText(edittext1.getText());
Create Custom Popup Window using Sketchware Refer the video below if you get stuck. 1) Add a custom view named window.You can name it according to your wish. 2)Design your popup window. 2) Now, In the logic section,In OnCLick event of button.Add the following code Create a view View popupView = getLayoutInflater().inflate(R.layout.window, null); Popup window final PopupWindow popup = new PopupWindow(popupView, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, true); Initialize Button b1 = popupView.findViewById(R.id.button1); Button b2 = popupView.findViewById(R.id.button2); OnClickListeners b1.setOnClickListener(new OnClickListener() { public void onClick(View view) { //below code will dismiss the popup window popup.dismiss(); } }); b2.setOnClickListener(new OnClickListener() { public void onClick(View view) { popup.dismiss(); } }); Show the popup window popup.showAtLoc
Implement banner ads to your app using AIDE : Video Url : https://youtu.be/mqNVMf7zaYI 1) Open your project in AIDE . Add ' com.google.android.gms:play-services-ads:+ ' to the app level build.gradle 2) Now navigate to AndroidManifest.xml and open it. Add the following permissions <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 3) Add meta-data <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> 4) Add the activity <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent" /> 5) Open main.xml . Add the following code xmlns:tools="http://schemas.and
How To Design A Temperature Conversion App 2018
Source: https://sketchlogics.blogspot.com/2020/04/create-temperature-converter.html
Posted by: berrycersecove1981.blogspot.com
0 Response to "How To Design A Temperature Conversion App 2018"
Post a Comment