此登录名是片段,我想从此活动中启动它。我该怎么办?
Log_In log_in =new Log_In();
android.support.v4.app.FragmentTransaction transaction= getSupportFragmentManager().beginTransaction();
transaction.replace(R.id.relative_layout,log_in);
transaction.commit();
finish();
viewPager.setCurrentItem(1);
答案 0 :(得分:0)
Log_In log_in =new Log_In();
FragmentTransaction fTransaction=getFragmentManager();
mTransaction.beginTransaction()
.replace(R.layout.container,log_in)
.commit();