Essay (12)

1. Tencent hot repair framework Tinker
2. Android NDK development literacy and the latest CMake compilation and use
3. SparseArray

SparseArray is a class specially written for Hashmap such as <Interger, Object> in an d r o i d. The purpose is to improve efficiency. Its core is the binary search function ( binarySearch ) .

The bottom layer of HashMap is a Hash table, which is a collection implementation of arrays and linked lists. If you need it, you can go and see my analysis of Hashmap. hashmap source code analysis

Therefore, it is officially recommended in Android development: when using HashMap(K, V), if K is an integer type, it is more efficient to use SparseArray.

int ix = mXAxis .getXLabels (). keyAt (i) ;

String label = mXAxis.getXLabels().valueAt(i);


4.
int e = (int) Math.floor(Math.log10(num));

public static String getVolUnit(float num) {

    int e = (int) Math.floor(Math.log10(num));
    if (e >= 8) {
        return "亿手";
} else if (e >= 4) {
        return "万手";
} else {
        return "手";
}
            



}

5.MPAndroid
6 volmax = Math.max(kLineData.vol, volmax);

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325808397&siteId=291194637