android-dialog

Dialog is not closed dialog.dismiss() when navigating backand forth to settings screen

僤鯓⒐⒋嵵緔 提交于 2019-12-25 01:39:44
问题 What is happening:: dialog is popped I click ok - > it leads me to settings screen Now i press back button When i come back dialog button is still there again i click ok again it leads me to settings screen this repeats, dialog is never closed What i am trying to do: dialog is popped I click ok - > it leads me to settings screen Now i press back button When i come back dialog button should have closed @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate

How can I get My entire BottomSheetDialog to show above my keyboard?

喜你入骨 提交于 2019-12-24 21:26:10
问题 I have a BottomSheetDialog that pops up on click of a button. The Dialog contains an EditText , and on the focus of that EditText , the Dialogs Pans only up to the EditText , Leaving my Submit button below it hidden My Code: mBottomSheetDialog = new BottomSheetDialog(MyActivity.this); sheetView = getLayoutInflater().inflate(R.layout.my_bottom_sheet, null); mBottomSheetDialog.setContentView(myView); mBottomSheetDialog.show(); I have Tried using adjustPan , but that only works up to the

Keep AlertDialog default layout params using custom window background

荒凉一梦 提交于 2019-12-24 19:46:34
问题 I need a dialog with custom background color and rounded corners. How can I keep default layout params using custom window background for AlertDialog? Currently, my dialog has smaller left-right margin than in regular dialog. Also, dialog buttons such as positive and neutral have more shift from the edge of dialog. <style name="DialogStuffTheme" parent="Theme.AppCompat.Light.Dialog.Alert"> <item name="android:windowBackground">@drawable/bg_custom</item> <item name="android

Application level floating views with navigation in Android

℡╲_俬逩灬. 提交于 2019-12-24 04:05:30
问题 I have to show a floating button that will be added in WindowManager so it remain on the top of all Activities. (I have done this part using https://github.com/marshallino16/FloatingView) When that button is tapped I have to open screen and show detail view and navigate between other views. To achieve this thing I can do following things either adding 1 - PopUpWindow 2 - Dialog But I cannot provide navigation using either of them. So my questions is. What is the best way to add multiple views

How do I change the text shown in GooglePlayServicesUtil.getErrorDialog()?

不问归期 提交于 2019-12-24 03:55:14
问题 I am trying to follow the gcm tutorial from Googles docs. They say to call this method if Play Services are out of date: GooglePlayServicesUtil.getErrorDialog(resultCode, activity, 9000).show(); That's fine, but it puts a dialog that says "This app won't run unless you update Google Play Services" with an "Update" button. I want to change the title and the message text. My users CAN skip the update, and the app will still run. They just won't get push notifications. How do I change the

android to show alert dialog from non-UI or Non activity class

[亡魂溺海] 提交于 2019-12-24 02:23:58
问题 Hi Android programmers, This question is previously asked. But there is no answer. So i need solution for that. Actually i am trying to display alert box of Mainactivity.java calling from test.java (Non-activity). Thats working fine if their is no UI coding. if that code is dependent with UI means its throw errors. Activity class : public class Mainactivity extends Activity { public void message() { Log.i("Success : Call from non-UI & non activity class");//Upto this line working if i called

How can I customize the header layout of a dialog

孤街醉人 提交于 2019-12-23 15:33:15
问题 In Android, is it possible to customize the header layout (the icon + a text) layout of a dialog? Or can I just set a custom string value of the title text? Thank you. 回答1: It's possible to change the header of the Dialog if you set a custom layout for both the dialog and the header. I've only ever used this method to remove the header entirely, but this ought to work for a custom header: dialog = new Dialog(context); Window window = dialog.getWindow(); window.requestWindowFeature(Window

Change Android Dialog button text size via styles

旧时模样 提交于 2019-12-23 07:12:59
问题 I am trying to enlarge the text size on all of my applications dialog buttons via styles. The following code will change the buttons background colour and even the text case but for some reason the textSize item is not honoured: <style name="MyAppTheme" parent="@android:style/Theme.Holo"> <item name="android:dialogTheme">@style/MyApp.Dialog</item> <item name="android:alertDialogTheme">@style/MyApp.Dialog.Alert</item> </style> <style name="MyApp.Dialog" parent="@android:style/Theme.Holo.Dialog

How do I show permissions rationale for multiple permissions request?

做~自己de王妃 提交于 2019-12-23 03:25:09
问题 I am working with Android API 25 and need to make permissions requests in the app. There are a ton of code samples on how to make a request as well as how to show the rationale. This link here shows a simple methodology as do these: Android M Request Multiple permission at a single time , Android M request permission non activity The problem I am having is I am requesting multiple permissions at once (Location, Write storage access, and Contacts) and the ActivityCompatApi23

Changing TimePickerDialog Styles

大憨熊 提交于 2019-12-23 02:52:15
问题 I want to change the style of my TimePicker but I can't get to change the color of the clock face and the header background. Here's my XML style code - <style name="DateTimeDialog" parent="Theme.AppCompat.Dialog"> <item name="android:colorBackground">@color/colorWhite</item> <item name="android:textColorPrimary">#000000</item> <item name="android:headerBackground">#000000</item> <item name="android:textColorSecondary">#000000</item> <item name="android:button">@color/colorWhite</item> <item