Skip to main content

Posts

Showing posts from May, 2018

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

Did you like this tutorial ?