diff --git a/build.gradle b/build.gradle index fd5e680..205d224 100644 --- a/build.gradle +++ b/build.gradle @@ -19,6 +19,6 @@ ext { targetSdkVersion = 21 buildToolsVersion = "23.0.1" minSdkVersion = 14 - versionCode = 13 - versionName = "1.1.3" + versionCode = 14 + versionName = "1.1.4" } \ No newline at end of file diff --git a/switcher-library/src/main/java/pl/aprilapps/switcher/Switcher.java b/switcher-library/src/main/java/pl/aprilapps/switcher/Switcher.java index d8a68cd..8a3b50a 100644 --- a/switcher-library/src/main/java/pl/aprilapps/switcher/Switcher.java +++ b/switcher-library/src/main/java/pl/aprilapps/switcher/Switcher.java @@ -6,8 +6,8 @@ import android.util.Log; import android.util.Pair; import android.view.View; +import android.view.ViewGroup; import android.view.ViewParent; -import android.widget.FrameLayout; import android.widget.TextView; /** @@ -116,9 +116,9 @@ private static View getCurrentlyVisibleView(View viewToShow) { ViewParent parentView = viewToShow.getParent(); - if (parentView instanceof FrameLayout) { + if (parentView instanceof ViewGroup) { - FrameLayout parent = (FrameLayout) parentView; + ViewGroup parent = (ViewGroup) parentView; View visibleView = null; for (int i = 0; i < parent.getChildCount(); i++) { @@ -128,7 +128,7 @@ private static View getCurrentlyVisibleView(View viewToShow) { if (visibleView != null) return visibleView; else throw new Resources.NotFoundException("Visible view not found"); } else { - throw new ClassCastException("All state views (content|error|progress|blur) should have the same FrameLayout parent"); + throw new ClassCastException("All state views (content|error|progress|blur) should have the same ViewGroup parent"); } }