我有一个包含三个 Activity 的应用程序,主题设置为 Light.DarActionBar,第一个 Activity 有操作栏,而第二个 Activity 没有。我怎样才能让它出现在第二个 Activity 中?
我的类Profile.java
public class Profile extends Activity {
private Button modeBtn;
private Button increaseBtn;
private Button decreaseBtn;
...
...
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_profile);
...
...
}
...
...
public void silentEnable(View view){
// set the ring mode to silent
myAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);
status.setText("Current Status: Silent Mode");
}
}
最佳答案
我认为,您已经在 list 文件的 Activity 标记中定义了您的应用程序主题。在应用程序标记中定义您的应用程序主题。
我希望这会对您有所帮助。但是,如果您有任何困惑,请上传您的 list 文件,以便我可以看到它。
关于java - ActionBar 出现在第一个 Activity 中,但未出现在第二个 Activity 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30111324/