customdialog

Custom dialog too small

我的未来我决定 提交于 2019-11-28 10:52:07
I have an android activity that implements a custom dialog.The application is running ok but the dialog is too small,i want to display a bigger dialog.How can i achieve this? Here is my layout xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white" android:orientation="vertical" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:background="@drawable

Dialog box disappears during orientation change in fragment

ⅰ亾dé卋堺 提交于 2019-11-28 09:52:14
问题 So I am not a very experience Android programmer, so please be gentle with me :) I am trying to create an app that uses fragements and from within one of these fragments I am calling a custom dialog box. //create dialog final Dialog dialog = new Dialog(getActivity()); dialog.setCancelable(false); dialog.setContentView(R.layout.fragment_update_dialog); //set up data in dialog here Button bUpdate = (Button) dialog.findViewById(R.id.bDialogUpdate); bUpdate.setOnClickListener(new OnClickListener(

Easiest way to create a custom dialog box which returns a value?

陌路散爱 提交于 2019-11-28 06:54:58
I want to create a custom dialog box for my C# project .. I want to have a DataGridView in this custom dialog box, and there will also be a button .. When the user clicks this button, an integer value is returned to the caller, and the dialog box then terminates itself .. How can I achieve this ? There is no prompt dialog box in C#. You can create a custom prompt box to do this instead. public static class Prompt { public static int ShowDialog(string text, string caption) { Form prompt = new Form(); prompt.Width = 500; prompt.Height = 100; prompt.Text = caption; Label textLabel = new Label() {

How to update data in a Custom Dialog

拥有回忆 提交于 2019-11-28 06:51:32
问题 The user at the moment clicks on a row which contains data and a Dialog with text fields is displayed. I want the user to update the strings by using this Dialog. How can I do this? I have an update method already in my Database Class, but I'm not sure how to implement the update in the Dialog Database Class package ie.example.artur.projectrepeat; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase

How can I create positive and negative buttons at custom dialogs

↘锁芯ラ 提交于 2019-11-28 04:59:55
问题 I want to create a custom dialog. So i create a template 'dialog_change' and I open the dialog. Dialog myDialog = new Dialog(Overview.this); myDialog.setContentView(R.layout.dialog_change); myDialog.setTitle("My Custom Dialog Title"); myDialog.show(); Now i want to add two button (one positive and one negative button), at the bottom. How can i do that? 回答1: I'd just make your own custom class to simulate an AlertDialog, this way you can use your own layout with no strings attached. (There are

custom dialog with close button

浪子不回头ぞ 提交于 2019-11-27 08:07:42
I want to create a custom dialog with the layout as shown in the picture. The cross/close button must be on the top right side. Please suggest how can i achieve this kind of layout. Thanks in advance. might be below code is useful for you,achieved like this <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:gravity="center" android:orientation="vertical" > <FrameLayout android:layout_width="wrap_content" android

Custom dialog too small

蹲街弑〆低调 提交于 2019-11-27 03:51:41
问题 I have an android activity that implements a custom dialog.The application is running ok but the dialog is too small,i want to display a bigger dialog.How can i achieve this? Here is my layout xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white" android:orientation="vertical" > <LinearLayout android:layout_width="match_parent

sendUserActionEvent() mView== null after clicking on button

淺唱寂寞╮ 提交于 2019-11-26 14:07:19
问题 I have checked with this link but there its mentioned about long clicks. but I am facing this after clicking on button of custom dialog. I have pasted my code over here. can anyone help me to avoid this error. ibtnCancel.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Log.w("DemoDvicetracker", etConfirmPassword .getText().toString()); InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(

custom dialog with close button

ⅰ亾dé卋堺 提交于 2019-11-26 14:07:01
问题 I want to create a custom dialog with the layout as shown in the picture. The cross/close button must be on the top right side. Please suggest how can i achieve this kind of layout. Thanks in advance. 回答1: might be below code is useful for you,achieved like this <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android