1.继承Fragment,重写onCreateView和onActivityCreate方法 2.在MainActivity中初始化Fragment
FragmentManager fm = getSupportFragmentManager();//继承FragmentActivityFragmentTransaction transaction = fm.beginTransaction(); transaction.replace(R.id.fl_left_menu, new LeftMenuFragment(), TAG_LEFT_MENU);transaction.replace(R.id.fl_content, new ContentFragment(), TAG_CONTENT);transaction.commit();新闻热点
疑难解答