Skip to content

Commit

Permalink
* addition to completly FIX #95 && #183
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Apr 7, 2015
1 parent c2707aa commit f0ef515
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions library/src/main/java/com/mikepenz/materialdrawer/Drawer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1732,15 +1732,17 @@ public void setStatusBarColor(int statusBarColor) {
* @param enable
*/
public void keyboardSupportEnabled(Activity activity, boolean enable) {
if (mKeyboardUtil == null) {
mKeyboardUtil = new KeyboardUtil(activity, getContent());
mKeyboardUtil.disable();
}
if (getContent() != null && getContent().getChildCount() > 0) {
if (mKeyboardUtil == null) {
mKeyboardUtil = new KeyboardUtil(activity, getContent().getChildAt(0));
mKeyboardUtil.disable();
}

if (enable) {
mKeyboardUtil.enable();
} else {
mKeyboardUtil.disable();
if (enable) {
mKeyboardUtil.enable();
} else {
mKeyboardUtil.disable();
}
}
}

Expand Down

0 comments on commit f0ef515

Please sign in to comment.