我是Android新手,所以只能在示例中学习和玩弄东西。目前,我正在通过Timer Task生成图像的示例,我陷入了一个困境,我真的需要专家的建议。下面是代码和它在哪里使用Log.i(“MARKER”,“* **”).....有些人可以告诉我为什么我在行的最后一节出错? ?与日志标记卡住
@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);
}
};
在此先感谢。
看起来你正在使用针对双引号代替Log.i常规双引号(“标记”,” *************”) ; – Samuel
显示堆栈跟踪错误日志 – Yahor10
我只收到错误“令牌上的语法错误,请删除这些令牌”。 –