Skip to content

Commit

Permalink
fix bug issue stefanjauker#2
Browse files Browse the repository at this point in the history
  • Loading branch information
麓菲 committed Dec 21, 2014
1 parent 7b68a9d commit 10c69a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions BadgeView/src/com/jauker/widget/BadgeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ public void setTargetView(View target) {
FrameLayout badgeContainer = new FrameLayout(getContext());
ViewGroup.LayoutParams parentlayoutParams = target.getLayoutParams();

badgeContainer.setLayoutParams(parentLayoutParams);
target.setLayoutParams(new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));

parentContainer.addView(badgeContainer, groupIndex, parentlayoutParams);
badgeContainer.addView(target);

Expand Down

0 comments on commit 10c69a0

Please sign in to comment.