nynw.net
当前位置:首页 >> AnDroiD imAgEviEw1赋值给imAgEviEw2?用img2.sEtIm... >>

AnDroiD imAgEviEw1赋值给imAgEviEw2?用img2.sEtIm...

img1和img2都是ImageView,要把img1中的图片显示到img2中 前景(对应src属性) img2.setImageDrawable(img1.getDrawable()); 背景(对应background属性) img2.setBackgroundDrawable(img1.getBackground());

img1和img2都是ImageView,要把img1中的图片显示到img2中 前景(对应src属性) img2.setImageDrawable(img1.getDrawable()); 背景(对应background属性) img2.setBackgroundDrawable(img1.getBackground());

复制试试这段代码: public class ImageViewActivity extends Activity implements OnClickListener{ private ImageView mImgView2; private RelativeLayout mView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCr...

网站首页 | 网站地图
All rights reserved Powered by www.nynw.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com