官术网_书友最值得收藏!

Project Structure of an Android Project

Click on the small arrow on the left-hand side of each folder to expand its view:

Various folders inside the project folder

As you can see, we have multiple folders in our project folder. Our main project folder contains three subfolders, which are manifest, java, and res; we will explore each of these folders individually now:

  • manifest: This folder contains your AndroidManifest.xml file, which is responsible for giving permissions to your app, as we learned in the preceding chapter.

  • java: This folder contains all your .java files, which are your Java code files. Generally, this folder has multiple subfolders that have your package name at the top, and within them, are source code files. You can observe in the preceding screenshot that we have our java folder, and we have a folder named nikhil.nikmlnkr.game within that, which is actually the package name of our game, and we have our FullScreenActivity within that. 

  • res: This folder contains all your resources. res here simply means resources that can include anything from simple string data to images to complex XML layouts. Simple terms, most of the things you see on the screen are stored here. You can design your front-end with the help of resources that you keep in the res folder.

Now that we know what these folders are, let's start designing our first program. Also, to stay true to our programming background, let's start with the famous Hello World example. Things are going to get really interesting from this point on. By now, you have grasped pretty much all the basics you need to start development. Now, in a matter of a few minutes, you will be ready with your very first Android app that you can run on your phone. So, without further ado, let's begin!

If you can see a screen with two big blue windows saying DUMMY CONTENT, as seen in the preceding screenshot, you are good to start; otherwise simply navigate to the res/layout/ folder and double-click on activity_fullscreen.xml to open the XML layout in which we will be working now. 

Now, you can see many options in front of you; don't get overwhelmed or scared. You will soon learn and master the art of creating amazing user interfaces with the tools in front of you.

主站蜘蛛池模板: 清徐县| 报价| 贵溪市| 鄱阳县| 广灵县| 南安市| 屯昌县| 若羌县| 娱乐| 虎林市| 宜黄县| 麻城市| 同德县| 宾川县| 玉屏| 屏东县| 嘉义市| 和田市| 安塞县| 邓州市| 南平市| 涞源县| 姚安县| 湖北省| 庐江县| 额尔古纳市| 通榆县| 呼玛县| 读书| 都江堰市| 尤溪县| 嘉荫县| 云浮市| 大洼县| 宿迁市| 高陵县| 瓦房店市| 永寿县| 昆山市| 莱阳市| 织金县|