我知道有设置活动标题的两种方式。一种方法是将其设置在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.