Загрузка...

How to Display a String List in a Dialog Box in Sketchware|Part #2|

Hello friends in this video we have shown How to Display a String List in a Dialog Box in Sketchware. Hope you all will like the video. Do like the video. Also do subscribe our channel for more such videos. Hope you will learn something new from the video. Also if you get any issues in this then do bring it into our notice so that we can solve it.

The code used:-

dialog.setAdapter(
new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, list),
new DialogInterface.OnClickListener(){
@Override
public void onClick(DialogInterface _di, int _pos){
textview1.setText(list.get(_pos));
if (_pos == 0) {
i.setClass(getApplicationContext(), GoogleActivity.class);
startActivity(i);
}
if (_pos == 1) {
i.setClass(getApplicationContext(), YoutubeActivity.class);
startActivity(i);
}
if (_pos == 2) {
i.setClass(getApplicationContext(), AdmobActivity.class);
startActivity(i);
}
if (_pos == 3) {
i.setClass(getApplicationContext(), AdsenseActivity.class);
startActivity(i);
}
}} );

Part 1:- https://youtu.be/JVQe_avddcw

#sketchware #scratch #android #app

Видео How to Display a String List in a Dialog Box in Sketchware|Part #2| канала Sketchware Help
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять