I just started reading about android development and I am using Eclipse.
My question is how does the AndridManifest file know which xml file to call by using the information from the activity tag. For example , I just added a new activity and called it activity_two as a result eclipse generated two main files for me ActivityTwo.java and activity_activity_two.xml. It also added the activity tag to the manifest file which is
<activity
android:name=".ActivityTwo"
android:label="@string/title_activity_activity_two" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Now my question is how does eclipse know that this tag is associated with activity_activity_two.xml ?
Eclipse doesn’t know layout file of any activity.
Later, inside
OnCreatemethod, you need to “give” Activity her layout file by writing simple line:setContentView(R.layout.activity_activity_two);