How Android makes the main menu background appear as wallpaper

Source: Internet
Author: User

ICS/ICS2:
1. Please modify Packages\apps\launcher2\res\layout\apps_customize_pane.xml
<com.android.launcher2.appscustomizetabhost
Xmlns:android= "Http://schemas.android.com/apk/res/android"
Xmlns:launcher= "Http://schemas.android.com/apk/res/com.android.launcher"
android:background= "#00000000" >//The original value is #ff000000

2, please modify the Packages\apps\launcher2\src\com\android\launcher2\launcher.java Hideappscustomizehelper (Boolean animated, Final Boolean springloaded) method, as follows:
......
Setpivotsforzoom (Fromview, scalefactor);
Updatewallpapervisibility (TRUE);
Showhotseat (animated);
if (Mdockdivider! = null) {//Add
Mdockdivider.setvisibility (view.visible); Add
}//Add
......

3. Please modify the Launcher.java Showappscustomizehelper (Boolean animated, Final Boolean springloaded) method as follows:
......
Shrink workspaces away if going to appscustomize from workspace
Mworkspace.changestate (Workspace.State.SMALL, animated);
and hide hotseat and dock divider
Hidehotseat (FALSE); Add
if (Mdockdivider! = null) {//Add
Mdockdivider.setvisibility (view.invisible); Add
}//add
if (mworkspace! = null) {//Add
Mworkspace.setvisibility (view.invisible);//Add
}//add
......

4, please modify the Launcher.java file, will be Showappscustomizehelper (Boolean animated, Final Boolean springloaded) Two updatewallpapervisibility (false) appear in the method, commented out
The first place is the last of the public void Onanimationend (Animator animation) method within this function
The second place is at the end of the Showappscustomizehelpe method

5, please modify the Launcher.java Enterspringloadeddragmode () method, as follows:
void Enterspringloadeddragmode () {
if (mstate = = state.apps_customize) {
Mworkspace.setvisibility (view.visible); Add
Mworkspace.changestate (Workspace.State.SPRING_LOADED);
Hideappscustomizehelper (True, true);
Hidedockdivider ();
Mstate = state.apps_customize_spring_loaded;
}
}

ICS/ICS2 version According to the above changes, if the JB version needs to be modified on the basis of the following changes:

6, please modify the Launcher.java in the Disablewallpaperifinallapps () method, as follows:
void Disablewallpaperifinallapps () {
Only disable it if we is in all apps
if (isallappsvisible ()) {
if (mappscustomizetabhost! = null &&
!mappscustomizetabhost.istransitioning ()) {
Updatewallpapervisibility (TRUE); Modify}
}
}


7. Modify this control with ID animation_buffer in Packages\apps\launcher2\res\layout\apps_customize_pane.xml to Android:background Set to #0000000

If the JB2/JB3 version also needs to add the following modifications on the basis of the above modifications:

8, please modify the Launcher.java Onresume () method:
Will Setworkspacebackground (mstate = = State.workspace);
Revision changed to
Setworkspacebackground (TRUE);

After you have modified the 7th step, you may see the widget and app overlay for a short time when switching widgets and apps.
This is the Animset.playtogether within the Ontabchanged method of Appscustomizetabhost.java (Outanim, Inanim); The specified effect can be modified by itself.

How Android makes the main menu background appear 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.