点击一个Text切换旁边的图片

来源:互联网 发布:518抽奖软件注册码 编辑:程序博客网 时间:2024/04/25 14:31

公司项目的需求,很多都是点击自身然后切换图片的,但是不是点击自身的,但是代码也很简单下面是代码:

//图片iv_screenimages = (ImageView) findViewById(R.id.iv_screenimages);/** * 如果弹出了 */if (popupWindow.isShowing()) {iv_screenimages.setImageDrawable(getResources().getDrawable(R.drawable.arrowes_1));}/** * 如果消失了 */popupWindow.setOnDismissListener(new OnDismissListener() {@Overridepublic void onDismiss() {// TODO Auto-generated method stubiv_screenimages.setImageDrawable(getResources().getDrawable(R.drawable.arrowes_2));}});


我的是点击弹出一个popupwindow的一个效果,然后改变旁边的图片

第一个是判断有没有弹出来,第二个是如果消失了的

 

0 0
原创粉丝点击