From e25a8589b676b1bd9d2e0bad3931595e3172cd1b Mon Sep 17 00:00:00 2001 From: chaychan <844738237@qq.com> Date: Sat, 1 Apr 2017 09:23:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/chaychan/viewlib/ExpandableLinearLayout.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/viewlib/src/main/java/com/chaychan/viewlib/ExpandableLinearLayout.java b/viewlib/src/main/java/com/chaychan/viewlib/ExpandableLinearLayout.java index d2f1553..d2afc64 100644 --- a/viewlib/src/main/java/com/chaychan/viewlib/ExpandableLinearLayout.java +++ b/viewlib/src/main/java/com/chaychan/viewlib/ExpandableLinearLayout.java @@ -30,6 +30,7 @@ public class ExpandableLinearLayout extends FrameLayout implements View.OnClickL private String expandText;//展开时显示的文字 private String hideText;//隐藏时显示的文字 private ImageView ivArrow; + private RelativeLayout rlBottom; public ExpandableLinearLayout(Context context) { this(context, null); @@ -53,7 +54,7 @@ public class ExpandableLinearLayout extends FrameLayout implements View.OnClickL View rootView = View.inflate(context, R.layout.expandable_linearlayout, null); llContainer = (LinearLayout) rootView.findViewById(R.id.ll_container); - RelativeLayout rlBottom = (RelativeLayout) rootView.findViewById(R.id.rl_bottom); + rlBottom = (RelativeLayout) rootView.findViewById(R.id.rl_bottom); ivArrow = (ImageView) rootView.findViewById(R.id.iv_arrow); tvTip = (TextView) rootView.findViewById(R.id.tv_tip); @@ -76,7 +77,7 @@ public class ExpandableLinearLayout extends FrameLayout implements View.OnClickL */ private void refreshUI() { int childCount = llContainer.getChildCount(); - tvTip.setVisibility(childCount > defaultItemCount ? VISIBLE : GONE);//控制隐藏 + rlBottom.setVisibility(childCount > defaultItemCount ? VISIBLE : GONE);//控制隐显 if (childCount > defaultItemCount) { hide(false); } -- GitLab