mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
@@ -39,6 +39,8 @@ import java.util.*;
|
|||||||
|
|
||||||
import butterknife.*;
|
import butterknife.*;
|
||||||
|
|
||||||
|
import static org.isoron.uhabits.activities.ThemeSwitcher.*;
|
||||||
|
|
||||||
public abstract class BaseDialog extends AppCompatDialogFragment
|
public abstract class BaseDialog extends AppCompatDialogFragment
|
||||||
{
|
{
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -65,7 +67,13 @@ public abstract class BaseDialog extends AppCompatDialogFragment
|
|||||||
@Override
|
@Override
|
||||||
public int getTheme()
|
public int getTheme()
|
||||||
{
|
{
|
||||||
return R.style.DialogWithTitle;
|
AppComponent component =
|
||||||
|
((HabitsApplication) getContext().getApplicationContext()).getComponent();
|
||||||
|
|
||||||
|
if(component.getPreferences().getTheme() == THEME_LIGHT)
|
||||||
|
return R.style.DialogWithTitle;
|
||||||
|
else
|
||||||
|
return R.style.DarkDialogWithTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -260,4 +260,9 @@
|
|||||||
<style name="DialogWithTitle" parent="@style/Theme.AppCompat.Light.Dialog">
|
<style name="DialogWithTitle" parent="@style/Theme.AppCompat.Light.Dialog">
|
||||||
<item name="windowNoTitle">false</item>
|
<item name="windowNoTitle">false</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="DarkDialogWithTitle"
|
||||||
|
parent="@style/Theme.AppCompat.Dialog">
|
||||||
|
<item name="windowNoTitle">false</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user