This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources> | |
<string name="open_settings">Open Settings</string> | |
<string name="retry">Retry</string> | |
<string name="emui_title">EMUI is unsupported</string> | |
<string name="emui_text">Unfortunately EMUI (Huawei/Honor) does not support how Home Switch changes launchers. You will need to do this manually. \n\n1. Open Settings \n2. Manage Apps\n3.Default Apps\n4.Launcher. Pick a new launcher (Other than Home Switch).</string> | |
<string name="miui_title">MIUI is unsupported</string> | |
<string name="miui_text">Unfortunately MIUI (Xiaomi) does not support how Home Switch changes launchers. You will need to do this manually.\n\n1. Open Settings \n2. Manage Apps\n3.Default Apps\n4.Launcher. Pick a new launcher (Other than Home Switch).</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA); | |
Comparator<ApplicationInfo> packageComparator = new Comparator<ApplicationInfo>() { | |
public int compare(ApplicationInfo obj1,ApplicationInfo obj2) { | |
return obj1.loadLabel(pm).toString().compareToIgnoreCase(obj2.loadLabel(pm).toString()); | |
} | |
}; | |
Collections.sort(packages, packageComparator); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.view.View; | |
//modified version of the code provided on this SO thread. |