【发布时间】:2010-12-13 17:50:14
【问题描述】:
我正在使用具有方向感知能力的ActivityGroup。
当手机处于竖屏模式时Activity A 应该被启动。
在横向模式下Activity B 应该被启动。
我在这两个活动中都有一个自定义标题,在相应的onCreate 方法中调用。
我这样称呼自定义标题的初始化:
@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
customTitleBar = new CustomTitleBar(getWindow());
Log.d(TAG, "onCreate called");
setContentView(R.layout.layout_a);
customTitleBar.init();
...
}
当我单独启动每个 Activity 时,这一切都有效。
但是当尝试在 ActivityGroup 中启动它们时,我的应用程序崩溃并出现以下异常:
java.lang.RuntimeException: Unable to resume activity {foo.bar.MyActivityGroup}:
java.lang.RuntimeException: Unable to start activity ComponentInfo{foo.bar.ActivityA}:
android.util.AndroidRuntimeException:
You cannot combine custom titles with other title features
我没有在ActivityGroup 中使用任何标题功能。有人能帮我解决这个问题吗?
【问题讨论】:
标签: android runtimeexception activitygroup