content: package io.virtualapp.home;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.annotation.Nullable;
  import android.support.design.widget.TabLayout;
  import android.support.v4.view.ViewPager;
  import android.support.v7.widget.Toolbar;
  import android.view.MenuItem;
  
  import io.virtualapp.R;
  import io.virtualapp.VCommends;
  import io.virtualapp.abs.ui.VActivity;
  import io.virtualapp.home.adapters.AppPagerAdapter;
  
  /**
   * @author Lody
   */
  public class ListAppActivity extends VActivity {
  
      private Toolbar mToolBar;
      private TabLayout mTabLayout;
      private ViewPager mViewPager;
  
      public static void gotoListApp(Activity activity) {
          Intent intent = new Intent(activity, ListAppActivity.class);
          activity.startActivityForResult(intent, VCommends.REQUEST_SELECT_APP);
      }
  
      @Override
      protected void onCreate(@Nullable Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_clone_app);
          mToolBar = findViewById(R.id.clone_app_tool_bar);
          mTabLayout = mToolBar.findViewById(R.id.clone_app_tab_layout);
          mViewPager = findViewById(R.id.clone_app_view_pager);
          mViewPager.setAdapter(new AppPagerAdapter(getSupportFragmentManager()));
          mTabLayout.setupWithViewPager(mViewPager);
  
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          if (item.getItemId() == android.R.id.home) {
              finish();
              return true;
          }
          return super.onOptionsItemSelected(item);
      }
  }
  