Null Pointer Exeception on viewPager.setAdapter(new MyFragmentPagerAdapter(getSupportFragmentManager(),alFragment));
viewPager未初始化
you can debug a NullPointerException yourself by adding things like:
if(viewPager == null){ Log.e("MainActivity", "viewPager should not be null"); }