From 7460254e1bc89773b6301a835026a9da79797ad5 Mon Sep 17 00:00:00 2001 From: Benjamin Gamard Date: Tue, 2 Sep 2014 21:33:04 +0200 Subject: [PATCH] Explain the layout change about the RelativeLayout --- README.md | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a052d6c..cf546a7 100755 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Just replace your default toggle with this awesome blurred toggle effect just by For example: -``` +```java mDrawerToggle = new ActionBarDrawerToggle( getActivity(), /* host Activity */ mDrawerLayout, /* DrawerLayout object */ @@ -28,7 +28,7 @@ mDrawerToggle = new ActionBarDrawerToggle( ); ``` to -``` +```java mDrawerToggle = new BlurActionBarDrawerToggle( getActivity(), /* host Activity */ mDrawerLayout, /* DrawerLayout object */ @@ -37,8 +37,28 @@ mDrawerToggle = new BlurActionBarDrawerToggle( R.string.navigation_drawer_close /* "close drawer" description for accessibility */ ); ``` -and initialize it with a RelativeLayout(working to fix this) passed as View and a blur radius. + +then modify your layout to include a RelativeLayout around the drawer main frame: +```xml + + + + + + + + ``` + +and initialize BlurActionBarDrawerToggle with the RelativeLayout (working to fix this) passed as View and a blur radius. +```java mDrawerToggle.init(getActivity().findViewById(R.id.mylayout), 10); ```