Пример #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_recommend);
    SwipeBackHelper.getCurrentPage(this).setSwipeBackEnable(false);
    ButterKnife.bind(this);
    back.setOnClickListener(v -> finish());
    viewpager.setAdapter(pagerAdapter = new SeedFragmentListAdapter(getSupportFragmentManager()));
    tabs.setupWithViewPager(viewpager);
    viewpager.setCurrentItem(getIntent().getIntExtra("type", 0));
    tabs.setTabTextColors(
        getResources().getColor(R.color.gray), getResources().getColor(R.color.orange));
    tabs.setOnTabSelectedListener(
        new TabLayout.OnTabSelectedListener() {
          @Override
          public void onTabSelected(TabLayout.Tab tab) {
            title.setText(tab.getText());
          }

          @Override
          public void onTabUnselected(TabLayout.Tab tab) {}

          @Override
          public void onTabReselected(TabLayout.Tab tab) {}
        });
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    SwipeBackHelper.getCurrentPage(this).setSwipeBackEnable(false);

    LineModel model = getIntent().getExtras().getParcelable("value");
    stationModels =
        DBUtils.getLineInfo(
            model.getLine_id(), model.getUpdown_type(), CurrentPositionMapActivity.this);
    markers = new ArrayList<>();

    initView(savedInstanceState);
  }
Пример #3
0
 @Override
 protected void onDestroy() {
   super.onDestroy();
   SwipeBackHelper.onDestroy(this);
 }
Пример #4
0
 @Override
 protected void onPostCreate(Bundle savedInstanceState) {
   super.onPostCreate(savedInstanceState);
   SwipeBackHelper.onPostCreate(this);
 }
Пример #5
0
 @Override
 protected void onDestroy() {
   super.onDestroy();
   SwipeBackHelper.onDestroy(getActivity());
   JActivityManager.getInstance().popActivity(getActivity());
 }
Пример #6
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   SwipeBackHelper.onCreate(getActivity());
   JActivityManager.getInstance().pushActivity(getActivity());
 }