Starting activities problem? Theme problem
I got some very strange problem:
Let's say I've got two activities.
If I launch each one of them as the main activity of the application - everything seems great.
But if I launch, let's say activity A from activity B. Activity A has the same theme settings as activity B.
Why is this happening?
Activity A is translucent, and if I start the application from activity A - it is transparent, but if I start it from activity B - it is not??
This is my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="gg.thesis.gallant.command" android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".viewall.A" android:label="@string/app_name"
android:clearTaskOnLaunch="true" android:launchMode="singleTask"
android:theme="@android:style/Theme.Translucent">
<intent-filter>
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
</intent-filter>
<开发者_运维问答/activity>
<activity android:name=".viewall.B" android:label="@string/app_name"
android:clearTaskOnLaunch="true" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
....
Is there any theme inheritance for the activities in Android?
Thanks!
write one line in your second activity tag....
android:theme="@android:style/Theme.Translucent"
<activity android:name=".viewall.B" android:label="@string/app_name"
android:clearTaskOnLaunch="true" android:launchMode="singleTask"
android:theme="@android:style/Theme.Translucent">
</activity>
may be work...
精彩评论