Posts

Android UI - Review Questions

  What is the highest-level class of any UI in Android? Which UI elements inherit from the  View  class? What does a  layout  define in Android UI? What is the purpose of a  Constraint Layout ? What are the common attributes used in a  Constraint Layout ? How does a  Linear Layout  arrange child views? Can a  Linear Layout  be a child of a  Constraint Layout ? How are widgets positioned in a  Relative Layout ? What alignment options does a  Relative Layout  support? How does a  Table Layout  arrange its child views? What elements does a  Table Layout  consist of? What is the purpose of a  Frame Layout ? Answers The highest-level class of any UI in Android is  View . UI elements like  Button ,  TextView , and other components inherit from  View . A  layout  defines the visual structure of the UI. A  Constraint Layout  positions views relative to othe...

Android UI - Layouts, Colors, Styles, Themes

View The highest-level class of any UI in Android. Button ,  TextView , and other UI elements inherit from it. Can be added from code or in xml file All views are organized into a single tree View Group - container for other views Layout Defines the visual structure of the UI. Layout Types Constraint Layout Views are positioned relative to other widgets Common attributes layout_width ,   layout_height :   match_parent ,   wrap_content . Linear Layout Arranges child views in a single direction (either  vertical  or  horizontal ). Can be a child of  ConstraintLayout . Relative Layout Widgets are arranged in relative positions to each other. Supports alignment options like  bottom, center, left, right . Table Layout Arranges child views in rows and columns. Consists of  TableRow  elements. Frame Layout Blocks out an area to display a  single item . Style A set of attributes applied to a single  View . Attributes include color...

Android Review Questions -OS

Review Questions - OS General Android OS Structure What are the main layers of the Android OS? Linux Kernel What is the role of the Linux Kernel in Android? What components does the Linux Kernel include drivers for? Hardware Abstraction Layer (HAL) What is the function of the Hardware Abstraction Layer (HAL)? How does HAL interact with the Android system? Android Runtime (ART) What is the purpose of Android Runtime (ART)? Native C/C++ Libraries Why does Android include native C/C++ libraries? How are these libraries exposed to developers? Java API Framework What does the Java API Framework provide? What are some key services and components in the Java API Framework? System Apps What are system apps in Android? Android Libraries What are Android Libraries used for? What are some common Android Libraries? Components of an Android Application What is an Activity in Android? What are Services in Android? What are Content Providers used for? What are Intents in Android? What is a Broadcast ...

Android OS - Basic Overview

  Structure of Android OS  Android operating system consist of several layers, which are staring from bottom to top Linux Kernel Core Component that manages hardware and system resources Acts as an interface between Android OS and the device hardware Handles threading, memory management, process management, hardware drivers, networking, and security. Includes drivers for components such as: Camera Audio Keypad Bluetooth Hardware Abstraction Layer (HAL) Exposes hardware capabilities  (e.g., Bluetooth, Camera) to the Android API through standard interfaces. Applications interact with the hardware  via the Android API, which communicates with system services. System services bridge the gap  between the Android API and HAL. HAL is implemented as shared libraries , which are loaded by system processes when needed. HAL interacts with Linux drivers  to facilitate communication between software and hardware. When a device component is required , the Android API ca...

Maps - Overview

 GPS A satellite-based navigation system. Constellation of satellites orbiting Earth at  20,000 km altitude . Each satellite completes an orbit in  11 hours and 58 minutes . Satellites continuously send signals to  GPS receivers  (e.g., mobile devices). One-way communication —devices receive signals but do not send data back. Devices calculate their position using  trilateration , determining the distance to at least  three satellites . Multiple navigation systems exist;  NAVSTAR  is used by mobile phones. Every point on Earth is covered by  at least four satellites . Accuracy:  Typically  3 - 10 meters . Latitude/ Longtitude Units that represent  geographical coordinates . (0,0) = Equator & Prime Meridian intersection . Geolocation : Process of determining coordinates (latitude/longitude). Android provides  Location API  and  Fused Location Provider  (combining GPS, Wi-Fi, and sensors for better ac...

Firebase and Android Apps- Overview

Image
  Firebase Products Firebase Authentication Firebase Realtime Database Firebase Cloud Firestore Firebase Authentication Introduction Firebase Authentication provides multiple authentication methods: Email & Password Authentication Phone Number Authentication Federated Identity Providers  (Google, Facebook, X, etc.) Anonymous Authentication Custom Backend Authentication Multi-Factor Authentication (MFA) Components SDK : Provides authentication functionality in apps. UI Libraries : Prebuilt UI elements for authentication flows. Backend Server : Manages authentication and user data. How to Set Up Firebase Authentication Create a Firebase Project  in the Firebase console. Register Your App  in the Firebase project. Provide a unique project name (from  build.gradle  →  defaultConfig { applicationId } ). Download the  google-services.json  configuration file and add it to your project. Add Firebase dependencies  to the  build.gradle ...

Navigation Components - Quick Overview

Action Bar Typically located at the top of the screen : The Action Bar is usually placed at the top of the screen, providing a prominent area for app navigation and controls. Can contain menu, navigation controls, and branding elements : It may include icons, logos, and links to important app sections. Displays the app title or logo : By default, it shows the app’s title or logo for identification. Supports search integration : Action Bar can be extended to include a search field for better app usability. Can be replaced with a Toolbar : You can replace the Action Bar with a custom  Toolbar  for more flexibility in design. Provides quick access to key actions via buttons and overflow menus : It often contains action buttons (e.g., save, search, etc.) and overflow menus for additional options. Key classes : androidx.appcompat.widget.Toolbar  (used in the activity layout XML) Menu Part of the Action Bar : Menus are an integral part of the Action Bar, usually located at the...