本文整理汇总了Java中android.support.v7.app.ActionBar.setSubtitle方法的典型用法代码示例。如果您正苦于以下问题:Java ActionBar.setSubtitle方法的具体用法?Java ActionBar.setSubtitle怎么用?Java ActionBar.setSubtitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v7.app.ActionBar
的用法示例。
在下文中一共展示了ActionBar.setSubtitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onResume
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
public void onResume() {
super.onResume();
ActionBar actionBar = ActivityUtils.supportToolbarFor(this);
if (nonNull(actionBar)) {
actionBar.setTitle(R.string.new_poll);
actionBar.setSubtitle(null);
}
new ActivityFeatures.Builder()
.begin()
.setBlockNavigationDrawer(true)
.setStatusBarColored(true)
.build()
.apply(getActivity());
}
示例2: onResume
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
public void onResume() {
super.onResume();
Settings.get().ui().notifyPlaceResumed(Place.AUDIOS);
ActionBar actionBar = ActivityUtils.supportToolbarFor(this);
if (actionBar != null) {
actionBar.setTitle(R.string.music);
actionBar.setSubtitle(null);
}
if (getActivity() instanceof OnSectionResumeCallback) {
((OnSectionResumeCallback) getActivity()).onSectionResume(NavigationFragment.SECTION_ITEM_AUDIOS);
}
new ActivityFeatures.Builder()
.begin()
.setBlockNavigationDrawer(false)
.setStatusBarColored(true)
.build()
.apply(getActivity());
}
示例3: onResume
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
public void onResume() {
super.onResume();
ActionBar actionBar = ActivityUtils.supportToolbarFor(this);
if (actionBar != null) {
actionBar.setTitle(R.string.create_album);
actionBar.setSubtitle(null);
}
new ActivityFeatures.Builder()
.begin()
.setBlockNavigationDrawer(true)
.setStatusBarColored(true)
.build()
.apply(getActivity());
}
示例4: onResume
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
public void onResume() {
super.onResume();
ActionBar actionBar = ActivityUtils.supportToolbarFor(this);
if (actionBar != null) {
actionBar.setTitle(R.string.chat_users);
actionBar.setSubtitle(null);
}
new ActivityFeatures.Builder()
.begin()
.setBlockNavigationDrawer(false)
.setStatusBarColored(true)
.build()
.apply(getActivity());
}
示例5: onResume
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
public void onResume() {
super.onResume();
ActionBar actionBar = ActivityUtils.supportToolbarFor(this);
if (actionBar != null) {
actionBar.setTitle(R.string.settings);
actionBar.setSubtitle(R.string.notif_setting_title);
}
if (getActivity() instanceof OnSectionResumeCallback) {
((OnSectionResumeCallback) getActivity()).onSectionResume(NavigationFragment.SECTION_ITEM_SETTINGS);
}
new ActivityFeatures.Builder()
.begin()
.setBlockNavigationDrawer(false)
.setStatusBarColored(true)
.build()
.apply(getActivity());
}
示例6: onResume
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
public void onResume() {
super.onResume();
Settings.get().ui().notifyPlaceResumed(Place.NOTIFICATIONS);
ActionBar actionBar = ActivityUtils.supportToolbarFor(this);
if (actionBar != null) {
actionBar.setTitle(R.string.drawer_feedback);
actionBar.setSubtitle(null);
}
if (getActivity() instanceof OnSectionResumeCallback) {
((OnSectionResumeCallback) getActivity()).onSectionResume(NavigationFragment.SECTION_ITEM_FEEDBACK);
}
new ActivityFeatures.Builder()
.begin()
.setBlockNavigationDrawer(false)
.setStatusBarColored(true)
.build()
.apply(getActivity());
}
示例7: loadToolbar
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
private void loadToolbar(final Book book) {
if (getActivity() != null) {
ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar();
if (actionBar != null) {
actionBar.setTitle(book.getVolumeInfo().getTitle());
actionBar.setSubtitle(book.getVolumeInfo().getAuthors() != null ? book.getVolumeInfo().getAuthors().get(0) : "");
}
}
}
示例8: setActionBarSubtitle
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
protected void setActionBarSubtitle(int id)
{
ActionBar actionBar = getSupportActionBar();
if (actionBar != null)
{
actionBar.setSubtitle(id);
}
}
示例9: setToolbarSubTitle
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
private void setToolbarSubTitle(int total, int online) {
ActionBar actionBar =
((BriarActivity) getActivity()).getSupportActionBar();
if (actionBar != null) {
actionBar.setSubtitle(
getString(R.string.shared_with, total, online));
}
}
示例10: initActionBar
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
protected ActionBar initActionBar(ActionBar ab, int titleId, int subtitleId) {
if (ab != null) {
ab.setElevation(100);
ab.setDisplayHomeAsUpEnabled(true);
ab.setHomeButtonEnabled(true);
ab.setTitle(titleId);
if (subtitleId != 0) {
ab.setSubtitle(subtitleId);
}
}
return ab;
}
示例11: onResume
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
public void onResume() {
super.onResume();
ActionBar actionBar = ActivityUtils.supportToolbarFor(this);
if (nonNull(actionBar)) {
actionBar.setTitle(R.string.photos);
actionBar.setSubtitle(null);
}
}
示例12: displayCreationTime
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
public void displayCreationTime(long unixtime) {
ActionBar actionBar = ActivityUtils.supportToolbarFor(this);
if(nonNull(actionBar)){
String formattedDate = new SimpleDateFormat("dd.MM.yyyy HH:mm", Locale.getDefault())
.format(new Date(unixtime * 1000));
actionBar.setSubtitle(formattedDate);
}
}
示例13: adjustActionBar
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
private void adjustActionBar(boolean showTitle, boolean hadSelection) {
menu.setGroupVisible(R.id.copy_actions, hadSelection);
if(isFullScreen) {
if(hadSelection) {
exitFab.show();
copyFab.show();
exitFullScreenFab.show();
} else {
exitFab.show();
copyFab.hide();
exitFullScreenFab.show();
}
}
ActionBar actionBar = getSupportActionBar();
if(actionBar != null) {
if(showTitle) {
actionBar.setTitle(R.string.copy_title);
actionBar.setSubtitle(R.string.copy_subtitle);
actionBar.setHomeAsUpIndicator(R.mipmap.ic_close_white_24dp);
return;
}
actionBar.setTitle((CharSequence)null);
actionBar.setSubtitle((CharSequence)null);
actionBar.setHomeAsUpIndicator(R.mipmap.ic_arrow_back_white_24dp);
}
}
示例14: onResume
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
public void onResume() {
super.onResume();
ActionBar actionBar = ActivityUtils.supportToolbarFor(this);
if (actionBar != null) {
actionBar.setTitle(null);
actionBar.setSubtitle(null);
}
}
示例15: onCreate
import android.support.v7.app.ActionBar; //导入方法依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_root);
ButterKnife.bind(this);
setSupportActionBar(toolbar);
final ActionBar supportActionBar = getSupportActionBar();
final Team team = getIntent().getExtras().getParcelable(ARG_TEAM);
supportActionBar.setTitle(team.getName());
supportActionBar.setSubtitle(getString(R.string.messages_subtitle));
supportActionBar.setDisplayHomeAsUpEnabled(true);
inflateFragment(team);
}