Skip to content

Commit

Permalink
Modified how getTopParent() works
Browse files Browse the repository at this point in the history
  • Loading branch information
renas committed May 7, 2014
1 parent b20bfee commit f6b8c99
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -42,9 +42,10 @@ public ViewFetcher(ActivityUtils activityUtils) {
*/

public View getTopParent(View view) {
if (view != null && view.getParent() != null
&& view.getParent() instanceof android.view.View) {
return getTopParent((View) view.getParent());
ViewParent viewParent = view.getParent();
if (viewParent != null
&& viewParent instanceof android.view.View) {
return getTopParent((View) viewParent);
} else {
return view;
}
Expand Down

0 comments on commit f6b8c99

Please sign in to comment.