简体   繁体   中英

How to create custom title bar with back button and title?

I want to make a slick GUI for my application. But how would i go about creating a cusom title bar with a back button? And are there any tools to make custom buttons for in android? Or to help make a GUI? Also are there any books that talk HEAVELY about android GUI's?

I want to make a slick GUI for my application.

That's nice.

But how would i go about creating a cusom title bar with a back button?

No sensible Android developer puts "a back button" on the screen, since the OS provides a BACK button for the user.

Be careful when doing too much with custom title bars right now. The Android title bar is morphing into the Honeycomb "action bar" for Android 3.x, and there is a decent chance that Ice Cream Sandwich will give phones the "action bar" as well. While you can style the action bar and do lots of slick things with it, it has a structure that should be adhered to, so Android applications can have a consistent look and feel. If you make your phone apps too dependent on a radically different sort of "custom title bar", you may get UX complaints from users.

That being said, personally I find the easiest way to do a "custom title bar" is to simply get rid of the existing title bar (eg, android:theme="@android:style/Theme.NoTitleBar" on the <activity> in the manifest) and then do the "title bar" in the activity's own layout. Or, use FEATURE_CUSTOM_TITLE , as described in this blog post .

And are there any tools to make custom buttons for in android?

Photoshop. The GIMP. Microsoft Paint. Etc.

If you are referring to an image to go on the face of a button, you only need one image. If you are referring to a custom background, that gets more complicated, as they will probably need to be nine-patch PNG files , one for each different state of relevance (normal, pressed, selected, etc.).

Or to help make a GUI?

Eclipse has drag-and-drop GUI development nowadays.

Also are there any books that talk HEAVELY about android GUI's?

Assuming you really mean "heavily" (and were distracted by the SHIFT key while typing), then pretty much all of them do. It's not like they're covering Web servers or Beowulf clusters or something.

As to whether they meet your standards for "HEAVELY", read the tables of contents.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM