Basics of Android Studio
Basics of Android Studio
Studio
What is an activity?
• An Activity is a fundamental component of an Android
application. It represents a single screen with a user interface.
• Each screen in an app is typically implemented as an activity.
• Activities are responsible for managing the UI and handling user
interactions.
• The main entry point of an Android app is usually the main
activity.
Activities contain Layouts
Relative Layout
• Elements are aligned relative to each other
• Attributes like android:layout_alignParentTop are used to declare
positions of views.
Constraint Layout
• ConstraintLayout is a type of layout in Android Studio that allows
you to create flexible and responsive user interfaces.
• It's designed to make it easy to create complex layouts with views
that are properly aligned and resizable on different screen sizes.
There are other layouts like FrameLayout, Grid Layout, TableLayout,
etc.
Choosing the right layout depends on the specific UI structure you
want to achieve in your Android app