如何调整中心活动标题或标签? [英] How to align center the title or label in activity?
本文介绍了如何调整中心活动标题或标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道有设置活动标题的两种方式。一种方法是将其设置在Android清单这样的机器人:标签=@字符串/ APP_NAME。二是编程方式在活动课例如的setTitle(的Hello World!)设置。这两种方式都位于左侧,但我怎么可以把它放在中心?
I know there are two ways of setting the title of activity. One way is the setting it in the android manifest like this android:label="@string/app_name". Second is programmatically setting in activity class like setTitle("Hello World!"). Both ways are positioned in the left side but how can I put it in the center?
推荐答案
您需要定义一个自定义标题样式/主题。看样品com.example.android.apis.app.CustomTitle研究。
You will need to define a custom title style/theme. Look in the samples for com.example.android.apis.app.CustomTitle.
这篇关于如何调整中心活动标题或标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文