Android Optimizer (JSON tool, message new/pass, avtivity deep learning video)

Source: Internet
Author: User

1, online JSON check tool: www.bejson.com

2, Message.what uses static quantities on the handler of the message that is commonly used in the. private static final int msg_successs=0x111;message.what=msg_success;

3,message transfer Optimization, object New way.
Normal: Message msg=new message ();handler.sendmessage (msg);
Modified to:Message msg = Handler.obtainmessage ();handler.sendmessage (msg);
Advantages:returns a new message instance from the entire Messge pool, which is used in many cases because it avoids assigning new objects,Getting the message object by calling the Obtainmessage method avoids creating the object, thereby reducing the overhead of memory.

4: Post a deep study of activity. http://www.imooc.com/view/388

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android Optimizer (JSON tool, message new/pass, avtivity deep learning video)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.