Skip to content

Commit

Permalink
修复更改图标大小出现的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
chaychan committed Sep 13, 2017
1 parent 63b4979 commit ed12da3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
Expand Down Expand Up @@ -125,7 +126,7 @@ private void init() {

if (mIconWidth != 0 && mIconHeight != 0){
//如果有设置图标的宽度和高度,则设置ImageView的宽高
LayoutParams imageLayoutParams = (LayoutParams) mImageView.getLayoutParams();
FrameLayout.LayoutParams imageLayoutParams = (FrameLayout.LayoutParams) mImageView.getLayoutParams();
imageLayoutParams.width = mIconWidth;
imageLayoutParams.height = mIconHeight;
mImageView.setLayoutParams(imageLayoutParams);
Expand Down

0 comments on commit ed12da3

Please sign in to comment.