Hi, I am also facing the same problem. Can anyone suggest something? On Mon, Aug 24, 2009 at 12:00 PM, ANKIT SOMANI <[email protected]>wrote:
> Problem is with the Child activity, with the Theme.dialog > > > > 2009/8/24 ANKIT SOMANI <[email protected]> > > Hi all, >> >> I am facing a strange problem. I have 2 activities. The Second activity >> having the theme.Dialog (set in manifest). when I launched the second >> activity from first activity via startActivityforResult(). The Second >> activity is not Visible. When i minimize it & launched it again then its >> showing. >> >> ahere are my 2 classes. >> >> Activity 1 : >> >> package com.startActivityTest; >> >> import android.app.Activity; >> import android.content.Intent; >> import android.os.Bundle; >> >> public class StartActivityTest extends Activity { >> /** Called when the activity is first created. */ >> @Override >> public void onCreate(Bundle savedInstanceState) { >> super.onCreate(savedInstanceState); >> Intent intent = new Intent(); >> >> setContentView(R.layout.main); >> >> >> intent.setClassName("com.startActivityTest","com.startActivityTest.StartActivityTest1"); >> >> >> startActivityForResult(intent,1); >> >> } >> } >> >> Activity 2 : >> >> package com.startActivityTest; >> >> import android.app.Activity; >> import android.os.Bundle; >> >> public class StartActivityTest1 extends Activity { >> /** Called when the activity is first created. */ >> @Override >> public void onCreate(Bundle savedInstanceState) { >> super.onCreate(savedInstanceState); >> setContentView(R.layout.main2); >> } >> } >> >> >> >> main.xml >> >> >> <?xml version="1.0" encoding="utf-8"?> >> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" >> android:orientation="vertical" >> android:layout_width="fill_parent" >> android:layout_height="fill_parent" >> > >> <TextView >> android:layout_width="fill_parent" >> android:layout_height="wrap_content" >> android:text="Activity 1" >> /> >> </LinearLayout> >> >> >> main2.xml >> >> <?xml version="1.0" encoding="utf-8"?> >> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" >> android:orientation="vertical" >> android:layout_width="fill_parent" >> android:layout_height="fill_parent" >> > >> <TextView >> android:layout_width="fill_parent" >> android:layout_height="wrap_content" >> android:text="Dialog Activity" >> /> >> </LinearLayout> >> >> >> AndroidManifest.xml >> >> <?xml version="1.0" encoding="utf-8"?> >> <manifest xmlns:android="http://schemas.android.com/apk/res/android" >> package="com.startActivityTest" >> android:versionCode="1" >> android:versionName="1.0"> >> <application android:icon="@drawable/icon" >> android:label="@string/app_name"> >> <activity android:name=".StartActivityTest" >> android:label="Launcher Acitivity"> >> <intent-filter> >> <action android:name="android.intent.action.MAIN" /> >> <category android:name="android.intent.category.LAUNCHER" >> /> >> </intent-filter> >> </activity> >> >> <activity android:name=".StartActivityTest1" >> android:theme="@android:style/Theme.Dialog" >> android:label="Dialog Activity"> >> <intent-filter> >> <action android:name="android.intent.action.MAIN" /> >> <category android:name="android.intent.category.DEFAULT" >> /> >> </intent-filter> >> </activity> >> >> </application> >> <uses-sdk android:minSdkVersion="3" /> >> </manifest> >> >> >> please suggest any solution or correct me if i am wrong. >> >> Thanks in Advance. >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

