当前位置: 首页 > news >正文

怎样在织梦后台里面做网站地图手机登qq电脑版入口

怎样在织梦后台里面做网站地图,手机登qq电脑版入口,网站报价系统,wordpress 文章 404今天我们就来学习逐帧动画,废话少说直接上效果图如下: 帧动画的实现方式有两种#xff1a; 一、在res/drawable文件夹下新建animation-list的XML实现帧动画 1、首先在res/drawable文件夹下添加img00-img24共25张图片 2、新建frame_anim.xml [html] view plaincopy ?xml v…今天我们就来学习逐帧动画,废话少说直接上效果图如下:     帧动画的实现方式有两种 一、在res/drawable文件夹下新建animation-list的XML实现帧动画 1、首先在res/drawable文件夹下添加img00-img24共25张图片 2、新建frame_anim.xml   [html] view plain copy ?xml version1.0 encodingutf-8?  animation-list xmlns:androidhttp://schemas.android.com/apk/res/android      android:oneshottrue         !-- animation-list 帧动画 --      !-- android:oneshot的值为 false代表播放多次true代表只播放一次 --      !-- duration代表每张图片的播放时间 ,定义一个持续时间为50毫秒的动画帧 --      item          android:drawabledrawable/img00          android:duration50/      item          android:drawabledrawable/img01          android:duration50/      item          android:drawabledrawable/img02          android:duration50/      item          android:drawabledrawable/img03          android:duration50/      item          android:drawabledrawable/img04          android:duration50/      item          android:drawabledrawable/img05          android:duration50/      item          android:drawabledrawable/img06          android:duration50/      item          android:drawabledrawable/img07          android:duration50/      item          android:drawabledrawable/img08          android:duration50/      item          android:drawabledrawable/img09          android:duration50/      item          android:drawabledrawable/img10          android:duration50/      item          android:drawabledrawable/img11          android:duration50/      item          android:drawabledrawable/img12          android:duration50/      item          android:drawabledrawable/img13          android:duration50/      item          android:drawabledrawable/img14          android:duration50/      item          android:drawabledrawable/img15          android:duration50/      item          android:drawabledrawable/img16          android:duration50/      item          android:drawabledrawable/img17          android:duration50/      item          android:drawabledrawable/img18          android:duration50/      item          android:drawabledrawable/img19          android:duration50/      item          android:drawabledrawable/img20          android:duration50/      item          android:drawabledrawable/img21          android:duration50/      item          android:drawabledrawable/img22          android:duration50/      item          android:drawabledrawable/img23          android:duration50/      item          android:drawabledrawable/img24          android:duration50/    /animation-list   3、在activity_main中添加控件     [html] view plain copy RelativeLayout xmlns:androidhttp://schemas.android.com/apk/res/android      xmlns:toolshttp://schemas.android.com/tools      android:layout_widthmatch_parent      android:layout_heightmatch_parent      tools:contextcom.havorld.frameanimation.MainActivity         ImageView          android:idid/imageView          android:layout_widthwrap_content          android:layout_heightwrap_content          android:layout_centerInParenttrue /      !-- android:backgrounddrawable/frame_anim --        LinearLayout          android:layout_widthmatch_parent          android:layout_heightwrap_content          android:layout_alignParentBottomtrue          android:orientationhorizontal          android:padding10dp             Button              android:idid/start              android:layout_width0dp              android:layout_heightwrap_content              android:layout_weight1              android:text播放 /            Button              android:idid/stop              android:layout_width0dp              android:layout_heightwrap_content              android:layout_weight1              android:text停止 /      /LinearLayout    /RelativeLayout   4、在代码中获取并开启帧动画     [java] view plain copy public class MainActivity extends Activity implements OnClickListener {        private ImageView imageView;      private AnimationDrawable animationDrawable;        Override      protected void onCreate(Bundle savedInstanceState) {          super.onCreate(savedInstanceState);          setContentView(R.layout.activity_main);            imageView  (ImageView) findViewById(R.id.imageView);          findViewById(R.id.start).setOnClickListener(this);          findViewById(R.id.stop).setOnClickListener(this);            setXml2FrameAnim1();          // setXml2FrameAnim2();        }        /**      * 通过XML添加帧动画方法一      */      private void setXml2FrameAnim1() {            // 把动画资源设置为imageView的背景,也可直接在XML里面设置          imageView.setBackgroundResource(R.drawable.frame_anim);          animationDrawable  (AnimationDrawable) imageView.getBackground();      }        /**      * 通过XML添加帧动画方法二      */      private void setXml2FrameAnim2() {            // 通过逐帧动画的资源文件获得AnimationDrawable示例          animationDrawable  (AnimationDrawable) getResources().getDrawable(                  R.drawable.frame_anim);          imageView.setBackground(animationDrawable);      }         Override      public void onClick(View v) {            switch (v.getId()) {          case R.id.start:              if (animationDrawable ! null  !animationDrawable.isRunning()) {                  animationDrawable.start();              }              break;          case R.id.stop:              if (animationDrawable ! null  animationDrawable.isRunning()) {                  animationDrawable.stop();              }              break;            default:              break;          }      }    }   二、通过代码实现帧动画     [java] view plain copy /**  * 通过代码添加帧动画方法  */  private void setSrc2FrameAnim() {        animationDrawable  new AnimationDrawable();      // 为AnimationDrawable添加动画帧      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img00), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img01), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img02), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img03), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img04), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img05), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img06), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img07), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img08), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img09), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img10), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img11), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img12), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img13), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img14), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img15), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img16), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img17), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img18), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img19), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img20), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img21), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img22), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img23), 50);      animationDrawable.addFrame(              getResources().getDrawable(R.drawable.img24), 50);      // 设置为循环播放      animationDrawable.setOneShot(false);      imageView.setBackground(animationDrawable);  }     点击下载源码  转载于:https://www.cnblogs.com/Im-Victor/p/8760379.html
http://www.yutouwan.com/news/349889/

