2013-02-08 48 views
1

我在signin活動,如果用戶點擊一個按鈕,我要開始的主要活動啓動的主要活動。 這是主要活動welcome機器人如何當我在另一個活動

<activity 
      android:name=".Welcome" 
      android:label="@string/app_name" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 

的mainfest我試過這樣

Intent welcomeIntent =new Intent("android.intent.action.MAIN"); 
     startActivity(welcomeIntent); 

,但我有一個屏幕說complete acting using許多choese,如何解決pelase?

回答

4

改變你的意圖,直接啓動你的類

Intent welcomeIntent = new Intent(context, Welcome.class); 
startActivity(welcomeIntent); 

如果你在活動中與this

+0

它的作品,我會在10分鐘acctp你的答案取代context,謝謝 – 2013-02-08 16:19:14

相關問題