开发者

Custom title with default appearance

开发者 https://www.devze.com 2023-02-17 19:18 出处:网络
I want to create a custom title bar (with some extra controls) for some activities. Since other activities will have default title bar, the customized title bar should have same appearance as default

I want to create a custom title bar (with some extra controls) for some activities. Since other activities will have default title bar, the customized title bar should have same appearance as default one on all devices. So it should have the same

  1. Height
  2. Background
  3. Text (color, size, style)
  4. Paddings/margings

(1) Assuming that title bar and status bar have same height, I can find the height using this technique.

But how开发者_Python百科 can I find (2), (3), (4)? Or is it required to create custom title bars for all activities to have cohesive appearance?


I don't really play around with the title bar, but I do know that you can change the title's text by using setTitle(String). Just call in the activity you want to set.

0

精彩评论

暂无评论...
验证码 换一张
取 消