コード例 #1
0
  @Override
  protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    int cCount = getChildCount();

    for (int i = 0; i < cCount; i++) {
      TagView tagView = (TagView) getChildAt(i);
      if (tagView.getVisibility() == View.GONE) continue;
      if (tagView.getTagView().getVisibility() == View.GONE) {
        tagView.setVisibility(View.GONE);
      }
    }
    super.onMeasure(widthMeasureSpec, heightMeasureSpec);
  }