Understanding of Setdisplayhomeasupenabled and sethomebuttonenabled and Setdisplayshowhomeenabled methods in Android Actionbar
Source: Internet
Author: User
<span id="Label3"><pre>Sethomebuttonenabled The default value of this version less than 4.0 is True. But at 4.0 and above is false, the function of this method: decide whether the icon in the upper left corner can be clicked. There are no small icons to the left. The true icon can be clicked false to not be Clicked. actionbar.setdisplayhomeasupenabled (true) //add A return icon to the left of the Upper-left Icon. Corresponds to ActionBar.DISPLAY_HOME_AS_UPactionBar.setDisplayShowHomeEnabled (true)//to make the upper- left icon appear and, if set to false, no program icon, Just a title, otherwise, the app icon is displayed, and the corresponding ID is android. r.id.home, corresponding to ActionBar.DISPLAY_SHOW_HOMEactionBar.setDisplayShowCustomEnabled (true) //enable custom Normal view to be displayed in the title bar , that is, Actionbar.setcustomview can function, corresponding to ActionBar.DISPLAY_SHOW_CUSTOMactionBar.setDisplayShowTitleEnabled (true) // Corresponds to Actionbar.display_show_title. where sethomebuttonenabled and setdisplayshowhomeenabled work together, if sethomebuttonenabled is set to false, Even if setdisplayshowhomeenabled is set to true, the icon cannot be clicked</pre><p>Understanding of Setdisplayhomeasupenabled and sethomebuttonenabled and Setdisplayshowhomeenabled methods in Android Actionbar</p></span>
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