开发者

How to find first activity in Android?

How can I find out from many class file that the particular file is the activity which was created at the time of cre开发者_JS百科ating the project?


There is must one Activity as Launcher.

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

It need to define in AndroidManifest.xml so check your AndroidManifest.xml and you could see one launcher activity..

I seen your AndroidManifest.xml which you given link in this case may be DialtactsActivity or DialtactsContactsEntryActivity launcher activity


I don't know if that is what you mean:

In your manifest:

  <activity android:name=".mainActivity" android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar"> //THIS IS MAIN BECAUSE THERE IS INTENT_FILTER
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".Activity1" android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar" />  

    <activity android:name=".Activity12" android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar" />

    <activity android:name=".Activity123" android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar" />

    <activity android:name=".MyProfileActivity" android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