This repo contains example code for O'Reilly's "Programming Android" by Zigured Mednieks, Laird Dornin, Blake Meike and Masumi Nakamura

Overview
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

Comments
  • Importing the ProgrammingAndroid2Examples Projects To Eclipse . . .

    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 ?
    opened by corinthian13 6
  • Finch framework - distinguish between empty cache and no network results

    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.

    opened by goat000 2
  • The Dots Demo

    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?

    opened by sgurukrupa 1
  • AndroidUIDemo contains incomplete Javadoc

    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);
    }
    
    opened by zachlatta 1
  • Launching FinchLifecycle fails due to invalid fragment class

    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.

    opened by Makopo 1
  • FinchVideo not working?

    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)

    opened by kyoungrok0517 0
  • FinchVideo project doen't parse video

    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)

    opened by arvalon 0
This repo is to document my learning about Custom views in android

Custom-Views This repo is to document my learning about Custom views in android Note: If you are trying to understand Custom views, go in order: Custo

Kshitij Kumar 7 Feb 24, 2022
This repo demonstrates how to work on CI/CD for Mobile Apps 📱 using Github Actions 💊 + Firebase Distribution 🎉

Android-CICD This repo demonstrates how to work on CI/CD for Mobile Apps ?? using Github Actions ?? + Firebase Distribution ?? Getting Started We are

Mohamed Elsharkawy 50 Nov 29, 2022
Basic example of using ItemTouchHelper to add drag & drop and swipe-to-dismiss to RecyclerView.

Another drag and swipe library? This project is an example of basic drag & drop and swipe-to-dismiss with RecyclerView using ItemTouchHelper. It corre

Paul Burke 2.5k Dec 24, 2022
Learning RxJava for Android by example

Learning RxJava for Android by example This is a repository with real-world useful examples of using RxJava with Android. It usually will be in a cons

Kaushik Gopal 7.6k Dec 30, 2022
This is a simple example of Aspect Oriented Programming in Android

Android-AOPExample This is a simple example of Aspect Oriented Programming in Android as part of a blog post I have written. The idea was to measure h

Fernando Cejas 422 Nov 25, 2022
The example Android project of animated menu items in toolbar

Android Animated Menu Items The example Android project of animated menu items in toolbar. Thanks Srikant Shetty for idea of this animation. Cut: Copy

Ilya Fomenko 922 Nov 23, 2022
Learning RxJava for Android by example

Learning RxJava for Android by example This is a repository with real-world useful examples of using RxJava with Android. It usually will be in a cons

Kaushik Gopal 7.6k Dec 29, 2022
Example app for shortcuts

Android Shortcuts Example app for shortcuts in design library v25 Demo Manifest Add meta-data before </activity> tag in Manifest.xml <meta-data androi

Pamir Cevikogullari 334 Nov 29, 2022
An example that demonstrates how to integrate a learning app with the EIDU platform

EIDU Sample Learning App This app is an example of how to create a learning app that integrates with the EIDU platform. Please consult dev.eidu.com fo

null 0 Dec 17, 2021
Minimal example of how to safely share a file produced by a task in one project, with a task in another project.

How to share files across Gradle subprojects: A minimal example This is the Gradle project: . ├── producer │ └── build.gradle.kts ├── consumer │ └

Rob Moore 2 Dec 17, 2021
WeatherAndroidApplication - An Android Application, it will check the weather in the USA using Zip Code

WeatherAndroidApplication This is an Android Application, It will check the weat

Mohammad Jaha 2 Mar 8, 2022
Viacheslav Veselov 0 Jul 8, 2022
Android sample app following best practices: Kotlin, Compose, Coroutines and Flow, Hilt, JetPack Navigation, ViewModel, MVVM and MVI, Retrofit, Coil

Foodies - Modern Android Architecture Foodies is a sample project that presents a modern 2021 approach to Android app development. The project tries t

null 362 Jan 2, 2023
🧸 A demo Disney app using Jetpack Compose and Hilt based on modern Android tech stacks and MVVM architecture.

DisneyCompose A demo Disney app using compose and Hilt based on modern Android tech-stacks and MVVM architecture. Fetching data from the network and i

Jaewoong Eum 791 Dec 30, 2022
A sample Android application with a strong focus on a clean architecture, automated unit and UI testing and continuous integration.

Android playground This is a sample Android application with a strong focus on a clean architecture, automated unit and UI testing and continuous inte

null 6 Jun 4, 2022
OpenPacketSniffer - Monitors and handles network packets sent and received to/from a host

Packet Sniffer Monitors network activity and logs all packets that have been sent/received by the client's host. Settings In Main.kt, the PcapHandler

Neel 0 Jan 5, 2022
Do's and Don'ts for Android development, by Futurice developers

Best practices in Android development Avoid reinventing the wheel by following these guidelines. Lessons learned from Android developers in Futurice.

Futurice 20.2k Dec 31, 2022
Movie discovery app showcasing MVP, RxJava, Dagger 2 and Clean Architecture

MovieGuide ?? Refactoring in progress ??‍♀️ ⛏ ?? ??️ ?? ?? ?? Comments and new issues are welcome. ?? Currently not accepting external PRs that touch

Arun Sasidharan 2.6k Dec 25, 2022
enable users to slide card to the left or right smoothly and continuously

有图有真相 模仿探探首页的卡片滑动效果: 不得不说,探探的ui效果真的很赞。在着手这个project之前,我没有参考过github上其它类似的开源项目。所以,如果这个project重复造了轮子,请不要打我。 在这个仓库竣工之时,有一个小伙伴发了我另一个开源工程,颇有相似之处。我下载了源码,导入了st

stone 2.4k Jan 5, 2023