Android launcher2 is developed with drawers changed to no drawers, androidlauncher2

Source: Internet
Author: User

Android launcher2 is developed with drawers changed to no drawers, androidlauncher2


Block all application buttons in the createShortcut method in launcher. java
Before 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_assist_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 the 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 attribute in the AppsCustomizePagedView class.




// No drawer. true.
Public static boolean DISABLE_ALL_APPS = true; set the property to TRUE or FAULE.


How does Apex launcher create a folder in the drawer?

Now, 2.0.1 is available. Enter the drawer in the upper right corner.
 
What are the differences between android launcher2 launcher?

Launcher does not support animation effects of desktop gadgets. launcher2 supports animation effects and 3D preliminary effects. Also, the sliding effect of launcher2 is improved.

Related Article

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.