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(); } }
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(); } }
// 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; } }
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(); }
protected void hideLoadingIndicator(ViewSwitcher switcher) { switcher.showPrevious(); }