" instead of ""? What does the point mean? most of the time I just write that:

Android Manifest: Why sometimes ". <Classname>" instead of "<classname>"?

What does the point mean?

most of the time I just write that:

<activity android:name="OneActivity" ...>...</activity>

But sometimes I see in an auto-generated file:

<activity android:name=".OtherActivity" ...>...</activity>

And also in Docs for Service I see what they write

<manifest ... >
  ...
  <application ... >
      <service android:name=".ExampleService" />
      ...
  </application>
</manifest>

But I have never seen a difference in trying one or the other.

+5
source share
5 answers

From Android Dev Guide <activity> link

, , Activity. (, "com.example.project.ExtracurricularActivity" ). , , (, ".ExtracurricularActivity" ), , . . .

: jaywon android

+3

, ,

package="app.package.name"

, . ,

app.package.name.another

, ,

<activity android:name=".another.activityname"
+4

, , , .

, "" . , , . .

+2

Android ... (.. Package = "com.test" ) , (.. : name= ". FirstActivity" )

If you do not want to use a dot before each activity, simply add a dot after your package attribute in the manifest tag (for example, package = "com.test.") And write the name of the activity without a dot (for example, android: name = "FirstActivity") he could generally make a full name (i.e. Com.test.FirstActivity)

+1
source

The dot in front of the name means that it is a hidden file that will not be displayed by others. You can see on YouTube how to hide files by Android cell.

-2
source

All Articles