Baidu app Android client (I) custom navigation bar

Source: Internet
Author: User

Title layout activity_main_title.xml

 

 

<? XML version = "1.0" encoding = "UTF-8"?> <Relativelayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "match_parent" Android: Background = "@ color/title_background" Android: orientation = "vertical"> <imageview Android: Id = "@ + ID/icon" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_alignparentleft = "true" Android: src = "@ drawable/icon"/> <textview Android: Id = "@ + ID/icon_text" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: text = "@ string/title_name" Android: layout_torightof = "@ ID/icon" Android: textsize = "18sp"/> <imageview Android: id = "@ + ID/applist" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_alignparentright = "true" Android: onclick = "show_applist" Android: src = "@ drawable/titlebar_applist_normal"/> <imageview Android: Id = "@ + ID/searchbt" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: layout_toleftof = "@ ID/applist" Android: onclick = "search_app" Android: src = "@ drawable/titlebar_search_normal"/> </relativelayout>

 

 

KeyCode:

 

 
Requestwindowfeature (window. feature_custom_title); setcontentview (R. layout. activity_main); getwindow (). setfeatureint (window. feature_custom_title, R. layout. activity_main_title );

White-out questions:

 

Http://www.cnblogs.com/qingblog/archive/2012/09/03/2668542.html

 

Where

 

<Resources> <style name = "statusbarbackground"> <item name = "Android: background"> @ drawable/shape </item> </style> <style name = "xwindowtitle"Parent = "Android: windowtitle"><Item name = "Android: shadowcolor"> # bb000000 </item> <item name = "Android: shadowradius"> 0 </item> </style> </resources>

 

The version after 2.2 is changed

 

 

</Style> <style name = "statusbarbackground"> </style> <style name = "xwindowtitle"Parent = "Android: textappearance. windowtitle"><Item name = "Android: shadowcolor"> # bb000000 </item> <item name = "Android: shadowradius"> 0 </item> </style>

 

 

Summary:

Is there a good blog website recommended? Some websites are too difficult to use, but unfortunately there is no good alternative...
 

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.