开发者

Custom TitleBar in activity ANDROID

开发者 https://www.devze.com 2023-02-05 10:15 出处:网络
I have a problem. I would like custom my TitleBar and when I try with this method: requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);

I have a problem. I would like custom my TitleBar and when I try with this method:

requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle);

But he crash when i am in the Intent of my TabBar.

He works in my main Activity, I think there are a different method for the intent of tabBar for customize the titleBar.

开发者_运维技巧

Someone known how it's done?

I'am a begginer developper Android.

Thanks !


requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);     

getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle);

put your setContentLayout(); in the middle of these two.

0

精彩评论

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