Skip to content
This repository has been archived by the owner on Sep 28, 2018. It is now read-only.

Commit

Permalink
Merge pull request #1 from jendib/patch-1
Browse files Browse the repository at this point in the history
Explain the layout change about the RelativeLayout
  • Loading branch information
charbgr committed Sep 4, 2014
2 parents e0bb470 + 7460254 commit b66505e
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -28,7 +28,7 @@ mDrawerToggle = new ActionBarDrawerToggle(
);
```
to
```
```java
mDrawerToggle = new BlurActionBarDrawerToggle(
getActivity(), /* host Activity */
mDrawerLayout, /* DrawerLayout object */
Expand All @@ -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
<!-- This is the RelativeLayout that you must have for blur effect!-->

<RelativeLayout
android:id="@+id/mylayout"
android:layout_width="match_parent"
android:layout_height="match_parent">

<!-- As the main content view, the view below consumes the entire
space available using match_parent in both dimensions. -->
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent" />

</RelativeLayout>
```

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);
```

Expand Down

0 comments on commit b66505e

Please sign in to comment.