From 8848713b77c9adef5615d31af72e77935e719628 Mon Sep 17 00:00:00 2001 From: yavorivanov Date: Thu, 27 Oct 2016 00:21:22 +0300 Subject: [PATCH] Fixes #34. --- README.md | 2 +- library/build.gradle | 6 +++--- .../java/io/github/yavski/fabspeeddial/FabSpeedDial.java | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1051a5e..8f5e870 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Similarly tо [NavigationView] (http://developer.android.com/reference/android/s ##### Add the dependency to gradle.build ``` dependencies { - compile 'io.github.yavski:fab-speed-dial:1.0.6' + compile 'io.github.yavski:fab-speed-dial:1.0.7' } ``` diff --git a/library/build.gradle b/library/build.gradle index 651e28b..7b4e9df 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -8,8 +8,8 @@ android { defaultConfig { minSdkVersion 8 targetSdkVersion 23 - versionCode 7 - versionName "1.0.6" + versionCode 8 + versionName "1.0.7" } buildTypes { release { @@ -32,7 +32,7 @@ publish { userOrg = 'yavski' groupId = 'io.github.yavski' artifactId = 'fab-speed-dial' - publishVersion = '1.0.6' + publishVersion = '1.0.7' } // apply from: './maven.gradle' diff --git a/library/src/main/java/io/github/yavski/fabspeeddial/FabSpeedDial.java b/library/src/main/java/io/github/yavski/fabspeeddial/FabSpeedDial.java index 37cf478..7efe6e2 100644 --- a/library/src/main/java/io/github/yavski/fabspeeddial/FabSpeedDial.java +++ b/library/src/main/java/io/github/yavski/fabspeeddial/FabSpeedDial.java @@ -306,13 +306,13 @@ public void onClick(View v) { if (parent instanceof FrameLayout) { FrameLayout frameLayout = (FrameLayout) parent; - frameLayout.addView(touchGuard, frameLayout.indexOfChild(this)); + frameLayout.addView(touchGuard); } else if (parent instanceof CoordinatorLayout) { CoordinatorLayout coordinatorLayout = (CoordinatorLayout) parent; - coordinatorLayout.addView(touchGuard, coordinatorLayout.indexOfChild(this)); + coordinatorLayout.addView(touchGuard); } else if (parent instanceof RelativeLayout) { - ((RelativeLayout) parent).addView( - touchGuard, ((RelativeLayout) parent).indexOfChild(this), + RelativeLayout relativeLayout = (RelativeLayout) parent; + relativeLayout.addView(touchGuard, new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); } else {