我使用stage.frameRate停止并恢复游戏。游戏菜单在舞台上单击暂停按钮。但是当我单击停止按钮时它不起作用,直到我移动鼠标。我怎么能修复它。谢谢
final File file=new File(mContext.getCacheDir(),"images/images"+number+".Gif");
number++;
holder.img_thumbnail.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
{
Glide.with(mContext)
.load(lm.get(position).getUrl())
.asGif()
.placeholder(R.mipmap.ic_launcher)
.crossFade()
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.listener(new RequestListener<String, GifDrawable>() {
@Override
public boolean onException(Exception e, String model, Target<GifDrawable> target, boolean isFirstResource) {
return false;
}
@Override
public boolean onResourceReady(GifDrawable resource, String model, Target<GifDrawable> target,
boolean isFromMemoryCache, boolean isFirstResource) {
BufferedOutputStream s ;
frames= resource.getFrameCount();
try {
s = new BufferedOutputStream(new FileOutputStream(file));
s.write(resource.getData());
s.flush();
s.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return false;
}
});