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
This repo contains example code for O'Reilly's "Programming Android" by Zigured Mednieks, Laird Dornin, Blake Meike and Masumi Nakamura
Overview
Comments
-
Importing the ProgrammingAndroid2Examples Projects To Eclipse . . .
- The Eclipse import function renames the project to whatever name the main activity has.
- Some projects in the folder are simply not "seen" by the import feature, e.g. ClientServerDemo, FillListTask and SharedListTask.
- There is a Java error in the MicroJobs project. Looks like some required library is not appended to the project.
- 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 ?
-
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.
-
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?
-
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); }
-
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)
-
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)
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
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
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
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
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
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
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
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
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
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 │ └
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
🎥 Android App using Kotlin, MVVM, ViewModel and LiveData, RxJava, Retrofit, REST API, OkHttp, Gson, Glide, Paging library and Material Design. In the app you can see a list of popular movies and additional info about every movie.
Movies ?? Android App using Kotlin, MVVM, ViewModel and LiveData, RxJava, Retrofit, REST API (https://www.themoviedb.org), OkHttp, Gson, Glide, Paging
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
🧸 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
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
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
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.
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
enable users to slide card to the left or right smoothly and continuously
有图有真相 模仿探探首页的卡片滑动效果: 不得不说,探探的ui效果真的很赞。在着手这个project之前,我没有参考过github上其它类似的开源项目。所以,如果这个project重复造了轮子,请不要打我。 在这个仓库竣工之时,有一个小伙伴发了我另一个开源工程,颇有相似之处。我下载了源码,导入了st