1. 程式人生 > >fragment相容低版本

fragment相容低版本

 

【1】Fragment導包必須都是import android.support.v4.app.Fragment;

【2】getSupportFragmentManager獲取Fragment的管理者

FragmentManager supportFragmentManager = getSupportFragmentManager();

FragmentTransaction beginTransaction = supportFragmentManager.beginTransaction();