Skip to content

Commit 53ac42a

Browse files
fix: transparent background of share to add url dialog
1 parent 9931546 commit 53ac42a

File tree

5 files changed

+50
-50
lines changed

5 files changed

+50
-50
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
android:name="fr.gaulupeau.apps.Poche.ui.AddUrlProxyActivity"
5252
android:autoRemoveFromRecents="true"
5353
android:excludeFromRecents="true"
54-
android:noHistory="true">
54+
android:noHistory="true"
55+
android:theme="@style/Theme.App.ProxyTheme">
5556
<intent-filter android:label="@string/app_name">
5657
<action android:name="android.intent.action.SEND" />
5758

@@ -90,7 +91,9 @@
9091
</intent-filter>
9192
</activity>
9293

93-
<activity android:name="fr.gaulupeau.apps.Poche.ui.EditAddedArticleActivity" />
94+
<activity
95+
android:name="fr.gaulupeau.apps.Poche.ui.EditAddedArticleActivity"
96+
android:theme="@style/Theme.App.DialogTheme" />
9497

9598
<activity android:name="fr.gaulupeau.apps.Poche.ui.preferences.SettingsActivity">
9699
<intent-filter>

app/src/main/java/fr/gaulupeau/apps/Poche/ui/Themes.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,56 +74,56 @@ public enum Theme {
7474
R.string.themeName_default,
7575
R.style.Theme_App,
7676
R.style.Theme_App_NoActionBar,
77-
R.style.DialogTheme
77+
R.style.Theme_App_DialogTheme
7878
),
7979

8080
CONTRAST(
8181
R.string.themeName_contrast,
8282
R.style.Theme_App_Contrast,
8383
R.style.Theme_App_Contrast_NoActionBar,
84-
R.style.DialogTheme
84+
R.style.Theme_App_DialogTheme
8585
),
8686

8787
LIGHT(
8888
R.string.themeName_light,
8989
R.style.Theme_App,
9090
R.style.Theme_App_NoActionBar,
91-
R.style.DialogTheme
91+
R.style.Theme_App_DialogTheme
9292
),
9393

9494
LIGHT_CONTRAST(
9595
R.string.themeName_light_contrast,
9696
R.style.Theme_App_Contrast,
9797
R.style.Theme_App_Contrast_NoActionBar,
98-
R.style.DialogTheme
98+
R.style.Theme_App_DialogTheme
9999
),
100100

101101
E_INK(
102102
R.string.themeName_eink,
103103
R.style.Theme_App_Contrast,
104104
R.style.Theme_App_Contrast_NoActionBar,
105-
R.style.DialogTheme
105+
R.style.Theme_App_DialogTheme
106106
),
107107

108108
DARK(
109109
R.string.themeName_dark,
110110
R.style.Theme_App,
111111
R.style.Theme_App_NoActionBar,
112-
R.style.DialogThemeDark
112+
R.style.Theme_App_DialogTheme
113113
),
114114

115115
DARK_CONTRAST(
116116
R.string.themeName_dark_contrast,
117117
R.style.Theme_App_Contrast,
118118
R.style.Theme_App_Contrast_NoActionBar,
119-
R.style.DialogThemeDark
119+
R.style.Theme_App_DialogTheme
120120
),
121121

122122
SOLARIZED(
123123
R.string.themeName_solarized,
124124
R.style.Theme_App_Solarized,
125125
R.style.Theme_App_Solarized_NoActionBar,
126-
R.style.DialogTheme
126+
R.style.Theme_App_DialogTheme
127127
);
128128

129129
private int nameId;

app/src/main/res/values-night/themes.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,8 @@
2828
</style>
2929

3030
<style name="Theme.App.Solarized.NoActionBar" parent="Base.Theme.App.Solarized.NoActionBar" />
31+
32+
<style name="Theme.App.DialogTheme" parent="Base.Theme.App.DialogTheme" />
33+
34+
<style name="Theme.App.ProxyTheme" parent="Base.Theme.App.ProxyTheme" />
3135
</resources>

app/src/main/res/values/styles.xml

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -36,46 +36,6 @@
3636
<item name="cornerFamilyTopRight">cut</item>
3737
</style>
3838

