Android 我想用日期字符串和上一步和下一步按钮显示操作栏。

Android 我想用日期字符串和上一步和下一步按钮显示操作栏。,android,android-activity,android-fragments,android-actionbar,Android,Android Activity,Android Fragments,Android Actionbar,我应该执行哪些步骤来实现它 我已经创建了操作栏,但我还需要进一步的步骤您必须使用“自定义视图”: 教程: 像这样试试 ActionBar actionBar = getSupportActionBar(); actionBar.setCustomView(R.layout.your_custom_actionbar_view); actionBar.setIcon(null); actionBar.setDisplayShowCustomEnabled(true); actionBar.setD

我应该执行哪些步骤来实现它

我已经创建了操作栏,但我还需要进一步的步骤

您必须使用“自定义视图”:

教程:

像这样试试

ActionBar actionBar = getSupportActionBar();
actionBar.setCustomView(R.layout.your_custom_actionbar_view);
actionBar.setIcon(null);
actionBar.setDisplayShowCustomEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(false);
actionBar.setDisplayUseLogoEnabled(false);
actionBar.setHomeButtonEnabled(false);
希望对你有帮助

ActionBar actionBar = getSupportActionBar();
actionBar.setCustomView(R.layout.your_custom_actionbar_view);
actionBar.setIcon(null);
actionBar.setDisplayShowCustomEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(false);
actionBar.setDisplayUseLogoEnabled(false);
actionBar.setHomeButtonEnabled(false);