Skip to main content

Posts

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 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
Recent posts

Add Auto Complete Textview To Your App

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

Working With Android Studio

Working With Android Studio    [# 1] Video Link:        https://youtu.be/9zcki3STZ00      Please Watch The Above Video If You haven't Watched It Already 1)  Open Android Studio and create a new project . 2) Give a name for your application and also set the package name. 3) Set The API level 4) Choose an Activity 5) Set the Activity Name and Layout Name 6) Click On Finish . Your project will be ready in few minutes. 7) Navigate to the layout directory and open activity_main.xml file 8)The code used in the video is given here <? xml version= "1.0" encoding= "utf-8" ?> < LinearLayout      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"      an

Create Custom Popup Window using Sketchware

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

Add Swipe To Refresh Feature To Your App using Android Studio

Add Swipe To Refresh Feature To Your App Using Android Studio If you haven't watched the video watch it now! Source Code Android Manifest.xml < manifest xmlns: android = "http://schemas.android.com/apk/res/android" package= "swiperefresh.com.swipetorefresh" > < uses-permission android :name= "android.permission.INTERNET" /> < application android :allowBackup= "true" android :icon= "@mipmap/ic_launcher" android :label= "@string/app_name" android :roundIcon= "@mipmap/ic_launcher_round" android :supportsRtl= "true" android :theme= "@style/AppTheme" > < activity android :name= ".MainActivity" > < intent-filter > < action android :name= "android.intent.action.MAIN" /> < category android :name= "android.intent.cate

Add SeekBar Inside Dialog Box

Add SeekBar Inside Dialog Box  If you haven`t yet watched the video, Watch  it  Now...! Open your   Sketchware  project.Add  Dialog Box  component. Go to the logic section & add the  blocks  which are necessary to create a  dialog box. Now you have to make some modifications.In order to add SeekBar you have to use add source directly block.Add the following code inside it.Please watch the above video for reference final SeekBar cb1 = new SeekBar(MainActivity.this); LinearLayout.LayoutParams lpar = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); cb1.setLayoutParams(lpar); dialog.setView(cb1); Inside the block  " dialog OK Button Clicked ",  add the following code using  add source directly block textview1.setText(String.valueOf(cb1.getProgress())); Thats It :) Now Run your Application If you have any  doubts   comment  below .

Create Text to speech converter app using Sketchware

Create Text to speech converter app using Sketchware If you haven't yet watched the video , watch it right now ! Open Sketchware . Create new project .Go to the logic section  . In on Create event , add the following code t1=new android.speech.tts.TextToSpeech(getApplicationContext(), new android.speech.tts.TextToSpeech.OnInitListener() { @Override public void onInit(int status) { if(status != android.speech.tts.TextToSpeech.ERROR) { t1.setLanguage(Locale.UK); } } }); } android.speech.tts.TextToSpeech t1; private void nothing(){  Go to the logic section and tap on Button1 on Click event Create a string variable named  " speak ". Now set the value of that string variable using  blocks. Please watch the above video for Reference. Now use add source directly block and add the following code t1.speak( speak , android.speech.tts.TextToSpeech.QUEUE_FLUSH, null);   Run the app. If you

Add Checkbox Inside Dialog Box | Sketchware tutorial

Add Checkbox Inside Dialog Box  If you haven`t yet watched the video, Watch it Now...! Open your Sketchware project.Add Dialog Box component. Go to the logic section & add the blocks which are necessary to create a dialog box. A screenshot is given below for your reference.                                    Now you have to make some modifications.In order to add checkbox you have to use add source directly block.Add the following code inside it.Screenshot is given below for your reference final CheckBox cb1 = new CheckBox(MainActivity.this); cb1.setText("CheckBox"); LinearLayout.LayoutParams lpar = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); cb1.setLayoutParams(lpar); dialog.setView(cb1); Inside the block " dialog OK Button Clicked ", add the following code using add source directly block if(cb1.isChecked()){ After adding add source

Add Edittext Inside Dialog Box

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());

Restrict the length of Edittext characters

Restrict the length of Edittext characters  1) Open your sketchware project.Add edittext. In the logic section, OnActivityCreate  Add the following code InputFilter [] editFilters = edittext1 . getFilters (); InputFilter [] newFilters = new InputFilter [ editFilters . length + 1 ]; System . arraycopy ( editFilters , 0 , newFilters , 0 , editFilters . length ); newFilters [ editFilters . length ] = new InputFilter . LengthFilter ( 10 ); edittext1 . setFilters ( newFilters ); If you have any doubts  , comment below

Did you like this tutorial ?