I am new to Android so only working on Examples to learn and play with things. Currently I am working on an example to Generate Images via Timer Task and I am stuck at a point and I really need an expert advice. Below is the code and where its using Log.i(“MARKER”, “***“)….. Can some please tell me why I am getting an error in last section of line????
@Override
public void run() {
// TODO Auto-generated method stub
Log.i(“MARKER”,”******************************************”);
//int numViews = container.getChildCount();
ImageView toAdd = new ImageView(ImagePlayActivity.this);
Drawable imgContent = ImagePlayActivity.this.getResources().getDrawable(R.drawable.icon);
toAdd.setImageDrawable(imgContent);
toAdd.setTag(“img”+counter++);
Random rndGen = new Random();
LayoutParams lp = new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT,rndGen.nextInt(300),rndGen.nextInt(300));
toAdd.setLayoutParams(lp);
toAdd.setBackgroundColor(Color.TRANSPARENT);
AlphaAnimation anim = new AlphaAnimation(0, 1);
anim.setDuration(1000);
container.addView(toAdd);
//container.invalidate();
toAdd.startAnimation(anim);
}
};
Thanks in Advance.
You are getting an error because you’re using
”instead of". The Java language does not recognize”as a set of quotes to enclose Strings etc. in. Try changing that line to: