Skip to content

Commit

Permalink
Merge pull request #46 from di72nn/proxy_theme
Browse files Browse the repository at this point in the history
Set proper proxy theme
  • Loading branch information
dimtion committed Sep 12, 2020
2 parents 456d167 + 588ab03 commit a24831f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
6 changes: 4 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
android:excludeFromRecents="true"
android:label="@string/title_activity_share"
android:noHistory="true"
android:taskAffinity="com.dimtion.Shaarlier.share">
android:taskAffinity="com.dimtion.Shaarlier.share"
android:theme="@style/ProxyTheme">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
Expand All @@ -40,7 +41,8 @@
android:autoRemoveFromRecents="true"
android:enabled="false"
android:excludeFromRecents="true"
android:noHistory="true">
android:noHistory="true"
android:theme="@style/ProxyTheme">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,14 @@ public boolean onCreateOptionsMenu(Menu menu) {

@Override
protected void onCreate(Bundle savedInstanceState) {
userPrefs = UserPreferences.load(this);
if(userPrefs.isOpenDialog()) {
setTheme(R.style.AppTheme);
}

super.onCreate(savedInstanceState);

Intent intent = getIntent();
userPrefs = UserPreferences.load(this);

loadAccounts();
if (accounts.isEmpty()) {
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,15 @@
<!-- Customize your theme here. -->
</style>

<style name="ProxyTheme" parent="Theme.AppCompat.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>

</resources>

0 comments on commit a24831f

Please sign in to comment.