I am an Android newbie, so this question might sound a little silly....
So far, I know that you can know which activity is the Main one (ie which activity is launched when the activity first starts) by finding the intent-filter as such:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
But, my problem is that how does Android know which XML file corresponds to that activity?? I have downloaded some source code for learning, and there are many XML files, each one for a different activity. So, I am kind of lost as to how to find the XML file for one particular activity.....
Go in your MainActivity (LAUNCHER Activity) and inside onCreate method look for this :
setContentView(R.layout.main_activity);
the layout under this method argument will solve your issue. Ctrl+click on ".main_activity" will get you to that xml, "main_activity is the name of layout here"
Note procedure will be same for all activities
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With