dialogfragment

Appcompact DialogFragment single-choice checkmark color

柔情痞子 提交于 2021-02-18 06:42:07
问题 I have a problem. My activity has style <style name="MaterialTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="colorPrimary">@color/action_bar_background</item> <item name="colorPrimaryDark">@color/action_bar_background</item> <item name="colorAccent">@color/action_bar_background</item> </style> also i have dialogFragment with simple single-choice chooser. @Override public Dialog onCreateDialog(final Bundle savedInstanceState) { final AlertDialog.Builder dialog = new

Does DisplayActionSheet exist in Xamarin.Android?

霸气de小男生 提交于 2021-01-28 07:25:25
问题 I am new to mobile development. I'm trying to write an app in both Xamarin iOS and Xamarin Android. After searching for a couple of days, I keep finding that DisplayActionSheet is part of Xamarin Forms, but I can't find the equivalent in Xamarin Android. Does DisplayActionSheet not exist? Is there anything else I can use to get the same look and effect? Thank you! Update: Here's my progress... I'm trying to make a dialog that looks like this the image here: https://www.google.com/search?q

DialogFragment buttons pushed off screen API 24 and above

痞子三分冷 提交于 2020-04-11 18:34:11
问题 I am making a custom DialogFragment that displays a selectable list of data. The list is too long to fit on the screen without scrolling. For up to API 23, everything seems to work fine, but when I test on API 24+, the DialogFragment's button's are no longer visible. I looked at Missing buttons on AlertDialog | Android 7.0 (Nexus 5x), but that doesn't seem to apply because my buttons do show up when I reduce the amount of content in the list so that it all fits on the screen. How can I make

Android控件之TimePicker和DatePicker

若如初见. 提交于 2020-01-24 00:22:22
Android控件之TimePicker和DatePicker 1 Picker简介 DatePicker 和 TimePicker 分别提供日期和时间的选择试图;通过它们得到的日期和时间是格式化的。 2 Picker示例 写一个activity,包含一个“日期”按钮和一个“时间”按钮。 点击“日期”按钮,进入“日期”选择界面。 点击“时间”按钮,进入“时间”选择界面。 应用层代码 package com.skywang.picker; import android.os.Bundle; import android.app.Activity; import android.view.View; import android.support.v4.app.DialogFragment; import android.app.Dialog; import android.app.TimePickerDialog; import android.app.TimePickerDialog.OnTimeSetListener; import android.app.DatePickerDialog; import android.text.format.DateFormat; import android.widget.TimePicker; import android.widget

AutoCompleteTextView allow only suggested options

孤街醉人 提交于 2019-12-30 06:12:09
问题 I have a DialogFragment that contains AutoCompleteTextView , and Cancel and OK buttons. The AutoCompleteTextView is giving suggestions of usernames that I'm getting from server. What I want to do is to restrict the user to be able to enter only existing usernames. I know I can do check if that username exists when the user clicks OK , but is there some other way, let's say not allow the user to enter character if there doesn't exist such username. I don't know how to do this because on each

DialogFragment with custom ListView

六眼飞鱼酱① 提交于 2019-12-30 04:45:14
问题 I'm trying to create a DialogFragment that shows a dialog with a custom ListView inside. public class MultiSelectDialogCustom extends DialogFragment { ListView mLocationList; private ArrayList<String> mOfficeListItems = new ArrayList<String>(); public static MultiSelectDialogCustom newInstance(int title) { MultiSelectDialogCustom dialog = new MultiSelectDialogCustom(); Bundle args = new Bundle(); args.putInt("title", title); dialog.setArguments(args); return dialog; } @Override public View

Detect back button but don't dismiss dialogfragment

旧城冷巷雨未停 提交于 2019-12-28 02:39:18
问题 I have a dialogfragment for a floating dialog which includes a special keyboard that pops up when a user presses inside an EditText field (the normal IME is stopped from being displayed). I would like the keyboard to be dismissed (visibility = GONE) when the user presses the back button (just as with a normal IME service) but the dialog to remain visible. However, there does not appear to be a way to do this as far as I can see from my fairly extensive reading on SO and elsewhere. If I set

Pass item[] to DialogFragment

会有一股神秘感。 提交于 2019-12-25 03:53:25
问题 I am trying to pass the String [] items of my Dialog Fragment when the activity is running, as this String is updated and its values, which are showing the DialogFragment are updated and can not always choose the same. I have read this topic: stackoverflow but I think that's not exactly what I need. I know someone help me? This is mi class DialogoSeleccion wich extends DialogFragment: public class DialogoSeleccion extends DialogFragment { @Override public Dialog onCreateDialog(Bundle

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

Get value from Bottom Sheet Dialog Fragment

夙愿已清 提交于 2019-12-23 07:40:51
问题 I'm starting bottomSheetDialogFragment from a fragment A. I want to select the date from that bottomSheetDialogFragment then set it in the fragment A. The select date is already done, I just want to get it in the fragment A to set it in some fields. How can I get the value? Any suggestions how to do it? 回答1: Create an interface class like this public interface CustomInterface { public void callbackMethod(String date); } Implement this interface in your Activity or Fragment . and make an