• View
    • has width, height, background, and can be made interactive

    • TextView , Image view, button

    • Unit: dp(density independent Pixel)

Linear layout has horizontal and vertical layouts

  • Constraint layout:

    Best for arranging small num of views

  • ScrollView

    • Only one other layout can be contained, usually a LinearLayout
  • Data Binding

    • If you keep using FindViewById to find the control, it gets complicated. Because this command is executed sequentially at runtime, it can be slow if there are too many things
    • So, you can link activity and fragment with a Layout file when compile Time is created – by creating a class

    Step:

    1. Enable data binding in your build.gradle file in the app module inside the android section:
    dataBinding {
    	enable = true
    }
    Copy the code
  • Constraint Layout

  • Chain

  • Baseline Constraint

    Used to set layout to handle when font sizes are inconsistent

Layout

style override theme

Dimens & Dimensions

allow u to specify reusable measurements for ur app

  • Dp for various margins sp for font size