Launcher modification-Modify the bottom icon

Source: Internet
Author: User

In android2.2, the bottom of the launcher is changed to this mode. Sometimes, when you modify the launcher, you need to remove the phone and the browser. You can find the launcher in the Res/Layout-Port/folder. XML file with the following code

<Relativelayout Android: Id = "@ + ID/all_assist_button_cluster" Android: layout_width = "fill_parent" Android: layout_height = "@ dimen/button_bar_height" Android: layout_gravity = "bottom | center_horizontal" Android: paddingtop = "2dip"> <COM. android. launcher2.handleview style = "@ style/hotseatbutton" Android: Id = "@ + ID/all_assist_button" Android: layout_centerhorizontal = "true" Android: layout_alignparentbottom = "true" Android: src = "@ drawable/all_assist_button" Launcher: Direction = "horizontal"/> <imageview Android: Id = "@ + ID/hotseat_left" style = "@ style/seathotbutton. left "Android: layout_toleftof =" @ ID/all_apps_button "Android: src =" @ drawable/hotseat_phone "Android: onclick =" launchhotseat "/> <imageview Android: id = "@ + ID/hotseat_right" style = "@ style/hotseatbutton. right "Android: layout_torightof =" @ ID/all_apps_button "Android: src =" @ drawable/hotseat_browser "Android: onclick =" launchhotseat "/> </relativelayout>

The two imageview controls below are the two left and right, one phone number and one browser icon. Here, you can change these two icons to other functions. Of course, the specific functions are implemented in launcher. javaCodeIf you want to remove these icons, delete the code above, but do not forget the code in launcher. Java below.

 
Hotseatleft = (imageview) findviewbyid (R. id. hotseat_left); hotseatleft. setcontentdescription (mhotseatlabels [0]); hotseatleft. setimagedrawable (mhotseaticons [0]); hotseatright = (imageview) findviewbyid (R. id. hotseat_right); hotseatright. setcontentdescription (mhotseatlabels [1]); hotseatright. setimagedrawable (mhotseaticons [1]);

Block it, and of course their declaration code.
Private imageview hotseatleft;
Private imageview hotseatright;
After all their code is blocked, re-compile the code to complete the effect.

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.