android-dialogfragment

v7 support 23.0.1 crash: AppCompatButton.setBackgroundDrawable

故事扮演 提交于 2019-12-09 22:58:43
问题 I am experiencing this crash, with support library 23.0.1 It happens when showing a Dialog Fragment. It verifies with both android.support.v4.app.DialogFragment and android.support.v7.app.AppCompatDialogFragment Anyone else is experiencing this? It always happens with release compilation (which has Proguard enabled), and only in some cases with debug compilation. I am reporting the crash stacks for both fragment classes. stack for android.support.v4.app.DialogFragment : android.view

How to set the width of a DialogFragment in percentage?

▼魔方 西西 提交于 2019-12-09 17:59:10
问题 I have a DialogFragment with an xml layout and I need it to be, let's say 75% as wide as the screen. When I look for answers I always find the common weight -solution, which does not help me, as my fragment overlays the current activity as shown below and does not take the full screen's size. I also don't want to use "ems" as a fix width as I can't know the user's screen size. Is there a way (preferably in xml) to set the root LinearLayout 's width to said 75%? I think it would be a possible

Up ActionBar action on DialogFragment

谁说我不能喝 提交于 2019-12-09 16:32:55
问题 I have a DialogFragment that is styled to full screen using setStyle(STYLE_NORMAL, R.style.Theme_App) . The DialogFragment shows fine but the up action (the homeAsUp action on the ActionBar) does not work. I tried implementing onOptionsItemSelected in the DialogFragment but it is never called. Is there a way to get the up action callback in the DialogFragment so I can dismiss it ? For reference, I'm using ActionBarCompat . 回答1: There is no way to attach an ActionBar to the DialogFragment even

How can I open a ProgressDialog on top of a DialogFragment?

与世无争的帅哥 提交于 2019-12-09 10:22:09
问题 I have this Android activity/layout with a button. When I click this button, it opens a DialogFragment with 2 spinners. When the DialogFragment shows up, I need to populate these 2 spinners with items returned by a web service. So, while waiting for the service to return, I'd like to display a ProgressDialog over the DialogFragment I've just opened. The problem is I can't seem to make the ProgressDialog on top of the DialogFragment. I can see the ProgressDialog being shown behind the

How to create an Android Tabbed Dialog containing fragments?

﹥>﹥吖頭↗ 提交于 2019-12-09 05:19:04
问题 Can anyone point me to an example or show me how to create a simple Tabbed Dialog in Android where the contents of each tab are Fragments ? All the examples/tutorials I have found are about Fragments and Tabs, but nothing specific to DialogFragments . The documentation for FragmentTabHost shows how to create tabs within normal fragments using getChildFragmentManager() . I'm assuming this should also work when the fragment is a DialogFragment but when I try it I get: java.lang

Is it possible to launch a DialogFragment from a Preference in a PreferenceActivity?

廉价感情. 提交于 2019-12-09 02:49:47
问题 I am converting my app to use the v4 compatibility package and fragments. I have done well so far, but I need to launch a DialogFragment from a preference click in a PreferenceActivity . Since there isn't a PreferenceFragment in the compatibility library, I'm stuck with using PreferenceActivity . Is it possible to get a reference to the fragment manager and call the DialogFragment or do I just have to continue using the old dialog if I need a dialog from a preference? 回答1: Not without jumping

Android close custom dialog

徘徊边缘 提交于 2019-12-08 14:34:04
问题 I am trying to get the custom dialog to close on button press //set up dialog Dialog dialog = new Dialog(BrowseActivity.this); dialog.setContentView(R.layout.about); dialog.setTitle("This is my custom dialog box"); dialog.setCancelable(true); //there are a lot of settings, for dialog, check them all out! //set up text TextView text = (TextView) dialog.findViewById(R.id.TextView01); text.setText(R.string.app_help_message); //set up image view ImageView img = (ImageView) dialog.findViewById(R

Programmatically Registering Child Class BroadcastReceiver onReceive(context, intent) not getting called in DialogFragment

本小妞迷上赌 提交于 2019-12-08 12:13:30
问题 Is there a specific name i should be using for a custom BroadcastReceiver for it to be registered ? Here is my DialogFragment class: public class ApacheLicenseDialog extends DialogFragment implements Handler.Callback{ // Message Constants private static final int MSG_DO_WORK = 0; private static final int MSG_START = 1; private static final int MSG_DONE = 2; private static final int MSG_SHUTDOWN = 3; private static final String BACKGROUND_RECEIVER = "divshark.example.action.GENERATE"; // UI

Android send file between two phones using socket and progress bar

百般思念 提交于 2019-12-08 10:42:27
问题 i want to make an application for transfer files using wifi direct, but my send and receiver progress bar won't update my sender public void Server () { new Thread(new Runnable() { @Override public void run() { // TODO Auto-generated method stub try { //receive ip serverSocket = new ServerSocket(port); Socket socket = serverSocket.accept(); BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream())); String line = null; while ((line = in.readLine()) != null) {

Datepicker created with DialopFragment showing Calender also

可紊 提交于 2019-12-08 09:56:54
问题 I am new to Android programming and I am using a basic Datepicker created using a DialogFragment. My DatePicker shows up fine on click etc., but the problem is that it is displaying the Calendar view as well. I do not want this. I have been searching for a solution for a day now, and I am unwilling to use custom Datepickers right now, as I want to get familiar with the basics first. I have also read suggestions such as yourDatepicker.setCalendarViewShown(false); or set it to false in the XML.