From 130d7da524e30bc95dcd7ed543662dd15d6d1a4c Mon Sep 17 00:00:00 2001 From: arjinmc Date: Tue, 23 Sep 2014 17:30:32 +0800 Subject: [PATCH] make child view invisible when colapse child views make child view invisible when colapse child views,especially when child view is bigger than parent. --- library/src/com/capricorn/ArcLayout.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/src/com/capricorn/ArcLayout.java b/library/src/com/capricorn/ArcLayout.java index 926122d..8c5cc48 100644 --- a/library/src/com/capricorn/ArcLayout.java +++ b/library/src/com/capricorn/ArcLayout.java @@ -136,6 +136,11 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) { Rect frame = computeChildFrame(centerX, centerY, radius, degrees, mChildSize); degrees += perDegrees; getChildAt(i).layout(frame.left, frame.top, frame.right, frame.bottom); + if(isExpanded()){ + getChildAt(i).setVisibility(View.VISIBLE); + }else{ + getChildAt(i).setVisibility(View.INVISIBLE); + } } }