Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Based on the <a href="http://developer.android.com/reference/android/support/v4/widget/DrawerLayout.html">documentation</a>, the <em>only</em> available gravities that can be used are <code>Gravity.LEFT</code>, <code>Gravity.RIGHT</code> or <code>GravityCompat.START</code>, <code>GravityCompat.END</code>.</p> <p>(Emphasis mine):</p> <blockquote> <p>Drawer positioning and layout is controlled using the android:layout_gravity attribute on child views corresponding to which side of the view you want the drawer to emerge from: <strong>left</strong> or <strong>right</strong>. (Or <strong>start/end</strong> on platform versions that support layout direction.)</p> </blockquote> <p>Looking at the <a href="https://android.googlesource.com/platform/frameworks/support/+/refs/heads/master/v4/java/android/support/v4/widget/DrawerLayout.java">source code</a></p> <pre><code>public void setDrawerLockMode(int lockMode, int edgeGravity) { final int absGrav = GravityCompat.getAbsoluteGravity(edgeGravity, ViewCompat.getLayoutDirection(this)); if (absGrav == Gravity.LEFT) { mLockModeLeft = lockMode; } else if (absGrav == Gravity.RIGHT) { mLockModeRight = lockMode; } if (lockMode != LOCK_MODE_UNLOCKED) { // Cancel interaction in progress final ViewDragHelper helper = absGrav == Gravity.LEFT ? mLeftDragger : mRightDragger; helper.cancel(); } switch (lockMode) { case LOCK_MODE_LOCKED_OPEN: final View toOpen = findDrawerWithGravity(absGrav); if (toOpen != null) { openDrawer(toOpen); } break; case LOCK_MODE_LOCKED_CLOSED: final View toClose = findDrawerWithGravity(absGrav); if (toClose != null) { closeDrawer(toClose); } break; // default: do nothing } } </code></pre> <p>The method itself only checks if the gravity is <code>LEFT</code> or <code>RIGHT</code> (but uses a <code>GravityCompat</code> method, so <code>START</code> and <code>END</code> should be appropriately translated).</p> <p>This would mean that by setting a gravity of <code>"start|bottom"</code>, you're introducing an invalid gravity, which causes <code>setDrawerLockMode()</code> to do nothing.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload