Skip to content

Instantly share code, notes, and snippets.

@bmatheus91
Created February 25, 2019 17:53
Show Gist options
  • Save bmatheus91/2156b5ba0292fda38f723a4b64cbcbd8 to your computer and use it in GitHub Desktop.
Save bmatheus91/2156b5ba0292fda38f723a4b64cbcbd8 to your computer and use it in GitHub Desktop.
Android Activity Transparente - Nativo
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.transparenttest" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
<!-- Aplicacao do tema customizado-->
android:theme="@style/Theme.Transparent" >
<activity android:name=".MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<!-- Estilo que deixa a Activity Transparente -->
<style name="Theme.Transparent" parent="android:Theme">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">false</item>
<item name="android:windowIsFloating">false</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
</resources>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment