Git Product home page Git Product logo

programmingandroid2examples's Introduction

This repo contains working code for the example in O'Reilly's _Programming Android, 2nd Edition_;  Mednieks, Dornin, Meike, Nakamura (http://shop.oreilly.com/product/0636920023005.do)

The projects have all been tested in eclipse, using the emulator (with the exception of a couple that are hardware dependent; those projects have notes to that effect in their README files)

If you have a question, you might check the FAQ:

https://github.com/bmeike/ProgrammingAndroidExamples/wiki/FAQ

To set up a project, check it out and then:
cd $PROJ
cp tools/ide/eclipse/project .project
cp tools/ide/eclipse/classpath .classpath

Start eclipse and use File > Import > "Existing project into workspace"

Comments are welcome! Send problems and comments to programmingandroidexamples at callmeike dot net.

Code for the 1st edition can be obtained by checking out the the tag v1.0

programmingandroid2examples's People

Contributors

bmeike avatar ldornin avatar masmoo avatar oxbits avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

programmingandroid2examples's Issues

AndroidUIDemo contains incomplete Javadoc

AndroidUIDemo contains incomplete Javadocs.

Here's an example from DotView:

/**
 * @param context
 * @param attrs
 * @param defStyle
 */
public DotView(Context context, AttributeSet attrs, int defStyle)
{
    super(context, attrs, defStyle);
    setFocusableInTouchMode(true);
}

The Dots Demo

The text at page number 185 says that the complete code for The Dots demo (Example 6-7 listing in the book) is available on the web page of the book. Where is it?

Finch framework - distinguish between empty cache and no network results

Hi. Your README instructed me to send comments to an email address that bounced, so I'm opening a ticket instead in hopes that you'll see it while working on the second edition.

I've been working on a project that uses the Finch RESTful Content Provider framework from this book. One problem we keep running into is how to distinguish between "We're showing 0 results because the cache is empty and we're waiting on a network call" and "We're showing 0 results because the server just told us there are 0 results." We'd like to show a "Loading..." message in the first case and a "No results" message in the second.

It doesn't seem that the Finch framework, as explored in Chapter 13, allows the querying activity to distinguish between the two. We've worked through some ideas, but without satisfaction so far, and the remaining ideas are far from elegant. I think it would be a useful addition to the second edition discuss a way to handle this.

FinchVideo project doen't parse video

Error when trying to search for videos

D/finch.finchvideo: could not parse video feed
org.xmlpull.v1.XmlPullParserException: Unexpected token (position:TEXT No longer availa...@1:20 in java.io.InputStreamReader@e4d093e)
at org.kxml2.io.KXmlParser.next(KXmlParser.java:432)
at org.kxml2.io.KXmlParser.next(KXmlParser.java:313)
at com.oreilly.demo.android.pa.finchvideo.provider.YouTubeHandler.parseYoutubeEntity(YouTubeHandler.java:303)
at com.oreilly.demo.android.pa.finchvideo.provider.YouTubeHandler.handleResponse(YouTubeHandler.java:72)
at com.finchframework.finch.rest.UriRequestTask.run(UriRequestTask.java:61)
at java.lang.Thread.run(Thread.java:818)

Importing the ProgrammingAndroid2Examples Projects To Eclipse . . .

  1. The Eclipse import function renames the project to whatever name the main activity has.
  2. Some projects in the folder are simply not "seen" by the import feature, e.g. ClientServerDemo, FillListTask and SharedListTask.
  3. There is a Java error in the MicroJobs project. Looks like some required library is not appended to the project.
  4. How come all these issues weren't sorted out by either the FOUR EXPERT authors or by their publisher's editor at O'Reilly before publishing the SECOND edition ?

Launching FinchLifecycle fails due to invalid fragment class

In "FinchLifecycle/res/layout/main.xml",

<fragment class="com.oreilly.demo.pa.ch10.finchlifecycle.TestFragment"

However, it should be

<fragment class="com.oreilly.demo.android.pa.finchlifecycle.TestFragment"

to consist with actual source package.

FinchVideo not working?

Here is the full stack trace.

I've tested the application using virtual machine (4.1.2)

03-06 15:39:29.091: E/AndroidRuntime(724): FATAL EXCEPTION: main
03-06 15:39:29.091: E/AndroidRuntime(724): java.lang.IllegalArgumentException: Valid range is [0 13]
03-06 15:39:29.091: E/AndroidRuntime(724): at java.text.RuleBasedBreakIterator.validateOffset(RuleBasedBreakIterator.java:54)
03-06 15:39:29.091: E/AndroidRuntime(724): at java.text.RuleBasedBreakIterator.preceding(RuleBasedBreakIterator.java:90)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.text.method.WordIterator.preceding(WordIterator.java:74)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.widget.SpellChecker$SpellParser.parse(SpellChecker.java:599)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.widget.SpellChecker$SpellParser.parse(SpellChecker.java:517)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.widget.SpellChecker.spellCheck(SpellChecker.java:262)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.widget.Editor.updateSpellCheckSpans(Editor.java:464)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.widget.Editor.onAttachedToWindow(Editor.java:212)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.widget.TextView.onAttachedToWindow(TextView.java:4455)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.View.dispatchAttachedToWindow(View.java:11755)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2424)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2424)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2424)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2424)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2424)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2424)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1201)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4214)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.Choreographer.doFrame(Choreographer.java:525)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.os.Handler.handleCallback(Handler.java:615)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.os.Handler.dispatchMessage(Handler.java:92)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.os.Looper.loop(Looper.java:137)
03-06 15:39:29.091: E/AndroidRuntime(724): at android.app.ActivityThread.main(ActivityThread.java:4745)
03-06 15:39:29.091: E/AndroidRuntime(724): at java.lang.reflect.Method.invokeNative(Native Method)
03-06 15:39:29.091: E/AndroidRuntime(724): at java.lang.reflect.Method.invoke(Method.java:511)
03-06 15:39:29.091: E/AndroidRuntime(724): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
03-06 15:39:29.091: E/AndroidRuntime(724): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
03-06 15:39:29.091: E/AndroidRuntime(724): at dalvik.system.NativeStart.main(Native Method)

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.