Skip to content

Commit

Permalink
Update BadgeView.java
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexLiuSheng authored Jul 15, 2016
1 parent 4aa0820 commit 9b79837
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/src/main/java/com/allenliu/badgeview/BadgeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ public BadgeView bind(View view){

FrameLayout container=new FrameLayout(getContext());
ViewGroup.LayoutParams containerParams=view.getLayoutParams();

container.setLayoutParams(containerParams);
container.setId(view.getId());

view.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
container.addView(view);
container.addView(this);
Expand Down

0 comments on commit 9b79837

Please sign in to comment.