Android Launcher2 developed with drawers instead of drawers

Source: Internet
Author: User



Block all application buttons in the CreateShortcut method in Launcher.java
Before you modify
View createshortcut (int layoutresid, viewgroup parent, Shortcutinfo info) {
Bubbletextview favorite = (Bubbletextview) minflater.inflate (
Layoutresid, parent, false);
Favorite.applyfromshortcutinfo (info, miconcache);
Favorite.setonclicklistener (this);
if (Info.itemtype = = LauncherSettings.Favorites.ITEM_TYPE_ALLAPPS
&& Info.geticon (miconcache) = = null) {
All Apps icon
drawable d =
Getresources (). getdrawable (R.drawable.all_apps_button_icon);
drawable d = mhotseat.getappsbuttonbitmap ();//Qijinling

Utilities.resizeicondrawable (d);
Favorite.setcompounddrawables (null, d, NULL, NULL);
Favorite.setontouchlistener (Gethapticfeedbacktouchlistener ());
}
Utilities.applytypeface (favorite);
return favorite;
}




After modification
*/
View createshortcut (int layoutresid, viewgroup parent, Shortcutinfo info) {
Bubbletextview favorite = (Bubbletextview) minflater.inflate (
Layoutresid, parent, false);
Favorite.applyfromshortcutinfo (info, miconcache);
Favorite.setonclicklistener (this);
if (Info.itemtype = = LauncherSettings.Favorites.ITEM_TYPE_ALLAPPS
&& Info.geticon (miconcache) = = null) {
All Apps icon
drawable d = getresources (). Getdrawable (
R.drawable.all_apps_button_icon);


Hide Menu
Favorite.setwidth (0);
Favorite.setheight (0);
Favorite.setvisibility (View.gone);
Utilities.resizeicondrawable (d);
Favorite.setcompounddrawables (null, d, NULL, NULL);
Favorite.setontouchlistener (Gethapticfeedbacktouchlistener ());
}
Utilities.applytypeface (favorite);
return favorite;
}










Then find the Disable_all_apps property in the Appscustomizepagedview class




No drawer true and vice versa
public static Boolean Disable_all_apps = true; property is set to TRUE or Faule

Android Launcher2 developed with drawers instead of drawers

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.