How Android will display a long icon name for the desktop and main menu full

Source: Internet
Author: User

1, please modify the Styles.xml, will
<style name= "Workspaceicon.portrait" >
<item name= "Android:drawablepadding" >0dp</item>
<item name= "Android:paddingleft" >4dp</item>
<item name= "Android:paddingright" >4dp</item>
<item name= "Android:paddingtop" > @dimen/app_icon_padding_top</item>
<item name= "Android:paddingbottom" >4dp</item>
<item name= "Android:textsize" >13sp</item>
</style>
Modified to:
<style name= "Workspaceicon.portrait" >
<item name= "Android:drawablepadding" >0dp</item>
<item name= "Android:paddingleft" >4dp</item>
<item name= "Android:paddingright" >4dp</item>
<item name= "Android:paddingtop" > @dimen/app_icon_padding_top</item>
<item name= "Android:paddingbottom" >4dp</item>
<item name= "Android:textsize" >13sp</item>
<item name= "Android:singleline" >false</item>
<item name= "Android:lines" >2</item>
</style>
2, please modify the Bubbletextview.java Applyfromshortcutinfo method, will
Setcompounddrawablepadding ((int) ((GRID.FOLDERICONSIZEPX-GRID.ICONSIZEPX)/2f));
The parameters in this line of code are changed to a suitable value.
3, please modify the Pagedviewicon.java Applyfromapplicationinfo method, as follows:
public void Applyfromapplicationinfo (AppInfo info, Boolean scaleup,
Pagedviewicon.pressedcallback CB) {
Micon = Info.iconbitmap;
Mpressedcallback = CB;
Setcompounddrawableswithintrinsicbounds (NULL, utilities.createicondrawable (MICON), NULL, NULL);
Setcompounddrawablepadding (xxxx);//Add (xxxx Please adjust itself to the appropriate value)
SetText (Info.title);
Settag (info);
}

How Android will display a long icon name for the desktop and main menu full

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.