代码如下:
Bitmap bitmap = mWebView.getFavicon();
Drawable drawable = new BitmapDrawable(bitmap);
// edit.setCompoundDrawables(drawable, null, null, null);
drawable = this.getResources().getDrawable(R.drawable.history);
edit.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null);
edit.setText(cur_url);
// edit.setMaxLines(1);
setCompoundDrawablesWithIntrinsicBounds与setCompoundDrawables的区别:
setCompoundDrawables 画的drawable的宽高是......
阅读全文