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); } }更多推荐
发布评论