Saving Android View State

Today we will talk about saving and restoring View states in Android. I intentionally want to keep our focus on Android Views state just because I found this process just a little bit trickier than saving your Activity or Fragment state. Plus I think I’ve seen enough of re-invented wheels (sometimes really ugly ones) throughout the internet. Why do we need to save View state? Very good question! I have very strong belief that mobile application should help you solve existing problems, not add new ones.

Android Message Handling Mechanism

Android is a message driven, message driven several elements: The message says: Message Message queue: MessageQueue The news cycle, remove the message processing for circulation: Looper Message processing, message loop out messages from the message queue should be carried out after the processing of messages: Handler Usually we use most often is Message and Handler, if you use HandlerThread or similar HandlerThread things may come into contact with Looper, while

Android Custom View

Subclass View onMeasure MeasureSpec setMeasureDimension onLayout layout(left, top, right, bottom) onDraw Canvas While viewgroups dont generally draw any content of their own,there are many situations where this could be useful,there are help instances where we can ask viewgroup to do some drawing.The first is inside the method dispatchDraw() after super.dispatchDraw has been called,at this stage,child views have already been drawn and we have an opportunity to do additional drawing on top.