Eclipse ADT ActionBarActivity?(Eclipse ADT ActionBarActivity?)

编程入门 行业动态 更新时间:2024-10-24 07:22:21
Eclipse ADT ActionBarActivity?(Eclipse ADT ActionBarActivity?)

我是eclipse和android的新手,我正在尝试按照教程,但每次创建一个新项目时,它都有一些教程没有的额外内容。 它不是扩展Activity而是扩展ActionBarActivity,而是从我认为不需要的额外方法开始。 有没有办法在没有动作栏的情况下创建一个新项目?

I'm brand new to eclipse and android and I'm trying to follow tutorials but every time I create a new project it has a bunch of extra stuff that the tutorials don't have. Instead of extending Activity it extends ActionBarActivity and starts with extra methods that I don't think I need. Is there a way to create a new project without the action bar stuff?

最满意答案

如果您不想要ActionBar活动,请使用此代码替换该类。

import android.app.Activity; import android.os.Bundle; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }

If you don't want ActionBar activity, then replace the class with this code.

import android.app.Activity; import android.os.Bundle; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }

更多推荐

本文发布于:2023-07-31 00:09:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1340365.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Eclipse   ADT   ActionBarActivity

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!