Android_notes
Android_notes
Introduction to Android
What is Android?
Defines the UI layout and visual structure of Implements the logic and behavior of the
Purpose
the app. app.
Focus Focuses on what the app looks like. Focuses on what the app does.
Used to define UI components, resources, Used for user interaction, API calls, and
Usage
and layouts. backend logic.
Tools Edited in Android Studio’s layout editor. Written in the Android Studio code editor.
Parsed at runtime to build the UI, adding Directly executed for efficient
Performance
minor overhead. functionality.
Examples of Buttons, TextViews, layouts, colors, styles, Event handling, API calls, database
Use and strings. interactions, and navigation.
Handles static content like layouts and Handles dynamic content and app
Static/Dynamic
resources. behavior.
Component Description
manifest (AndroidManifest.xml) App configuration, permissions, components.
java/ Contains Java or Kotlin source code (app logic).
res/layout/ Contains XML files for UI design.
res/drawable/ Images and icons used in the app.
res/values/ Colors, strings, styles, and dimensions.
Gradle Scripts Configuration files for building the project.
Attribute Description
layout_width wrap_content (content size) or match_parent (full width).
layout_height wrap_content or match_parent.
gravity Aligns content inside a view.
padding Space inside a view.
margin Space outside a view.
<uses-permission android:name="android.permission.CAMERA"/>