都说工作不好找,我们公司招人就是找不到
2013-07-23 09:54
495 查看
做了个简单的帧动画,在onCreate方法中start,发现只能看到第一帧
stackoverflow 上发现一个解决办法
或者在Activity中的onWindowFocusChanged方法中start
<?xml version="1.0" encoding="utf-8"?> <animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false" > <item android:drawable="@drawable/fire01" android:duration="200"/> <item android:drawable="@drawable/fire02" android:duration="200"/> <item android:drawable="@drawable/fire03" android:duration="200"/> <item android:drawable="@drawable/fire04" android:duration="200"/> <item android:drawable="@drawable/fire05" android:duration="200"/> <item android:drawable="@drawable/fire06" android:duration="200"/> <item android:drawable="@drawable/fire07" android:duration="200"/> <item android:drawable="@drawable/fire08" android:duration="200"/> <item android:drawable="@drawable/fire09" android:duration="200"/> </animation-list>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" > <ImageView android:id="@+id/fire_img" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:background="@drawable/fire_anim" /> </RelativeLayout>
ImageView fireImg = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ImageView fireImg = (ImageView) findViewById(R.id.fire_img); final AnimationDrawable animDrawable = (AnimationDrawable) fireImg .getBackground(); animDrawable.start(); }
stackoverflow 上发现一个解决办法
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ImageView fireImg = (ImageView) findViewById(R.id.fire_img); final AnimationDrawable animDrawable = (AnimationDrawable) fireImg .getBackground(); fireImg.post(new Runnable() { @Override public void run() { animDrawable.start(); } }); }
或者在Activity中的onWindowFocusChanged方法中start
@Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); if (fireImg != null) { AnimationDrawable animDrawable = (AnimationDrawable) fireImg .getBackground(); animDrawable.start(); } }
相关文章推荐
- 周鸿祎,高司令 2010-09-28 00:41 27469人阅读 评论(185) 收藏 举报 还是感到有必要将自己的一些想法快速记下来。 首先是对周鸿祎新员工演讲的看法。 就说实话这一点来说,周鸿祎比很多人强。所以我比较喜欢引用他的话,确实比较实在,不装逼。 至于一个公司招人的风格,是公司自己定的,别人也无权评价。有人说周是画大饼,忽悠员工卖命。废话,难道新员工讲话还有别的目的吗? 但我不认为周的选人思路在别的公司可以通行。原因是这样的:近十几年来,我们听到很多人有类似的说法,比如我们公司不要
- “流程图所画就是我们所做”不好吗?
- 电厂的数字化档案录入整理工作我已经干了三天了,满眼的都是数据、图纸、文字、我怀疑这个工作时间干长了会痴呆,所以我们干活的口号就是“看谁先疯”。
- 我们公司接到了一个比较大的IT软件项目,由于项目时间紧急,我们想采用有非常手段、非常方法,不自己进行全部的开发工作。
- 这个是看别人改的代码。但是有错误,,,找不到方法来改正错误。。。。今天编了一天的代码,脑细胞都要死完了。真心觉得计算机的工作不好做的啊,好好加油啊。。我的代码啊,不懂了!下面的有错误啊。
- 很多职位在招人,为什么还有那么多人找不到工作
- 那些年,我们曾经工作过的公司
- 创业公司老板总是干预我们的产品工作,怎么办?
- [27期] 美军士兵守则(工作如战场,我们就是战士)
- 工作就是我们人生中一个巨大的悖论
- 工作四天的体会,公司就是公司和学校果然不同!!!
- 为什么美国大学生专业不对口能找到工作;而我们中国大学生专业不对口就找不到工作?
- 2016太原UI设计师告你去公司我们涉猎哪些工作?
- 东软实训推荐面试问题6:你好象不适合到我们公司工作?
- 孙正义:我们最大的兴趣现在就是投资于亚洲公司,在手机互联网行业成为第一
- 工作四天的体会,公司就是公司和学校果然不同!!!
- 许多游戏公司都是先布置办公室,让开发团队在里面协同工作,刻苦努力多年创造出新知识产权 (IP),然后将产品交给零售店和直接分销网站出售,Steam 就是一个典型的例子。但愿能获得利润,这样他们就可以再
- 用户的习惯就是最真切的需求,用户的需求就是我们的工作内容。
- Delphi程序员如何找到高薪的工作?(赚不到钱,原因只有一个,就是他们没有被公司录取。Delphi必须要独自进行深入研究,才能精通,同时也不能自由性太强)
- 面试问题:你为什么希望到我们公司工作?