Skip to content

Commit

Permalink
changed FrameLayout to just ViewGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacek Kwiecień committed Nov 17, 2015
1 parent 05811ee commit bb29293
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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++) {
Expand All @@ -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");
}

}
Expand Down

0 comments on commit bb29293

Please sign in to comment.