Description: Application platform: Android
Application case: a large number of commodities, such as the rush to buy a lot of goods.
Similar to such a countdown, do not know if we have encountered, we can think of what?????????
1, every second to the server to get a data?
2, every second, through a Handler to loop traversal, every time to refresh the time control?
3, or we have other ideas.
The above two schemes are not desirable:
1, the network is connected with the time difference, moreover, the amount of data access, the server can not afford.
2, loop traversal is feasible, but in the case of a small amount of data, if the data is too large, then the card screen, the system memory occupancy is also higher.
The source of the program is to Android system in a package DigitalClock.
By inheriting the following methods and changing the internal implementation.
To Search:
File list (Check if you may need any files):
bin
gen
...\com
...\...\veally
...\...\......\timesale
...\...\......\........\BuildConfig.java
...\...\......\........\R.java
libs
res
...\drawable-hdpi
...\.............\ic_launcher.png
...\.............\topbar.png
...\drawable-ldpi
...\.............\ic_launcher.png
...\drawable-mdpi
...\.............\ic_launcher.png
...\drawable-xhdpi
...\..............\ic_action_search.png
...\..............\ic_launcher.png
...\layout
...\......\activity_time_sale.xml
...\......\adapter_item.xml
...\values
...\......\dimens.xml
...\......\strings.xml
...\......\styles.xml
src
...\com
...\...\veally
...\...\......\timesale
...\...\......\........\ActivityTimeSale.java
...\...\......\........\AdapterSaleItem.java
...\...\......\........\CustomDigitalClock.java
...\...\......\........\ProductItem.java
.classpath
.project
AndroidManifest.xml
proguard-project.txt
project.properties
说明.htm
assets
......\images
......\......\mini1.jpg
......\......\mini2.jpg
......\......\mini3.jpg
......\......\mini4.jpg
......\......\mini5.jpg
......\......\mini6.jpg
......\......\mini7.jpg
......\......\mini8.jpg