android - Res cannot be resolved with an ImageView -
I have a On the line: I'm getting the error use instead :? Otherwise, you must first obtain the resource from the context, e.g. If you are in a Also, does not meet your other image processing ID: ImageView in my Android app I
ImageView as a button of'm using when I pressed the button, then you should change the image in my code, it says
Rhys can not be solved . My code is below:
loginbtn.setOnClickListener (btnOnClickListener); Here, according to // convert images loginbtn.setOnTouchListener touch (New OnTouchListener () {@Override public boolean onTouch (see v, MotionEvent ARG1) {// TODO Auto-generated method stub // switch (arg1.getAction ()) {case MotionEvent.ACTION_DOWN: break {v.setImageBitmap (res.getDrawable (R.drawable.compare_now_click)); // Race break;} case MotionEvent.ACTION_CANCEL: {v.setImageBitmap (. res.getDrawable (R.drawable));; }} Return true, return;}});
v.setImageBitmap (res.getDrawable (R.drawable.compare_now_click));
res can not be resolved . Why this may be happening
((imageView) v) .setImageResource (R.drawable.compare_now_click);
activity , use the
resource race = getResources ();
R.drawable
Comments
Post a Comment