Please enable JavaScript.
Coggle requires JavaScript to display documents.
7 Images and graphics (Drawables (create (XML resource (normal, NinePatch…
7 Images and graphics
Drawables
something that can be drawn
create
XML resource
normal
NinePatch drawables -tao 1 BG img cho view cho the thay doi khi noi dung thay doi
import image resource
Code = lop ShapeDrawables
code = class drawable
NinePatch drawables
tao 1 BG img cho view cho the thay doi khi noi dung thay doi
doi mau + lay mau cua drawable
Hardware acceleration
control
isEnabled
on/off lv
issues with HA
drawing models. - giai thich cac ve cua android 2 che do
software-based
hardware-accelerated
Tips and tricks
Render -ways to optimize your app's rendering performance:
view hierarchies
Profile GPU Rendering - cong cu trong adnrodi deverlop
giam overdraw
no BG thua
optimizing your view hierarchy to reduce the number of overlapping UI objects
tool find prolem
Reduce transparency
vecter drawable
VectorDrawable ->hinh
AnimatedVectorDrawable -> animate
Handling Bitmap
vd : ton bo nho
xly = resize
oncreateBm method
insamplesize flag
inscale+ indes +intaget
using lid :Glide
Reducing image download sizes
tim hieu lua chon cac dinh dang nen anh
balance between compression and image quality.
OpenGL ES
bang mau moi voi nieu mau hon -Enhance graphics with wide color content
Displaying graphics = OpenGL ES
chua tim hieu