Posts

Android Widgets - Overview

Image
Progress Bar Part of  Android UI Kit , which includes built-in UI components and tools provided by the Android SDK. Used to indicate the progress of an operation. Two Modes: Determinate:  Displays the remaining percentage and completed work. Indeterminate (Default):  Cyclic animation when the operation duration is unknown. Seek Bar Extends  Progress Bar . Common use cases: Adjusting volume, brightness for media playing, setting a price range etc Allows users to  drag  a thumbnail to adjust progress. Customizable with  min, max, and step values . Date and Time Picker Dialogs Enables users to  select a date or time . Two main types: DatePickerDialog  – Allows users to select a date. TimePickerDialog  – Allows users to select a time. Calendar View Displays a  calendar interface  for selecting dates. Configurable date range  (defined in XML or code). Introduced in  API 11 . Functions similarly to  Date and Time Picke...

Android Wdigets, Activities and Notifications - Overview

Snackbar Provides lightweight feedback about an operation. Displays a brief message at the bottom of the screen. Automatically disappears after a timeout. Similar to a Toast but can include an action button. Implemented using the  Snackbar  class. Activity Main activity  is configured in  AndroidManifest.xml . Each activity must be declared in the manifest file. Activities are managed as an  activity stack : When an activity starts another, it is pushed on top of the stack. Pressing the  Back  button pops the current activity from the stack. Activity Lifecycle Non-existent → Stopped → Paused → Running Developers manage state transitions using lifecycle callbacks: onCreate()  →  onStart()  →  onResume() onPause()  →  onStop()  →  onDestroy() Lifecycle Details onPause() Activity is partially visible but not in focus. UI updates may still continue. Multi-resume  is supported on select devices. onStop() Activity...

Kotlin Programming Language - Quick Review

Image
   Kotlin Programming Language History Created by  JetBrains  in 2011 as a new language for the JVM. Announced as an  official language for Android  during Google I/O in 2017. JVM Review The  Java Virtual Machine (JVM)  is an abstract machine that allows Java programs to run on any device or operating system without modification. Java source code ( .java  files) is compiled by the  Java Compiler ( javac )  into  bytecode  ( .class  files). Bytecode is a  platform-independent  intermediate representation of the code. The JVM  interprets  the bytecode and executes it or compiles it into  native machine code  using the  Just-In-Time (JIT) Compiler  for better performance. The JVM  manages memory , including features like  garbage collection, execution engine, and class loading . Class Loading The JVM loads the required  .class  files into memory. The  ...

Kotlin Language Review questions

Image
 1. Draw the diagram or Compiling