skip to Main Content

Android Studio – Dialog Box Appears for half a second and closes automatically

I am trying to create a very simple dialog box. I found the code references from the internet obviously. My code is this: AlertDialog.Builder alertDialog = new AlertDialog.Builder( ConsignmentConViewActivity.this); alertDialog.setTitle("Alert Dialog"); alertDialog.setMessage("Welcome to AndroidHive.info"); alertDialog.setPositiveButton("OK", new DialogInterface.OnClickListener() { public void…

VIEW QUESTION

Android Studio – Android Problem adding hint on a TextInputEditText

I want to make a custom dialog that I can re-use to configure some parameters. I added a default hint that I want to modify each time the user opens the Dialog. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_width="match_parent"…

VIEW QUESTION
Back To Top
Search