【发布时间】:2021-12-15 11:34:21
【问题描述】:
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
setTitle(Html.fromHtml("<font color=\"white\">" + "Settings" + "</font>"));
This is how the action bar looks like now
我在 onCreate 方法中使用这两行来更改操作栏的标题和颜色,但它是靠左对齐的,有没有办法让它居中?
【问题讨论】:
标签: android android-actionbar center-align