mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix spinner mode
Summary: Okay, I think this is the best I can do David, I don't think there's an obvious/easy way for me to try to get `getIdentifier()` to return a non zero value. Setting it to what Spencer suggested works for my use case. ## Changelog [Android] [Changed] - Update spinner mode to render spinner instead of calendar Reviewed By: sahrens Differential Revision: D15427793 fbshipit-source-id: b04f024a9a1f052f69f3bda47d77821782dc2c0e
This commit is contained in:
committed by
Facebook Github Bot
parent
141a3041e0
commit
7d1c827cb2
+3
-1
@@ -19,6 +19,7 @@ import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
@@ -69,8 +70,9 @@ public class DatePickerDialogFragment extends DialogFragment {
|
||||
break;
|
||||
case SPINNER:
|
||||
dialog = new DismissableDatePickerDialog(activityContext,
|
||||
activityContext.getResources().getIdentifier("SpinnerDatePickerDialog", "style", activityContext.getPackageName()),
|
||||
android.R.style.Theme_Holo_Light_Dialog,
|
||||
onDateSetListener, year, month, day);
|
||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
|
||||
break;
|
||||
case DEFAULT:
|
||||
dialog = new DismissableDatePickerDialog(activityContext, onDateSetListener, year, month, day);
|
||||
|
||||
Reference in New Issue
Block a user