How do you create a transparent demo screen for an Android app? How do you create a transparent demo screen for an Android app? android android

How do you create a transparent demo screen for an Android app?


Put your demo info in a different activity and give it the following theme.

<style name="Transparent" parent="@android:style/Theme.NoTitleBar">    <item name="android:windowContentOverlay">@null</item>    <item name="android:windowIsTranslucent">true</item>    <item name="android:windowBackground">@android:color/transparent</item>    <item name="android:windowNoTitle">true</item>          <item name="android:backgroundDimEnabled">false</item></style>

If you're using ActionBarSherlock change parent to @style/Theme.Sherlock.

This will give you a transparent activity, so you will be able to see the activity below it.

Now I'm guessing you want a translucent background too.

In the xml layout (of your transparent activity) add:

android:background="#aa000000" 

The last 6 digits define the color: 000000 is black.

The first 2 define the opacity: 00 is 100% transparent, ff is 100% opaque. So choose something in between.


Have you looked at ShowcaseView? https://github.com/Espiandev/ShowcaseView.

Using this:

View showcasedView = findViewById(R.id.view_to_showcase);ViewTarget target = new ViewTarget(showcasedView);ShowcaseView.insertShowcaseView(target, this, R.string.showcase_title, R.string.showcase_details);


Pulse is using a RelativeLayout with four ImageView's and four TextView's.The text in the screen shot is all TextView's with their own custom font.

In your Manifest add the following to your Activity:

android:theme="@style/Theme.Transparent">

In to your outer RelativeLayout add:

android:background="#aa000000"

To your styles.xml file:

<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">true</item>    <item name="android:windowIsFloating">false</item>    <item name="android:backgroundDimEnabled">false</item></style>    

An example how to program the custom font you can find at:

https://github.com/commonsguy/cw-android/tree/master/Fonts/FontSampler/

The layout from the Hierarchy Viewer looks like this (the red box is the RelativeLayout container):

enter image description here