如何使用ActionBarActivity而不是Activity [英] How to work with ActionBarActivity instead of Activity
问题描述
Plus我得到以下2行导入显示错误:
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
将AppCompat库导入Eclipse(您可能需要从SDK中下载它经理人) ActionBarActivity与正常的Activity相同,除了一些方法名称稍有不同,例如 getSupportActionBar()
而不是 getActionBar()
和 getSupportFragmentManager()
而不是 getFragmentManager()
。
I am using eclipse for android development and last time I used it couple of months ago with API-17. But today when installing new updates from SDK manager, I am trying to create a new project. And after creation my activity is extending ActionBarActivity instead of activity. And its showing errors. Any solutions?
Plus I got the below 2 lines of importing showing error:
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
Import the AppCompat library into Eclipse (you may have to download it from the SDK Manager first). ActionBarActivity works the same as a normal Activity, except some method names are slightly different, e.g. getSupportActionBar()
instead of getActionBar()
and getSupportFragmentManager()
instead of getFragmentManager()
.
这篇关于如何使用ActionBarActivity而不是Activity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!