android - What to do to dismiss a dialog box which is coded as a dialog activity? -
/*packages , imports*/ public class bookmarkdialoge extends activity { public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.bookmarksaver); } public void bookmarking(view v) { edittext bookmarking=(edittext)findviewbyid(r.id.bookmarkname); final string bookmarkname=bookmarking.gettext().tostring(); string pathdir= getintent().getextras().getstring("bookpath"); string address=getintent().getextras().getstring("chapteraddress"); system.out.println("book directory in bookmark class "+ pathdir); sqlitedatabase db; db=openorcreatedatabase("epub.db",sqlitedatabase.create_if_necessary,null); db.setlocale(locale.getdefault()); db.setlockingenabled(true); db.setversion(1); try { string updatequery1 = "update bookmark set addresname=? bookdir=? , lastaddress=?"; db.execsql(updatequery1, new string[] { bookmarkname, pathdir,address }); system.out.println("bookmark table updated name"); } catch(exception e) { system.out.println(e); } { db.close(); } } }
and in manifest have given activity
<activity android:theme="@android:style/theme.holo.dialog" >
sothat appears dialoge
this class works well, need dismiss dialogebox after clicking button, means should disappear, (it came popup box) should do? please help
you finish()
activity
in close button onclick()
event
Comments
Post a Comment