0

I have a problem that Spinner is working on certain versions of Android phones and the rest of the versions are working in another way

 <style name="Theme.Transparent" parent="@android:style/Theme.Holo.Light.Dialog">
    <item name="android:windowIsTranslucent">true</item>
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowIsFloating">true</item>
    <item name="android:backgroundDimEnabled">true</item>
   <item name="android:calendarViewShown">false</item>
    <item name="android:datePickerMode">spinner</item>
</style>




   @SuppressWarnings("deprecation")
public void setDate(View view) {
    showDialog(999);

}

@Override
protected Dialog onCreateDialog(int id) {
    // TODO Auto-generated method stub
    if (id == 999) {
        return new DatePickerDialog(this,R.style.Theme_Transparent,
                myDateListener, year, month, day);


    }
    return null;
}


private DatePickerDialog.OnDateSetListener myDateListener = new
        DatePickerDialog.OnDateSetListener() {
            @Override
            public void onDateSet(DatePicker arg0,
                                  int arg1, int arg2, int arg3) {
                // TODO Auto-generated method stub
                // arg1 = year
                // arg2 = month
                // arg3 = day
                showDate(arg1, arg2+1, arg3);

            }
        };

private void showDate(int year, int month, int day) {
    USER_Birthday_INPUT = year+"/"+month+"/"+day;
     birthday.setText(USER_Birthday_INPUT);
}

}

Note : I tried all the available solutions I did not succeed in anything

Spinner 1

this image show the spinner theme DatePicker .. in my phone note 3 work fine but in Samsung Galaxy S7 does not show the spinner .. Only the traditional appearance appears

traditional VS Spinner 2

I need to unify the appearance so that only the spinner appears .. how i can solve this problem please ?

leenahmad
  • 11
  • 2

0 Answers0