java - How to automatically run a playlist of YouTube? -
i'm new in java programming , second question. did enable playlist through dialog box in can enter playlist id youtube.
i happy everytime enter id not cool , want playlist start automatically.
@override public void onclick(view view) { switch (view.getid()) { case r.id.fab: fab.hide(); displayplaylistdialog(); break; } } public void displayplaylistdialog() { layoutinflater inflater = getlayoutinflater(); view alertlayout = inflater.inflate(r.layout.playlist_dialog_layout, null); final edittext etplaylistid = (edittext) alertlayout.findviewbyid(r.id.et_playlist_id); alertdialog.builder alert = new alertdialog.builder(this); alert.setview(alertlayout); alert.setcancelable(true); alert.setnegativebutton("cancel", null); alert.setpositivebutton("fetch", new dialoginterface.onclicklistener() { @override public void onclick(dialoginterface dialog, int which) { // code matching password if (!textutils.isempty(etplaylistid.gettext().tostring())) { playlistid = etplaylistid.gettext().tostring().trim(); getanyplaylist(); } } }); alertdialog dialog = alert.create(); dialog.show(); }
i want after starting app playlist automatically started. (clicked on app in android app opened automatically , showed playlist on youtube)
Comments
Post a Comment