android-alertdialog

Android - avoid AlertDialog to close(Error handling)

女生的网名这么多〃 提交于 2019-12-25 02:57:29
问题 May i know how to avoid AlertDialog to close even when i click the OK. The reason for this is to make a simple error handling when there is a wrong input. ------------------------ Input password ------------------------ Password:______________ _______________________ | OK | | Cancel| I want this dialog to remain when there is wrong input. so that the user can input again. My code: AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Insert Passcode"); final EditText

Dialog in Custom Adapter in android

馋奶兔 提交于 2019-12-25 02:57:28
问题 I have one custom adapter that have one checkbox and one textview.I want when user clicked on one row one alert dialog pop up and user enter data.I use following code in activity and worked fine: LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); final View layout = inflater.inflate(R.layout.floordialog, (ViewGroup) findViewById(R.id.floordialog)); floornum = (EditText) layout.findViewById(R.id.floordialog_floornumber); unitnum = (EditText) layout

Displaying a message from BroadcastReceiver

久未见 提交于 2019-12-25 02:24:18
问题 I wrote a simple class that extends BroadcastReceiver to handle an incoming call and get the caller's number. Now I want to display that number in a popup window or something similar. I've tried to display an alert dialog or open an activity but my app crashed. Then I read that it's not a good idea to start dialog from a BroadcastReceiver class. I need you to advice me how to correctly display the caller's number on the screen when there's an incoming call. This is my Broadcast Receiver class

How to get such kind of dialog? [closed]

▼魔方 西西 提交于 2019-12-25 01:48:26
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I want to have kind of pop shown in the given images. What should use ? Pop window, dialog or alert dialog. i have tried all of these, but not able to match the exact UI. 回答1: You can use Popup menu for this purpose. Add this code in your activity.java : fab.setOnClickListener(new

adding dropdown menu in alert dialog box in flutter

吃可爱长大的小学妹 提交于 2019-12-25 01:08:02
问题 I'm having UI rendering issues when I attempt to add a drop down menu with a date and time picker in an alert dialog box in my flutter application. I've been trying to troubleshoot this for quite some time now but to no avail. This is the output that I am getting: image output My Code: import 'dart:async'; import 'package:flutter/material.dart'; import 'package:firebase_database/firebase_database.dart'; import 'package:test_prep/utils/Reminder.dart'; import 'package:intl/intl.dart'; class

How to send array and variable from php to android app?

我与影子孤独终老i 提交于 2019-12-24 22:38:27
问题 I need help. Have seen similar questions but I cant still do it. So I post mine. php codes runs well so far. Ijust dont know how to get the array. How can I get the array from php and list it in my alertdialog like this: soy sauce - $1 onion - $1 total= $2 Or is this possible or not? Or maybe please tell me what to add in here. Thanks for your time in advance. Any form of help would be appreciated. This are my codes: public class updateData2 extends AsyncTask<String, String, String> {

Styling AlertDialog keeps white space around title background

扶醉桌前 提交于 2019-12-24 22:31:12
问题 I use three dialogs in my app, one DatePickerDialog in a dialogfragment, one dialogfragment with a custom layout through an alertdialog and one alertdialog without a dialogfragment. My dateopickerdialog looks like this. Notice the titlepart which is completely orange. My second dialogfragmen does not have the titlepart covering the whole upper part of the window which I would like to have. Here is the relevant part of my style.xml <style name="ScheduleCompareTheme" parent="Theme

AlertDialog in fragments

家住魔仙堡 提交于 2019-12-24 20:45:43
问题 I have some difficulties getting AlertDialog working in fragments. I have six buttons and when each button is clicked AlertDialog box should display its content. even though the prg is running without any error and tat fragment page is opening with the buttons if i click on a button dialogbox is not opening can anyone help me out? Thanks in advance. Here is my fragment activity code: @TargetApi(Build.VERSION_CODES.HONEYCOMB) public class Fragment3 extends DialogFragment implements

Is it possible to alter progress dialog's message or spinner position?

给你一囗甜甜゛ 提交于 2019-12-24 15:40:33
问题 I basically want to put message text before progress bar (spinner) in progress dialog in order to look like snackbar. 回答1: There might be some easier way to do this that I'm not thinking of at the moment, but you could override the ProgressDialog 's onCreate() method, and fiddle with the layout programmatically. For example: ProgressDialog pd = new ProgressDialog(this) { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ProgressBar progress =

Create AlertDialog with both MultiChoiceItems and message

徘徊边缘 提交于 2019-12-24 12:34:21
问题 I'm trying to create an AlertDialog where both a message (in a TextView, for instance) and a MultiChoice-list can be displayed at the same time, but I'm a bit lost as to how to do it. Will I have to create my own subclass of AlertDialog, or is there an easier way to do it? 回答1: You could create a normal AlertDialog but, instead of using the setMessage() method, you could just use a custom layout (you can inflate it in a View or even create a custom view) and use then the setView() method of