Category : dialog

I have Dialog A with feedback button and on click of this button, I want to dismiss this dialog and open another dialog B for reviews. This is done inside Fragment, private void DialogA() { final Dialog dialog = new Dialog(getActivity()); dialog.setContentView(R.layout.dialog_complaints); Button btnFeedBack = (Button) dialog.findViewById(R.id.btnFeedBack); Button btnComplaint = (Button) dialog.findViewById(R.id.btnFeedBack); // if button ..

Read more

I was following a tutorial video about how to implement BottomSheetDialog in my activity. this is what i got: fragment_bottom_sheet_dialog.xml: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/fragment_settings_background"> <TextView style="@style/HeaderFragmentTextStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/volume_sp" android:layout_marginTop="20dp" android:layout_marginStart="12dp" android:layout_marginBottom="20dp" app:layout_constraintBottom_toTopOf="@+id/volume_sb" app:layout_constraintEnd_toEndOf="@+id/volume_sb" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintStart_toStartOf="@+id/volume_sb" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.0" /> <SeekBar android:id="@+id/volume_sb" style="@style/SeekBarStyleColors" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="20dp" android:layout_marginEnd="20dp" app:layout_constraintBottom_toBottomOf="parent" ..

Read more

I am an Android developer newbie, and I am having a hard time hiding the bottom navigation bar when a dialog is displayed. I want that to NOT appear since the application is shown in full-screen mode. Here is the class that builds the dialog: class CreateNewFolderDialogFragment : DialogFragment() { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog ..

Read more

I’m trying to do a modal view with a custom dialog, this is myDialog.java class: public class MyDialog extends Dialog implements android.view.View.OnClickListener { public Activity c; public Dialog d; public Button btnaddsingleingredient, btncanceladdingsingleingredient; public MyDialog(Activity a) { super(a); // TODO Auto-generated constructor stub this.c = a; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); ..

Read more

I have Main Activity with activity_main.xml, Dialog with activity_room.xml. I receive data from Arduino via Bluetooth and I want edit ImageButton Image Resource, when receive string "1" or "0". I write receive string to variable, then in Dialog inside if else construction check variable, if 1 ImageResource ON else OFF. Problem. I can’t update image ..

Read more

I have problem with use keyboard and Dialog in android studio (java). if i use edittext, the keyboard brings up texviews from the bottom up. I tried using WindowSoftInput in manifest and in Dialog getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN). How i can fix this problem? Thanks for help. w/o keyboard with keyboard Problem TextView have name tvTemp. <EditText android:id="@+id/etWriteTempR1" ..

Read more

I want to make a preview pop-up for Quiz application, using Dialog class. I created a dialog and wanted to put setOnClickListener() fot its button , which is supposed to close the dialog. But when i add onClickListener application stops working, if i comment the onClickListener() function it works.How can i add onClickListener for the ..

Read more