• 2022-06-06
    在Java代码中,找到id为iv1的ImageView控件对象,赋值给引用imageView,找到id为btn1的Button控件对象,赋值给引用btn,并且设置该控件的点击监听器,当点击时,将imageView控件的图片设置为R.drawable.peach。补全代码:...Button btn = ______ (R.id.btn1);______ imageView = findViewById(R.id.iv1);btn.setOnClickListener(______ View.OnClickListener() { @Override public void onClick(View view) { imageView.______ (R.drawable.peach); } });