Questions tagged [android-dialog]

1

votes
3

answer
287

Views

How to close custom dialog which itself is an activity and get data from it?

I have created custom dialog and I want to close it on Cancel button click. I searched on google, most of the people are using Dialog or AlertDialog but I am not using anything like that. This is my TextDialogActivity which is loading on button click in my app. From MainActivity I am just rendering...
Jai Prak
1

votes
1

answer
152

Views

How to change/update the custom layout of a Dialog on orientation change in android

Im trying to change the layout of a Dialog in the onConfigurationChange of the activity. I have created 2 layout one in regular layouts folder and other in layouts-land, i can get the layouts if the orientations of the device is in landscape or portrait and then click to show the dialog. But if I t...
Adithya.K
1

votes
1

answer
49

Views

Keyboard is covering the EditTexts during editing in a dialog

In My App I have Button will open a Dialog to allow the user to enter some data. The dialog layout contains a parent ScrollView and inside it few EditTexts children. the problem is the Keyboard is covering the EditTexts during user edit, so the the user basically can not see what he is typing... I a...
Ahmed Afifi
1

votes
1

answer
50

Views

DatePicker in Fragment Android didn't show

My code in fragment : public class DatepickerFragment extends Fragment { TextView etDate; static final int DATE_ID = 0; Calendar C = Calendar.getInstance(); private int mYearIni, mMonthIni, mDayIni, sYearIni, sMonthIni, sDayIni; private DatePickerDialog.OnDateSetListener mDateSetListener = new DateP...
Haidar Zamzam
1

votes
0

answer
110

Views

Hidden Navigation bar (bottom bar with Home, Back and Overview button) is visible after showing a dialog or if the EditText gains focus

There is a full screen activity with the following code blocks used to achieve the same: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,...
sats
1

votes
1

answer
94

Views

Android: change TimePickerDialog picker (circle) background color

Is there any way of changing the background color marked bellow? Until now I managed to change the background color like this: #141414 and applied it like this: TimePickerDialog timePickerDialog = new TimePickerDialog(getActivity(), R.style.DialogTheme, listener, hour, minute, false); I'm running An...
adriennoir
1

votes
0

answer
19

Views

How to make transition from one Dialog to another Dialog

I have bottom-sheet when I tap on button DialogFragment appears in the Bottom Sheet. But When I tap on the button in this DialogFragment, I don't swap them. I.e I want to make a transition between DialogFragments. How to solve this problem? This my code in Bottom Sheet: public void imageButton(){ fi...
CyberDemon
1

votes
2

answer
74

Views

How to create a floating layout in android?

I need to position a layout like in the following image along with desired width and height: Gmail profile display floating layout
Sahitya Kumar
1

votes
0

answer
32

Views

Android bottom dialog collapse animation direction bug

I am using a custom bottom dialog, simply a dialog that attached to bottom of the screen here is the code https://github.com/javiersantos/BottomDialogs/blob/master/library/src/main/java/com/github/javiersantos/bottomdialogs/BottomDialog.java My problem is, when I animate a view in this dialog (colla...
Emre Akcan
1

votes
3

answer
58

Views

push whole dialog above the keyboard, keyboard covers button

I have custom dialog which is attached to bottom of the screen. When I focus to the edittext, keyboard opens but it focuses to edittext so covers my button. I want to see the button. If I use same xml in activity it behaves correctly I tried all of the windowSoftInputMode's but didn't work, I also...
Emre Akcan
1

votes
2

answer
472

Views

Discover if any Dialog is being open?

I have a BaseActivity that opens Dialogs on it's code, but I can't change this class code, so I extended it, on my subclass, how to know when a Dialog is being open?
Marcos Vasconcelos
1

votes
1

answer
1.5k

Views

Storing Date fetched from datepicker dialog in database?

I know how to fetch date using datepicker dialog.But, the problem i'm encountering is storing the date picked from date picker dialog into database of type DATE.Since the date fetched from datepicker dialog is not in predefined date format, can anyone help me in converting the date fetched from date...
shadowfax92
1

votes
1

answer
1.2k

Views

Android - Flashing ImageView Progress Dialog

I want to make a ProgressDialog for my app that used flashes an image while resources are loaded in the background. I've looked at a number of questions on StackOverflow that deal with creating indeterminate animation, mostly circular. However, I can't seem to find any information on how to make a f...
Saad Farooq
1

votes
1

answer
1.9k

Views

Android Dialog: Where do I return after dismissing the dialog?

I'm opening an alert dialog from an activity using the 'onCreateDialog' method: protected Dialog onCreateDialog(int id) { Dialog dialog = null; switch(id) { case DIALOG_PASSWORD_VERIFICATION: LayoutInflater factory = LayoutInflater.from(this); final View passwordDialog = factory.inflate(R.layout.pas...
pfust75
1

votes
3

answer
2.7k

Views

My ProgressDialog doesn't dismiss even after the view has been loaded.

I want to show a Progress-Dialog before my view has been loaded. First i wrote the code in onCreate() but the dialog doesn't appear in that case. So i wrote it in onResume() but in this case, it doesn't disappear even after the view has been loaded. can anyone tell whats going wrong here? protecte...
Chetna
1

votes
1

answer
1k

Views

How to remove the line in the dialog box?

Hi i am creating one custom dialog box. It display some list of files using listview. In My dialog box does not fit the line. For example i mentioned the Red Color in the dialog box. How to remove this line or fit with this line. Thanks. My Another ScreenShot is How to Remove Space int the ( Red mar...
Sekar
1

votes
1

answer
126

Views

Saving Preferences from a Dialog

After I open up a custom Dialog in my Preferences screen, how do I save to that specific preference after the Dialog goes away? public class Preferences extends PreferenceActivity implements OnSharedPreferenceChangeListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCre...
Thefirstkilla
1

votes
3

answer
4.1k

Views

Dialog.setOnShowListener() alternative for API level < 8

I have an AlertDialog implemented via DialogFragment.onCreateDialog(). The dialog has an EditText and two buttons, OK and Cancel. When the OK button is clicked I need to do some checking on the content of the EditText: if the content is wrong the dialog shouldn't be dismissed. Searching on SO I've s...
Vicent
1

votes
1

answer
2.7k

Views

Quick Action Dialog/popup with checkbox & button in android

I'm looking for Quick action dialog which contains 4 Checkbox & 1 is (ok) button.. please. Suggest me a good sample regarding this....I'm trying to do this functionality for 3 days.. Went through many code but it not contain check box and button... Here is the image of what I'm looking for: Quick...
Rao's
1

votes
1

answer
250

Views

showDialog() called, but no dialog box on screen

Until recently, I've been using showDialog() and hideDialog() with no issues. I just added a new Activity to my project, and now for some reason I'm not able to produce a dialog box in the new Activity. The call is pretty simple: showDialog(DIALOG_ID); // do some work off the main thread hideDialog...
gcl1
1

votes
1

answer
2.5k

Views

Add controls to custom dialog programatically

I want to show a dialog with ~50 custom controls (switch buttons) on it. So, the best way to do that is to add them programatically in a loop. I've tried to make a dilog with a layout wich contains the only one GroupView element: and then just add my controls in it using: onCreateDialog(...) method:...
Tutankhamen
1

votes
1

answer
187

Views

i cannot see my custom progress dialog

I tried the following code for creating a custom progress dialog. But I am not getting the desired output. Following is my MainActivity.java code public class MainActivity extends Activity { private ProgressDialog mProgressDialog; @Override protected void onCreate(Bundle savedInstanceState) { supe...
SRINIVAS RAO
1

votes
1

answer
2.8k

Views

Spinner inside a PopUp Window

I've created a popup window and put a spinner inside it. But I can't get values when an item is selected from it. My code to create popup: LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); popwindow=new PopupWindow(inflater.inflate(R.layout.addpain, n...
Brooklyn
1

votes
1

answer
1.2k

Views

alertDialog in onItemClick

I have an alertDialog inside my ListView's onItemClick(). public void onItemClick(AdapterView parent, View view, int position, long id) { AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(FragmentActivity.this); alertDialogBuilder .setMessage('Do you wish to save any new/updated defec...
Pramod Setlur
1

votes
1

answer
530

Views

Make a list View row selected

I have an AlertDialog which contains a ListView. The ListView is populated via a customCursor adapter. Everything works fine except that I am unable to set a particular row as selected(highlighted with the blue color in Holo theme) inside the ListView. public AlertDialog m_accountsDialog; private A...
Yagna
1

votes
1

answer
3.8k

Views

Open Dialog With Custom Listview

I want to open dialog on button click. My dialog is having listview which will display one image with text per row. But when i assign adapter to my listview it throws exception. Here is my method to open dialog : public void openShareDialog() { Dialog d = new Dialog(this); d.setTitle('Select Color M...
Zankhna
1

votes
1

answer
101

Views

Android: Dialog between long run operations

I need a suggestion to implement the following situation: Showing a dialog between two long run operation (SQLite DB and Network operation) that need to be performed not in UI Thread. Which dialog is shown depends on the result of first long run operation, whereas which second long run operation is...
user1709805
1

votes
1

answer
461

Views

Android-dialog. Using Radio buttons in dialog, user HAS to click one

I am using a dialog with 2 radio buttons to get the user to classify an object. This works if the user explicitly clicks on one of the radio buttons but not if they simply press OK straight away. How can I handle this situation? case DIALOG_OBJECT_CLASSIFICATION: return new AlertDialog.Builder(DrawN...
sams-w
1

votes
1

answer
414

Views

Dialogbox background not showing image in whole background in android

i've made a simple dialog program in android for login dialog for learning purpose.I have made it successfully and running it also successfully but only problem is i want an image as whole dialog background but it showing a white border default image also..i have add screen shot so that u can get id...
jigar
1

votes
1

answer
582

Views

Custom RatingBar doesn't work on Dialog

I have set my custom RatingBar Style Inside style.xml this is my code: @style/RatingBarStyle @drawable/ratingbar 13dip 13dip now I have created a custom layout for a Dialog (Xml) [is inside a relativelayout]: and on my class I have this code: public void onClick(View view) { final Dialog dialog = ne...
Tizianoreica
1

votes
1

answer
986

Views

Change local variables android onClickListener

I need to set the return value of this method to be the item selected in a Single Choice Dialog... However, i cannot set the value of retVal because it apparently needs to be final (therefore cannot be changed) Is there any way to do this without using global variables? private String getSaleType()...
Louis Evans
1

votes
2

answer
165

Views

Place voice call, to have inapp feel (or just hide the default phone disconnected UI)

Currently when we place a voice phone call through the app the entire screen is taken up by the call UI. Is there a way to enclose the call feel into a dialog and provide it with some margin's so that the user need not remember to press back to get into the app, after the call is complete ? Basical...
taxeeta
1

votes
4

answer
2.1k

Views

modal/Dialog not applying match parent layout on width

I have a dialog/modal that I need to match_parent along its width. However, it keeps doing wrap_content. Any ideas how to rectify this? Here is my layout Here is the program fragment Dialog animalsView; public void onAnimalsClicked(View v) { LayoutInflater inflater = getLayoutInflater(); View dialog...
Cote Mounyo
1

votes
1

answer
555

Views

Speech bubble type option view on clicking ImageView?

I have seen this type of view somewhere but I don't remember.When you click on an item speech bubble type option menu will appear.
Mihir
1

votes
1

answer
138

Views

How to maintain params/proportions while changing content on android Dialog

Ok so I have been struggling with android dialogs and here is what I am trying to do. I have a custom xml layout for the dialog I want to show and I need to change that layout when an event triggers. The problem here is that whenever I want to change any view within the dialog's layout, the window w...
SuppressWarnings
1

votes
1

answer
1k

Views

When restoring from an orientation change, DialogFragment onCreateDialog() is called before onServiceConnected()

I have a big problem with my DialogFragments. My DialogFragments depend on a service connection to function properly. This is OK when the user presses a button to pop open a dialog because the activity draws the button in onServiceConnected(), ensuring that the service is always available to the Di...
Elegant Codeworks
1

votes
1

answer
210

Views

Cannot show an AlertDialog on Android because I get a NullPointerException

I have an activity and I want to show an AlertDialog without buttons and a list of elements. The problem is that if I show it I get this error: Java.lang.NullPointerException at android.widget.createViewFromResource(ArrayAdapter.java 394)... Here's my code: public class ContactsActivity extends Basi...
codareee
1

votes
3

answer
1k

Views

Put extras for Dialog

I have one general class for showing dialogs in Android. How do I pass extras to this class, that extends android.app.Dialog? For Activities I can use getIntent().getIntExtra() for example.
MikkoP
1

votes
2

answer
1.4k

Views

Change actionbar background from Dialog Activity

I'm making a Activity Dialog and want to customize the layout of the Activity. I already had set in the manifest the custom style by my activity which extends '@android:style/Theme.Holo.Dialog'. If I use CUSTOM_STYLE_NAME the only change of backgroundcolor is behind the title and not the whole actio...
Carlo Matulessy
1

votes
3

answer
1.4k

Views

Custom dialog on android Kitkat 4.4 cuts top area

In my android app, i am using custom dialog in my activity. I have given style to this custom dialog for transparent background. I am facing weird issue on Kitkat 4.4. The dialog gets cut from top side only on Kitkat 4.4.Devices with sdk level < 4.4 gives proper output according to my requirement. W...
Zankhna

View additional questions