【发布时间】:2012-03-16 12:19:26
【问题描述】:
添加此行时应用程序崩溃
`requestWindowFeature(Window.FEATURE_NO_TITLE);
可能解决方法很简单,但我真的不知道该找谁解决。
Java 代码:
public class GLSurfaceCameraSurfaceDemo2Activity extends Activity {
/** Called when the activity is first created. */
GLSurfaceView glSurfaceView;
FrameLayout fl01;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
requestWindowFeature(Window.FEATURE_NO_TITLE);
}
}
XML 文件:
<FrameLayout
android:id="@+id/fl01"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
【问题讨论】:
-
你必须调用 requestWindowFeature(Window.FEATURE_NO_TITLE);在 setContentView() 之前。
标签: android android-framelayout