For new project, the default module name is “app”.
A module can be defined as a collection of source files and build settings that allow you to divide your project into discrete units of functionality. In a project you can have multiple modules and one module may use another module as a dependency. Every module is independently built, tested, and debugged.
The container is provided by Module for our app’s source code, resource files, and app level settings such as the module-level build file and Android Manifest file.
When the Create New Module window is opened, Android Studio offers the following app modules:
- Phone and Tablet Module
- Android Wear Module
- Android TV Module
- Glass Module.
All of the above provide essential files and some code templates that are appropriate for the corresponding app or device type –
It contains the Androidmanifest.xml file.
AnddroidManifest.xml describes the fundamental characteristics of an app and each of its components.
It works as an interface between your Android OS and your application, so if you forgot to declare your components in this file then it will not be considered by the OS.
Defines the Android namespace. It should always be set to
A full Java Language style package name for Android Application. It should be unique. A package name serves as a unique identifier for the application. Whatever is the package name it is also the default name for the application process.
You cannot change the package name, once you publish your application . The package name defines your application’s identity If you change the package name then it is considered to be a different application and users of the previous version cannot update to the new version because the package name defines the identity. Learn more at Android Course in Pune.
It is an integer which is only used to determine whether one version is more recent than the other, with higher numbers demoting more recent versions.
The greatest possible value for version Code is 2100000000.
It is a string used as a version number which is displayed to the users. It has no other purpose other than getting displayed to the user.
This is treated as an integer designating the minimum API Level required for the application to run. The Android system will prevent the user from installing the application, if the system’s API Level is lower than the value specified in this attribute . You should always declare this attribute.
This is an Integer designating the API level that the application targets. The default value equals that given to minSdk Version if it is not set. The system that you have tested against the target version and the system should not enable any compatibility behaviors to maintain your app’s forward-compatibility with the target version is getting informed by this attribute. Your application is still able to run on older versions (down to minSdkVersion).
It includes all the declarations to the application. Android: icon: It will point to the application icon available under res/mipmap.
The application uses the image named ic.launcher.png located in the mipmap folders.
What are views? What is a View group?
View:= A View is anything which occupies a rectangular area on the screen and is responsible for drawing and event handling..
Thus every UI element is a subclass of View, to be more precise of android.view.View.
The Android SDK provides a set of pre-built views that can be used to construct a user interface, e.g. buttons, Check box, Edit Text etc. which are also known widgets.
Widgets can be thought of as a “pre-built control” through which the user interacts with your application.
Commonly used View subclasses:
These are some of the many subclasses of the View Class. Read more at Android Classes in Pune.
The View Group is a subclass of View( android.view.View) and provinces invisible containers that hold other Views or other View Groups and define their layout properties. Thus all the Layouts and Containers inherit from View Group. The base class for layouts and views containers is the view group.
The following commonly used View Group subclasses are present in Android.
- Linear Layout
- Relative Layout
- List View
- Grid View
Introduction about layout and its types –
Layouts are subclasses of ViewGroup which specifies how a view should be arranged inside the viewgroups. Layout defines the visual structure for a user interface.
You can create layouts in two ways:-
Declare UI elements in XML.
Instantiate layout elements at runtime.
The standard layouts are:
LInear Layout –
Linear layout is a layout that arranges its children in a single column or a single row.The direction of the row can be set by calling setOrientation().
Relative Layout –
A Layout where the positions of the children can be described in relation to each other or tho the parent.
Frame Layout –
Frame Layout is designed to block out an area on the screen to display a single item.
Table Layout –
A Layout that arranges its children into rows and columns. Read more at Android Training in Pune.
SevenMentor Pvt Ltd
Call the Trainer and Book your free demo Class for now!!!
© Copyright 202! | Sevenmentor Pvt Ltd.