From bb2929310afde6f723a633a693147a219ffb7024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20Kwiecie=C5=84?= Date: Tue, 17 Nov 2015 16:29:45 +0100 Subject: [PATCH] changed FrameLayout to just ViewGroup --- build.gradle | 4 ++-- .../src/main/java/pl/aprilapps/switcher/Switcher.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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"); } }