相关文章:

  • 支持支付宝登录的网站建设网站建设项目验收付款
  • 加强网站硬件建设wordpress主机怎么建站
  • 动漫网站建设意义网店美工岗位应具备哪些技能
  • 中国城市建设网站2018年怎么做网站排名
  • 网站建设计划网站建设还有需求么
  • 网站被k的原因甘肃省城乡城乡建设厅网站首页
  • 建设银行网网站wordpress登陆页面保护插件
  • 做网站到哪里接单建设银行的网站用户名
  • 做外贸必须有公司网站么wordpress首页没有显示文章图片
  • 单页企业网站模板精美ppt模板免费下载百度文库
  • 法律网站建设价格深圳外贸网站定制
  • 成都网站建设服务功能青岛网站设计微动力
  • 表白网页在线生成网站源码网站关键字优化工具
  • wap网站前台如何做好分销系统开发
  • 深圳福田专业网站改版成都小程序开发公司
  • 中小企业的网站建设 论文广西建设职业技术学院贫困生网站
  • 淘宝客网站建设的策略手机wap网站模板使用
  • 可以做超链接或锚文本的网站有哪些做哪个网站有效果
  • 规划排版网站织梦网站图片不显示
  • 辽宁沈阳做网站一个阿里云服务器可以放几个网站
  • 做网站就找喇叭人北京加盟网站建设
  • 如何做网站线上监控淮安软件园网站建设
  • 做seo的网站是怎么样的网站设计师是什么专业
  • 网站认证费用翠竹林wordpress主题
  • 网络公司网站创建wordpress文章没办法显示略缩图
  • 一站式做网站多少钱自己做的网站怎么嵌入高德地图
  • 网站建设平台软件哪个好用安卓优化大师手机版下载
  • 龙之向导外贸网站暴雪vp(永久免费)加速器下载
  • 做浏览单的网站北京口碑最好的教育机构
  • 网站类产品怎么做竞品分析广州推广服务