android - dialog not displayed properly if using different functions for both orientations -


well in oncreate method have defined different function both orientations using

if (getresources().getconfiguration().orientation == configuration.orientation_portrait) { //some code }else { //some other code } , if 1 message displayed in portrait mode gives problem when changed landscape mode , vice-versa. can it???

you need make sure dismiss current dialog showing in ondestroy dismissdialog - if use showdialog , oncreatedialog methods android automatically assumes want dialog managed activity, means recreates old dialog when rotate.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -