, but they can directly or indirectly lead toGC roots is used to prevent GC collection. Useless objects occupy a memory space, making it possible to actually use the memorySmaller, the image of the statement is a memory leak.1 Static variables cause2 single-case mode causes3 Property Animation causes
4
ListView optimization to solve picture confusion1 Convertview use, the main optimization load layout problems2 internal class Viewholder use the main optimization GetView method
not recommended to exceed the memory of the phone itself.Then enter FREE-M return to see the phone virtual memory space sizeSwap column As long as not all 0 and set success, if you repeat step 3 for zero, if multiple attempts (no code input error) is unsuccessful may be the phone does not support virtual memory. The above tools to share to Baidu network disk, follow me, and provide free extraction codeLike friends can for my small reward, pay for the value of Geekwhite again this thank you!We
can be created less.
2, to avoid unnecessary drawing logic, when needed to draw. This needs to be adjusted based on the control's drawing logic, which is also very important.
3, the general principle is to do everything possible to control the implementation of the OnDraw method within 16ms, will not be card.
Finally, look at the effect we've achieved.
Source Address:
GitHub Address
The above is a small set to introduce Android to create
Recently, a sudden whim, interested in some loading, loading this thing is important also important, said not important and unimportant, because this is a promotion of your product experience a detail, if loading do well, for some time-consuming need to wait for the page will distract users, Will not appear so irritable, so you can see all kinds of interesting loading animation on the market, then this blog is ready to collect some loading animation bar, from these realization ideas can open you
Commonly used Android effects (various progress bars, cool loading animations, rocket launching, sprinkling, and trend charts), androidloading
I have provided a lot of time recently. I have summarized the ui effects used in the next few projects, shared them with you here, and made a record for myself (a demo will be posted later ).Mainly the following ui effects:
Multiple display progress bars
Open-sou
own in the layout file dead
*
* @param datas
/public void Settabitemtitles (list
In fact, you can in the onCreate inside to set the content of the tab display, as well as the number of visible, Tab we guess, if the layout and onCreate inside all wrote the quantity, which is effective (oneself to experiment) ~ ~
Remember if it was code control setVisibleTabCount , setTabItemTitles before the call.
Summarize
Interested, to change the triangle to our underline indicator play ~ ~ Estimated
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.