9-1 Android 1

SFR1811·2022년 3월 13일
0

CS349-User Interface

목록 보기
6/8

Imperative vs Declarative programing

Imperative programing is to describe how to build the result.

Declarative programing is to declare what you want the result to be
i.e. HTML is a declarative UI


Constraint UI strings to resources

When you are writing strings in UIs, it is a better convention to declare strings as resources and give a reference to it because this makes:

  1. reuse of same string easy
  2. translation of the app easy

Layouts


Android Layout Units

dp = density-independent pixels (dips)

you can use pixels, mm but it depends on pixels-per-inch density.

i.e. 40 pixel in 400 dpi is 10% of the screen, but 40 pixel in 4000 dpi is 1% of the screen

profile
3B CS

0개의 댓글