What is the correct way of adding an activity to AndroidManifest.xml?
Actually I have seen in many places an activity defined as
<activity
android:name="MyFirstActivity"
android:label="@string/title_first_activity">
</activity>
and in some places as
<activity
android:name=".MySecondActivity"
android:label="@string/title_second_activity">
</activity>
I just wanted to know if putting a dot(.) is the correct way of adding an activity to the manifest file.
I have gone through many posts but I didn’t find an exact solution. This suggests the dot(.) is not required, while this suggests to use the dot(.). So what is the correct way?
dot means your package name. It’s more short type of declaration.
http://developer.android.com/guide/topics/manifest/manifest-intro.html Declaring class names