Switch in Navigation drawer item with Design Support Library on Android -


i need put switch inside item in navigation drawer. i'm using new design support library, cannot find if posibble @ all. when using

android:checkable 

item full selected , not wish.

this screenshot of want. possible achieve that?

enter image description here

your menu item navigation drawer:

<item     android:id="@+id/nav_item1"     android:icon="@drawable/ic_item1"     android:title="item1"     app:actionlayout="@layout/layout_switch"     /> 

and layout item:

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="horizontal" android:layout_width="match_parent"     android:layout_height="match_parent">      <android.support.v7.widget.switchcompat         android:id="@+id/drawer_switch"         android:layout_width="fill_parent"         android:layout_height="match_parent"         android:text=""/>  </linearlayout> 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -