Giter Site home page Giter Site logo

Bug:第268页代码段“DownloadThread的实现"部分,最后一行代码对象mHandler无定义。 about google_android_book_v2 HOT 3 CLOSED

eoecn avatar eoecn commented on June 11, 2024
Bug:第268页代码段“DownloadThread的实现"部分,最后一行代码对象mHandler无定义。

from google_android_book_v2.

Comments (3)

vincent4j avatar vincent4j commented on June 11, 2024

定义在DownloadThread外部类MainActivity里;在写书当时应该是觉得类的成员属性声明是很平常的操作,粘贴代码时,就有意将这部分过滤(毕竟每章节的篇幅是有限制的)。带来不便,还望多多包涵。

声明的代码如下:

public class MainActivity extends Activity implements OnClickListener {

    private Button mStartScan;
    private ProgressDialog mProgressDialog;

    private DownloadHandler mHandler = new DownloadHandler(this);

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        initViews();
    }

具体请见(第23行):https://github.com/eoecn/google_android_book_v2/blob/master/19/BookSearcher/src/com/eoeandroid/booksearcher/MainActivity.java

from google_android_book_v2.

vincent4j avatar vincent4j commented on June 11, 2024

已经摘录进:
https://github.com/eoecn/google_android_book_v2/wiki/%E7%AC%AC1%E6%AC%A1%E5%8D%B0%E5%88%B7%E9%97%AE%E9%A2%98%E7%BB%9F%E8%AE%A1
log: * 第19章,268页,3. DownloadThread的实现中的代码解释 issues#19 [cb070f4]

from google_android_book_v2.

vincent4j avatar vincent4j commented on June 11, 2024

可以 close 掉了。 @krislq @IceskYsl

from google_android_book_v2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.