List of usage examples for android.content.res Configuration ORIENTATION_LANDSCAPE
int ORIENTATION_LANDSCAPE
To view the source code for android.content.res Configuration ORIENTATION_LANDSCAPE.
Click Source Link
From source file:com.concentricsky.android.khanacademy.app.VideoDetailActivity.java
private void onOrientationChanged(final int orientation) { currentOrientation = orientation;/*w w w . j a va2 s. c om*/ if (!isFullscreen || !isBigScreen) { switch (orientation) { case Configuration.ORIENTATION_LANDSCAPE: goLandscape(); break; case Configuration.ORIENTATION_PORTRAIT: goPortrait(); break; default: } } }
From source file:dev.ronlemire.commoncontrols.MainActivity.java
public void StartSpinnerFragment() { if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE && isTablet()) {// w ww . j a va2 s .com Fragment spinnerFragment = (Fragment) fm .findFragmentById(R.id.sample_replacer); spinnerFragment = SpinnerFragment.newInstance("Spinner"); fm.beginTransaction() .replace(R.id.sample_replacer, spinnerFragment) .commit(); } else { SpinnerFragment spinnerFragment = SpinnerFragment .newInstance("Spinner"); getSupportFragmentManager().beginTransaction() .replace(MainActivity.sampleListView.getId(), spinnerFragment) .commit(); } }
From source file:dev.ronlemire.commoncontrols.MainActivity.java
public void StartStylesFragment() { if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE && isTablet()) { Fragment stylesFragment = (Fragment) fm.findFragmentById(R.id.sample_replacer); stylesFragment = StylesFragment.newInstance("Styles"); fm.beginTransaction().replace(R.id.sample_replacer, stylesFragment).commit(); } else {//from w w w . j a v a 2s . c om StylesFragment stylesFragment = StylesFragment.newInstance("Styles"); getSupportFragmentManager().beginTransaction() .replace(MainActivity.sampleListView.getId(), stylesFragment).commit(); } }
From source file:dev.ronlemire.commoncontrols.MainActivity.java
public void StartStylesFragment() { if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE && isTablet()) {//from w w w .j ava2s . c om Fragment stylesFragment = (Fragment) fm .findFragmentById(R.id.sample_replacer); stylesFragment = StylesFragment.newInstance("Styles"); fm.beginTransaction() .replace(R.id.sample_replacer, stylesFragment) .commit(); } else { StylesFragment stylesFragment = StylesFragment .newInstance("Styles"); getSupportFragmentManager().beginTransaction() .replace(MainActivity.sampleListView.getId(), stylesFragment) .commit(); } }
From source file:dev.ronlemire.commoncontrols.MainActivity.java
public void StartTextViewFragment() { if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE && isTablet()) { Fragment textViewFragment = (Fragment) fm.findFragmentById(R.id.sample_replacer); textViewFragment = TextViewFragment.newInstance("TextView"); fm.beginTransaction().replace(R.id.sample_replacer, textViewFragment).commit(); } else {//from w w w .j a v a 2 s.c om TextViewFragment textViewFragment = TextViewFragment.newInstance("TextView"); getSupportFragmentManager().beginTransaction() .replace(MainActivity.sampleListView.getId(), textViewFragment).commit(); } }
From source file:de.bahnhoefe.deutschlands.bahnhofsfotos.DetailsActivity.java
public void onPictureClicked() { if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE && !fullscreen) { ValueAnimator animation = ValueAnimator.ofFloat(header.getAlpha(), 0f); animation.setDuration(500);//from ww w .j a va2 s .co m animation.addUpdateListener(new AnimationUpdateListener()); animation.start(); detailsLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE); ActionBar bar = getActionBar(); if (bar != null) bar.hide(); android.support.v7.app.ActionBar sbar = getSupportActionBar(); if (sbar != null) sbar.hide(); fullscreen = true; } else { ValueAnimator animation = ValueAnimator .ofFloat(header == null ? tvBahnhofName.getAlpha() : header.getAlpha(), 1.0f); animation.setDuration(500); animation.addUpdateListener(new AnimationUpdateListener()); animation.start(); detailsLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE); ActionBar bar = getActionBar(); if (bar != null) bar.show(); android.support.v7.app.ActionBar sbar = getSupportActionBar(); if (sbar != null) sbar.show(); fullscreen = false; } }
From source file:com.android.calendar.AllInOneActivity.java
/** * Sets the offset of the controls on the right for animating them off/on * screen. ProGuard strips this if it's not in proguard.flags * * @param controlsOffset The current offset in pixels *///from w w w. j a va 2 s . co m public void setControlsOffset(int controlsOffset) { if (mOrientation == Configuration.ORIENTATION_LANDSCAPE) { mMiniMonth.setTranslationX(controlsOffset); mCalendarsList.setTranslationX(controlsOffset); mControlsParams.width = Math.max(0, mControlsAnimateWidth - controlsOffset); mMiniMonthContainer.setLayoutParams(mControlsParams); } else { mMiniMonth.setTranslationY(controlsOffset); mCalendarsList.setTranslationY(controlsOffset); if (mVerticalControlsParams == null) { mVerticalControlsParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, mControlsAnimateHeight); } mVerticalControlsParams.height = Math.max(0, mControlsAnimateHeight - controlsOffset); mMiniMonthContainer.setLayoutParams(mVerticalControlsParams); } }
From source file:com.yek.keyboard.anysoftkeyboard.AnySoftKeyboard.java
@Override public boolean onEvaluateFullscreenMode() { if (getCurrentInputEditorInfo() != null) { final EditorInfo editorInfo = getCurrentInputEditorInfo(); if ((editorInfo.imeOptions & EditorInfo.IME_FLAG_NO_FULLSCREEN) != 0) { //if the view DOES NOT want fullscreen, then do what it wants Logger.d(TAG, "Will not go to Fullscreen because input view requested IME_FLAG_NO_FULLSCREEN"); return false; } else if ((editorInfo.imeOptions & EditorInfo.IME_FLAG_NO_EXTRACT_UI) != 0) { Logger.d(TAG, "Will not go to Fullscreen because input view requested IME_FLAG_NO_EXTRACT_UI"); return false; }// w ww . j a va2 s. c o m } switch (mOrientation) { case Configuration.ORIENTATION_LANDSCAPE: return mAskPrefs.getUseFullScreenInputInLandscape(); default: return mAskPrefs.getUseFullScreenInputInPortrait(); } }
From source file:dev.ronlemire.commoncontrols.MainActivity.java
public void StartTextViewFragment() { if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE && isTablet()) {//w w w .j a va 2 s . c o m Fragment textViewFragment = (Fragment) fm .findFragmentById(R.id.sample_replacer); textViewFragment = TextViewFragment.newInstance("TextView"); fm.beginTransaction() .replace(R.id.sample_replacer, textViewFragment) .commit(); } else { TextViewFragment textViewFragment = TextViewFragment .newInstance("TextView"); getSupportFragmentManager().beginTransaction() .replace(MainActivity.sampleListView.getId(), textViewFragment) .commit(); } }
From source file:dev.ronlemire.commoncontrols.MainActivity.java
public void StartWeightGravityFragment() { if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE && isTablet()) { Fragment weightGravityFragment = (Fragment) fm.findFragmentById(R.id.sample_replacer); weightGravityFragment = WeightGravityFragment.newInstance("WeightGravity"); fm.beginTransaction().replace(R.id.sample_replacer, weightGravityFragment).commit(); } else {//from w w w . j a v a 2 s.c om WeightGravityFragment weightGravityFragment = WeightGravityFragment.newInstance("WeightGravity"); getSupportFragmentManager().beginTransaction() .replace(MainActivity.sampleListView.getId(), weightGravityFragment).commit(); } }