39-
40-
<style name="DialogTheme" parent="MaterialAlertDialog.MaterialComponents.Title.Icon">
41-
<item name="windowNoTitle">true</item>
42-
43-
<item name="icon_read">@drawable/ic_done_black_24dp</item>
44-
<item name="icon_read_undo">@drawable/ic_undo_black_24dp</item>
45-
<item name="icon_favorite">@drawable/ic_star_border_black_24dp</item>
46-
<item name="icon_favorite_undo">@drawable/ic_star_black_24dp</item>
47-
<item name="icon_tag">@drawable/ic_tag_black_24dp</item>
48-
<item name="icon_open">@drawable/ic_open_in_new_black_24dp</item>
49-
</style>
50-
51-
<style name="DialogThemeDark" parent="Theme.AppCompat.Dialog">
52-
<item name="windowNoTitle">true</item>
53-
54-
<item name="icon_read">@drawable/ic_done_white_24dp</item>
55-
<item name="icon_read_undo">@drawable/ic_undo_white_24dp</item>
56-
<item name="icon_favorite">@drawable/ic_star_border_white_24dp</item>
57-
<item name="icon_favorite_undo">@drawable/ic_star_white_24dp</item>
58-
<item name="icon_tag">@drawable/ic_tag_white_24dp</item>
59-
<item name="icon_open">@drawable/ic_open_in_new_white_24dp</item>
60-
</style>
61-
62-
<style name="ProxyTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
63-
<item name="windowNoTitle">true</item>
64-
<item name="android:windowBackground">@android:color/transparent</item>
65-
<item name="android:colorBackgroundCacheHint">@null</item>
66-
<item name="android:windowIsTranslucent">true</item>
67-
<item name="android:windowAnimationStyle">@android:style/Animation</item>
68-
<item name="android:windowContentOverlay">@null</item>
69-
<item name="android:windowIsFloating">true</item>
70-
<item name="android:backgroundDimEnabled">false</item>
71-
</style>
72-
73-
<style name="SplashTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
74-
<item name="colorPrimary">@color/splash_background</item>
75-
<item name="colorPrimaryDark">@android:color/transparent</item>
76-
<item name="android:windowBackground">@drawable/background_splash</item>
77-
</style>
78-
7939
<style name="Theme.App.Solarized.PopupOverlay" parent="ThemeOverlay.MaterialComponents.Light">
8040
<item name="android:colorBackground">@color/solarizedBase3</item>
8141
</style>

app/src/main/res/values/themes.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,37 @@
138138
</style>
139139

140140
<style name="Theme.App.Solarized.NoActionBar" parent="Base.Theme.App.Solarized.NoActionBar" />
141+
142+
143+
<style name="Base.Theme.App.DialogTheme" parent="Theme.MaterialComponents.DayNight.Dialog">
144+
<item name="windowNoTitle">true</item>
145+
146+
<item name="icon_read">@drawable/ic_done_black_24dp</item>
147+
<item name="icon_read_undo">@drawable/ic_undo_black_24dp</item>
148+
<item name="icon_favorite">@drawable/ic_star_border_black_24dp</item>
149+
<item name="icon_favorite_undo">@drawable/ic_star_black_24dp</item>
150+
<item name="icon_tag">@drawable/ic_tag_black_24dp</item>
151+
<item name="icon_open">@drawable/ic_open_in_new_black_24dp</item>
152+
</style>
153+
154+
<style name="Theme.App.DialogTheme" parent="Base.Theme.App.DialogTheme" />
155+
156+
<style name="Base.Theme.App.ProxyTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
157+
<item name="windowNoTitle">true</item>
158+
<item name="android:windowBackground">@android:color/transparent</item>
159+
<item name="android:colorBackgroundCacheHint">@null</item>
160+
<item name="android:windowIsTranslucent">true</item>
161+
<item name="android:windowAnimationStyle">@android:style/Animation</item>
162+
<item name="android:windowContentOverlay">@null</item>
163+
<item name="android:windowIsFloating">true</item>
164+
<item name="android:backgroundDimEnabled">false</item>
165+
</style>
166+
167+
<style name="Theme.App.ProxyTheme" parent="Base.Theme.App.ProxyTheme" />
168+
169+
<style name="SplashTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
170+
<item name="colorPrimary">@color/splash_background</item>
171+
<item name="colorPrimaryDark">@android:color/transparent</item>
172+
<item name="android:windowBackground">@drawable/background_splash</item>
173+
</style>
141174
</resources>

0 commit comments

Comments
 (0)