private void hideListItemsMenu(View v, boolean close) {
    boolean toBeHidden = false;
    for (int index = 0; index < list.getChildCount(); index++) {
      View view = list.getChildAt(index);
      if (view instanceof ViewSwitcher && ((ViewSwitcher) view).getDisplayedChild() == 1) {
        ((ViewSwitcher) view).showPrevious();
        toBeHidden = true;
        getPoiAdapter().setElementSelected(-1);
        postitionSelected = -1;
      }
    }
    if (!toBeHidden && v != null && v.getTag() != null && !close) {
      // no items needed to be flipped, fill and open details page
      FragmentTransaction fragmentTransaction =
          getSherlockActivity().getSupportFragmentManager().beginTransaction();
      PoiDetailsFragment fragment = new PoiDetailsFragment();

      Bundle args = new Bundle();
      args.putString(PoiDetailsFragment.ARG_POI_ID, ((PoiPlaceholder) v.getTag()).poi.getId());
      fragment.setArguments(args);

      fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
      // fragmentTransaction.detach(this);
      fragmentTransaction.replace(R.id.fragment_container, fragment, "pois");
      fragmentTransaction.addToBackStack(fragment.getTag());
      fragmentTransaction.commit();
    }
  }
Example #2
0
 void searchModeOff() {
   if (mTopBarIsSearch) {
     mTopBarIsSearch = false;
     hideKeyboard();
     mTopBarSwitcher.showPrevious();
     SearchTaskResult.set(null);
     // Make the ReaderView act on the change to mSearchTaskResult
     // via overridden onChildSetup method.
     mDocView.resetupChildren();
   }
 }
Example #3
0
  // Handle button clicks
  public void onClick(View v) {
    switch (v.getId()) {
      case R.id.SwitchToDate:
        v.setEnabled(false);
        findViewById(R.id.SwitchToTime).setEnabled(true);
        viewSwitcher.showPrevious();
        break;

      case R.id.SwitchToTime:
        v.setEnabled(false);
        findViewById(R.id.SwitchToDate).setEnabled(true);
        viewSwitcher.showNext();
        break;
    }
  }
Example #4
0
 public void stopHymne(View view) {
   mViewSwitcher.showPrevious();
   if (mMediaPlayer != null) mMediaPlayer.release();
 }
 @OnClick(R.id.login_change_to_login)
 void showLogin() {
   viewSwitcher.showPrevious();
 }
 @Override
 public void closeSearchUI() {
   if (mSearchView.getVisibility() != View.VISIBLE) return;
   mViewSwitcher.showPrevious();
 }
Example #7
0
 protected void hideLoadingIndicator(ViewSwitcher switcher) {
   switcher.showPrevious();
 }