Why are you trying to display an activity when the first activity isn't even done with it's OnCreate()? I think this is the reason it's not working.
Try using a delayed intent or use a Handler with a timed "post" message in the first activity, then the handler launches the second activity. It's probably not showing because you are trying to launch the second one too early (inside another activity's OnCreate(), not a good idea!) Use a Handler object, and then use the postDelayed call on like I did in my code like so: patternHandler.postDelayed(ShowHelpFirstTime, 2000); Look up Handler object in the API docs. -niko On Aug 25, 11:49 pm, ANKIT SOMANI <[email protected]> wrote: > Any Suggestions ...?? > > Regards > ~Ankit Somani > > 2009/8/24 ANKIT SOMANI <[email protected]> > > > This Problem is with the Cupcake 1.5 release, I tried it with 1.1 it was > > working there. > > > Regards > > ~Ankit Somani > > > 2009/8/24 suchita bhardwaj <[email protected]> > > >> 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 -~----------~----~----~----~------~----~------~--~---

