I am new to Android and trying to work on this problem for last 2 days but could find a solution. Any help will be highly appreciated. How to create a semi-transparent page for instruction as used by an App Calorie Counter in Android Market?
android:windowIsTranslucent indicates weather the window in which the activity is present in translucent state or not. It must be a boolean value i.e. it can be true or false. android:windowBackground is used to set the background of the main window.
setAlpha(51); Here you can set the opacity between 0 (fully transparent) to 255 (completely opaque). The 51 is exactly the 20% you want.
Create a new activity and set the top-level view to have a translucent background:
android:background="#c0000000"
EDIT: You also need to declare the activity to have a transparent background. Setting this theme for the activity in the manifest will work:
android:theme="@android:style/Theme.Translucent"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With