`
mmdev
  • 浏览: 12929160 次
  • 性别: Icon_minigender_1
  • 来自: 大连
文章分类
社区版块
存档分类
最新评论

Cannot refer to a non-final variable anim inside an inner class defined in a different method

 
阅读更多

AnimationDrawable anim=(AnimationDrawable)imageView.getBackground();

play.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
anim.start();
}}
);

——>定义anim为final变量:final AnimationDrawable anim

分享到:
评论

相关推荐

    终于明白为什么要加 final 关键字了!

    作者:guanpj 链接:...在 Java 8 之前,匿名内部类在使用外部成员的时候,会报错并提示 “Cannot refer to a non-final variable arg inside an inner class defined in a different method”:

    Refer a Friend 2014-Spring Special Scheme

    Refer a Friend 2014-Spring Special Scheme

    NVMe-over-Fabrics-1.1-2019.10.22-Ratified.pdf

    The mapping of extensions defined in this document to a specific NVMe Transport are defined in an NVMe Transport binding specification. This document contains an NVMe Transport binding specification ...

    Turbo C++ 3.0[DISK]

    If you want to run such hosted EXEs in a Windows Standard Mode DOS window, you should run DPMIRES.EXE before loading Windows. To do this, enter the following commands at DOS: set DPMIMEM=MAXMEM ...

    Turbo C++ 3.00[DISK]

    If you want to run such hosted EXEs in a Windows Standard Mode DOS window, you should run DPMIRES.EXE before loading Windows. To do this, enter the following commands at DOS: set DPMIMEM=MAXMEM ...

    2009 达内Unix学习笔记

    id -a root 显示用户所在组的所有组名(如root用户,是所有组的组员) df 查看文件系统,查看数据区 用法 df [-F FSType] [-abeghklntVvZ] [-o FSType 特定选项] [目录 | 块设备 | 资源] df -k 以kbytes显示文件...

    Refer-it-in-RGBD:CVPR 2021中我们的论文“在Refer-it-in-RGBD中”​​的资料库

    引用到RGBD 这是CVPR 2021中论文“在RGBD中... 我们通过与从ScanRefer数据集和我们新收集的SUN-Refer数据集提取的RGB-D图像上的最新技术进行比较,来评估所提出的方法。 实验表明,在两个数据集上,我们的方法都比以前

    DevExpress VCL 13.1.4(v2013vol1.4) 源码-例子-帮助-part2

    Q513198 - Moving focus to TcxDBSpinEdit placed in TdxBarControlContainerItem does not fire the OnExit and OnEnter events and, as a result, does not fire the OnGetText event of a dataset field bound to...

    DevExpress VCL 13.1.4(v2013vol1.4) 源码-例子-帮助-part1

    Q513198 - Moving focus to TcxDBSpinEdit placed in TdxBarControlContainerItem does not fire the OnExit and OnEnter events and, as a result, does not fire the OnGetText event of a dataset field bound to...

    Chinese Entity Linking Comprehensive

    referred to in each query has a matching entity node in the reference Knowledge Base (KB) (LDC2014T16). If there is a matching node for a query, annotators create a link between the two. If there is ...

    Universal-USB-Installer

    interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a ...

    DevExpress VCL 13.2.5 D7-DXE6 FullSource

    •S173543 - Introduce a property providing access to the FNewLoadMode field declared in the TcxCustomVerticalGrid class Common Libraries ExpressEditors Library •S173677 - Documentation - Add a note...

    数位板压力测试

    This specification was developed in response to a perceived need for a standardized programming inter-face to digitizing tablets, three dimensional position sensors, and other pointing devices by a ...

    傅立叶快速变换算法实例源码

    The commercial license allows you to include the compiled code in a product or to use the code on a regular basis. You are however NOT allowed to sell the source code. Distribution of the ...

    Graph-based Natural Language Processing and Information Retrieval

    In this way, the book serves as an entry point to a deeper engagement with graph-based methods for NLP and IR, and it encourages readers to see their NLP problem from a graph-based view. For a ...

    Turbo C 2.00[DISK]

    static variable or a variable that is local to a static function. o Because of the limited memory available in the Tiny model, it no longer supports graphics functions. o The Version 1.5 ...

    Coupled-Field Analysis Guide

    fields) that interact to solve a global engineering problem, hence, we often refer to a coupled-field analysis as a multiphysics analysis.When the input of one field analysis depends on the results ...

    微软内部资料-SQL性能优化2

    A reference to an invalid page (a page that is not in your working set) is referred to as a page fault. Assuming the page reference does not result in an access violation, a page fault can be either ...

    DevExpress VCL 12.2.6(v2012vol2.6) 源码-例子-帮助-part1

    Q487520 - OLAP mode - The "List index out of bounds" exception when expanding a grouping value of an inner column/row field after an outer field has been hidden in the same area Q485882 - ...

    DevExpress VCL 12.2.6(v2012vol2.6) 源码-例子-帮助-part2

    Q487520 - OLAP mode - The "List index out of bounds" exception when expanding a grouping value of an inner column/row field after an outer field has been hidden in the same area Q485882 - ...

Global site tag (gtag.js) - Google Analytics