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 static org.isoron.uhabits.activities.ThemeSwitcher.*;
|
||||
|
||||
public abstract class BaseDialog extends AppCompatDialogFragment
|
||||
{
|
||||
@Nullable
|
||||
@@ -65,7 +67,13 @@ public abstract class BaseDialog extends AppCompatDialogFragment
|
||||
@Override
|
||||
public int getTheme()
|
||||
{
|
||||
AppComponent component =
|
||||
((HabitsApplication) getContext().getApplicationContext()).getComponent();
|
||||
|
||||
if(component.getPreferences().getTheme() == THEME_LIGHT)
|
||||
return R.style.DialogWithTitle;
|
||||
else
|
||||
return R.style.DarkDialogWithTitle;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -260,4 +260,9 @@
|
||||
<style name="DialogWithTitle" parent="@style/Theme.AppCompat.Light.Dialog">
|
||||
<item name="windowNoTitle">false</item>
|
||||
</style>
|
||||
|
||||
<style name="DarkDialogWithTitle"
|
||||
parent="@style/Theme.AppCompat.Dialog">
|
||||
<item name="windowNoTitle">false</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user