Skip to content

Commit

Permalink
fix: transparent background of share to add url dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
proletarius101 committed Feb 9, 2021
1 parent 5dd6759 commit 92217c5
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 50 deletions.
7 changes: 5 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
android:name="fr.gaulupeau.apps.Poche.ui.AddUrlProxyActivity"
android:autoRemoveFromRecents="true"
android:excludeFromRecents="true"
android:noHistory="true">
android:noHistory="true"
android:theme="@style/Theme.App.ProxyTheme">
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.SEND" />

Expand Down Expand Up @@ -90,7 +91,9 @@
</intent-filter>
</activity>

<activity android:name="fr.gaulupeau.apps.Poche.ui.EditAddedArticleActivity" />
<activity
android:name="fr.gaulupeau.apps.Poche.ui.EditAddedArticleActivity"
android:theme="@style/Theme.App.DialogTheme" />

<activity android:name="fr.gaulupeau.apps.Poche.ui.preferences.SettingsActivity">
<intent-filter>
Expand Down
16 changes: 8 additions & 8 deletions app/src/main/java/fr/gaulupeau/apps/Poche/ui/Themes.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,56 +74,56 @@ public enum Theme {
R.string.themeName_default,
R.style.Theme_App,
R.style.Theme_App_NoActionBar,
R.style.DialogTheme
R.style.Theme_App_DialogTheme
),

CONTRAST(
R.string.themeName_contrast,
R.style.Theme_App_Contrast,
R.style.Theme_App_Contrast_NoActionBar,
R.style.DialogTheme
R.style.Theme_App_DialogTheme
),

LIGHT(
R.string.themeName_light,
R.style.Theme_App,
R.style.Theme_App_NoActionBar,
R.style.DialogTheme
R.style.Theme_App_DialogTheme
),

LIGHT_CONTRAST(
R.string.themeName_light_contrast,
R.style.Theme_App_Contrast,
R.style.Theme_App_Contrast_NoActionBar,
R.style.DialogTheme
R.style.Theme_App_DialogTheme
),

E_INK(
R.string.themeName_eink,
R.style.Theme_App_Contrast,
R.style.Theme_App_Contrast_NoActionBar,
R.style.DialogTheme
R.style.Theme_App_DialogTheme
),

DARK(
R.string.themeName_dark,
R.style.Theme_App,
R.style.Theme_App_NoActionBar,
R.style.DialogThemeDark
R.style.Theme_App_DialogTheme
),

DARK_CONTRAST(
R.string.themeName_dark_contrast,
R.style.Theme_App_Contrast,
R.style.Theme_App_Contrast_NoActionBar,
R.style.DialogThemeDark
R.style.Theme_App_DialogTheme
),

SOLARIZED(
R.string.themeName_solarized,
R.style.Theme_App_Solarized,
R.style.Theme_App_Solarized_NoActionBar,
R.style.DialogTheme
R.style.Theme_App_DialogTheme
);

private int nameId;
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@
</style>

<style name="Theme.App.Solarized.NoActionBar" parent="Base.Theme.App.Solarized.NoActionBar" />

<style name="Theme.App.DialogTheme" parent="Base.Theme.App.DialogTheme" />

<style name="Theme.App.ProxyTheme" parent="Base.Theme.App.ProxyTheme" />
</resources>
40 changes: 0 additions & 40 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,46 +36,6 @@
<item name="cornerFamilyTopRight">cut</item>
</style>


<style name="DialogTheme" parent="MaterialAlertDialog.MaterialComponents.Title.Icon">
<item name="windowNoTitle">true</item>

<item name="icon_read">@drawable/ic_done_black_24dp</item>
<item name="icon_read_undo">@drawable/ic_undo_black_24dp</item>
<item name="icon_favorite">@drawable/ic_star_border_black_24dp</item>
<item name="icon_favorite_undo">@drawable/ic_star_black_24dp</item>
<item name="icon_tag">@drawable/ic_tag_black_24dp</item>
<item name="icon_open">@drawable/ic_open_in_new_black_24dp</item>
</style>

<style name="DialogThemeDark" parent="Theme.AppCompat.Dialog">
<item name="windowNoTitle">true</item>

<item name="icon_read">@drawable/ic_done_white_24dp</item>
<item name="icon_read_undo">@drawable/ic_undo_white_24dp</item>
<item name="icon_favorite">@drawable/ic_star_border_white_24dp</item>
<item name="icon_favorite_undo">@drawable/ic_star_white_24dp</item>
<item name="icon_tag">@drawable/ic_tag_white_24dp</item>
<item name="icon_open">@drawable/ic_open_in_new_white_24dp</item>
</style>

<style name="ProxyTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>

<style name="SplashTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">@color/splash_background</item>
<item name="colorPrimaryDark">@android:color/transparent</item>
<item name="android:windowBackground">@drawable/background_splash</item>
</style>

<style name="Theme.App.Solarized.PopupOverlay" parent="ThemeOverlay.MaterialComponents.Light">
<item name="android:colorBackground">@color/solarizedBase3</item>
</style>
Expand Down
33 changes: 33 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,37 @@
</style>

<style name="Theme.App.Solarized.NoActionBar" parent="Base.Theme.App.Solarized.NoActionBar" />


<style name="Base.Theme.App.DialogTheme" parent="Theme.MaterialComponents.DayNight.Dialog">
<item name="windowNoTitle">true</item>

<item name="icon_read">@drawable/ic_done_black_24dp</item>
<item name="icon_read_undo">@drawable/ic_undo_black_24dp</item>
<item name="icon_favorite">@drawable/ic_star_border_black_24dp</item>
<item name="icon_favorite_undo">@drawable/ic_star_black_24dp</item>
<item name="icon_tag">@drawable/ic_tag_black_24dp</item>
<item name="icon_open">@drawable/ic_open_in_new_black_24dp</item>
</style>

<style name="Theme.App.DialogTheme" parent="Base.Theme.App.DialogTheme" />

<style name="Base.Theme.App.ProxyTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>

<style name="Theme.App.ProxyTheme" parent="Base.Theme.App.ProxyTheme" />

<style name="SplashTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">@color/splash_background</item>
<item name="colorPrimaryDark">@android:color/transparent</item>
<item name="android:windowBackground">@drawable/background_splash</item>
</style>
</resources>

0 comments on commit 92217c5

Please sign in to comment.