Android 5.0 makes the main menu background display as Wallpaper

Source: Internet
Author: User

1, Appscustomizepagedview.java modified two places as follows:
1) private void Setuppage (Appscustomizecelllayout layout) {
Layout.setgridsize (Mcellcountx, Mcellcounty);
Note:we Force a measure here to get around the fact that's when We do layout calculations
Immediately after syncing, we don't have a proper width. That said, we already know the
Expected page width, so we can actually optimize by hiding all the textview-based
Children that is expensive to measure, and let that happen naturally later.
Setvisibilityonchildren (layout, view.gone);
int widthspec = Measurespec.makemeasurespec (Mcontentwidth, measurespec.at_most);
int heightspec = Measurespec.makemeasurespec (Mcontentheight, measurespec.at_most);
Layout.measure (Widthspec, Heightspec);
if (! LAUNCHER.DISABLE_APPLIST_WHITE_BG) {//add
drawable bg = GetContext (). Getresources (). getdrawable (R.drawable.quantum_panel);
if (bg! = null) {
Bg.setalpha (mpagebackgroundsvisible 255:0);
Layout.setbackground (BG);
}
} else {//add
Layout.setbackground (null);//add
}//add
Setvisibilityonchildren (layout, view.visible);
}

2) public void syncappspageitems (int page, Boolean immediate) {
......
AppInfo info = mapps.get (i);
Bubbletextview icon = (bubbletextview) mlayoutinflater.inflate (
R.layout.apps_customize_application, layout, false);
if (LAUNCHER.DISABLE_APPLIST_WHITE_BG) {//add
Icon.settextcolor (GetContext (). Getresources (). GetColor (R.color.quantum_panel_transparent_bg_text_color));//add
}//add
Icon.applyfromapplicationinfo (info);
Icon.setonclicklistener (Mlauncher);
Icon.setonlongclicklistener (this);
......


2. New in Colors.xml:
<color name= "Quantum_panel_transparent_bg_text_color" > #FFFFFF </color>
3, Deviceprofile.java Modify layout (Launcher Launcher) method as follows:
......
Pagedview.setwidgetspageindicatorpadding (Pageindicatorheight);
if (LAUNCHER.DISABLE_APPLIST_WHITE_BG) {//add
Fakepage.setbackground (null);//add
} else {//add
Fakepage.setbackground (Res.getdrawable (R.drawable.quantum_panel));
}//add
Horizontal padding for the whole paged view
int pagedfixedviewpadding =
Res.getdimensionpixelsize (r.dimen.apps_customize_horizontal_padding);
......

4. Launcher.java
1) Added:
Add begin
M:disable applist white background for jitter performance issue {@
public static Boolean DISABLE_APPLIST_WHITE_BG = true;
public static final String PROP_DISABLE_APPLIST_WHITE_BG = "launcher.whitebg.disable";
Should kill and restart launcher process to re-execute static block if reset properties
adb shell SetProp launcher.applist.whitebg.disable true/false
ADB shell stop
ADB shell start
static {
DISABLE_APPLIST_WHITE_BG = Android.os.SystemProperties.getBoolean (PROP_DISABLE_APPLIST_WHITE_BG, true);
}
/// @}
Add End
2) The Showappscustomizehelper method is modified as follows:
......
if (Iswidgettray) {
Revealview.setbackground (Res.getdrawable (R.drawable.quantum_panel_dark));
} else {
if (LAUNCHER.DISABLE_APPLIST_WHITE_BG) {//add
Revealview.setbackground (null);//add
} else {//add
Revealview.setbackground (Res.getdrawable (R.drawable.quantum_panel));
}//add
}
......
3) The Hideappscustomizehelper method is modified as follows:
......
if (Iswidgettray) {
Revealview.setbackground (Res.getdrawable (R.drawable.quantum_panel_dark));
} else {
if (LAUNCHER.DISABLE_APPLIST_WHITE_BG) {//add
Revealview.setbackground (null);//add
} else {//add
Revealview.setbackground (Res.getdrawable (R.drawable.quantum_panel));
}//add
}
......

Android 5.0 makes the main menu background display as Wallpaper

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.