Fix theming issue with date picker dialog

This commit is contained in:
AndyScherzinger 2018-05-29 08:31:50 +02:00
parent 892db9f689
commit cf1b8f8f85
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 9 additions and 0 deletions

View file

@ -24,6 +24,7 @@ package com.owncloud.android.ui.dialog;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
@ -34,6 +35,7 @@ import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.utils.ThemeUtils;
import java.util.Calendar;
@ -121,6 +123,7 @@ public class ExpirationDatePickerDialogFragment
// Create a new instance of DatePickerDialog
DatePickerDialog dialog = new DatePickerDialog(
getActivity(),
R.style.FallbackDatePickerDialogTheme,
this,
chosenDate.get(Calendar.YEAR),
chosenDate.get(Calendar.MONTH),

View file

@ -39,6 +39,12 @@
<item name="colorAccent">#757575</item>
</style>
<style name="FallbackDatePickerDialogTheme" parent="Theme.AppCompat.Light.Dialog">
<item name="colorPrimary">#424242</item>
<item name="colorPrimaryDark">#212121</item>
<item name="colorAccent">#757575</item>
</style>
<!-- seperate action bar style for activities without an action bar -->
<style name="Theme.ownCloud.Toolbar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowNoTitle">true</item>