我想在我的应用程序中实现ActionBarSherlock侧面菜单导航抽屉,但总是得到:
@H_404_3@DrawerLayout cannot be resolved to a type ActionBarDrawerToggle cannot be resolved to a type@H_404_3@我的进口是:
import android.content.res.Configuration; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.view.View; import android.widget.AdapterView; import android.widget.ListView; import com.actionbarsherlock.app.SherlockFragmentActivity; import com.actionbarsherlock.view.MenuItem;
解决方法
从支持库导入这些
import android.support.v4.app.ActionBarDrawerToggle; import android.support.v4.widget.DrawerLayout;@H_404_3@检查一下 @H_404_3@http://developer.android.com/tools/support-library/index.html @H_404_3@有关NaigationDrawer的更多信息 @H_404_3@http://developer.android.com/training/implementing-navigation/nav-drawer.html