Thursday, February 7, 2013

DevBytes: Any Requests?

"What is it you wanna hear?"
- Lynyrd Skynyrd

In case you don't follow me on Google+, or you missed my recent G+ post about DevBytes requests, I'll reproduce it here. Comments are welcome either on the original G+ post or here; I'll see them in both places. Writing your suggestion on a nearby tree, probably not as helpful. Scribbling it on a piece of paper and putting it in a bottle that you toss in the ocean, not so much. Shouting it out to the wind to carry it to my ears, not really. Just stick to comments on these posts. Boring, but slightly more effective...

Hey #android developers:

Laundry list time. Now that I've started doing these DevBytes videos (something I've been planning on for a while now), it would be great to hear from you about tutorial topics that you would find helpful. I have a few more episodes in the can that will roll out over the next few weeks, but eventually I'll write some more apps and record shows around them, so I'm up for ideas on what you'd like to see.

Terribly important caveats:
- In general, I code/write/present around the topics of graphics and animation. These are the technology areas, and Android areas, that I'm most familiar with, and where I could be most helpful, because I might have some understanding of the issues to begin with. Having me do a tutorial on, say, location providers, or fragments, or activity lifecycle would take me more time to create something useful and probably would not result in something as useful to you.
- The whole idea of DevBytes (and most of the demos I ever write for presentations) is to be small and focused. If I have to explain, and you have to understand, unrelated bits about the application's architecture in order to understand the point I'm trying to make, I've lost. So rather than giving a tutorial on, say, the optimal architecture design for event processing in a photo viewing application, I'd rather write an app that shows how to display the photos quickly, or load them optimally, or filter them cool-ly. I've sat through presentations with huge impressive applications before, and walked away knowing nothing more than when I got there; I'd rather focus on the little things and build them up one by opne. Maybe it's just me, but that's the way I prefer to do these things.
- I'm not going to get to everything on this, or any, list. So I'm not necessarily going to get to your pet item (sorry!). The items I get to will be because of a combination of how I could contribute something useful, how I could incorporate it into an app and a show, how broadly applicable I thought the problem/solution was, what time of year it is, how warm it is, and whether I completely forgot that you requested it.
- Don't bet on this happening Immediately. It takes me a while to get to these apps, a while to set up a time to shoot the shows, a while to do the minimal post-processing that they take (mostly slapping a banner on each show and supplying a professional actor's voice, of course), and a while for them to roll out into the stream. So these are not short-term "how do you do this, I need it for my homework assignment next week?", but rather medium-term "I'd love to understand this eventually in case I have homework related to this next term" topics.

Enough constraints for you?

So, on with the ideas. Post something you'd like to see an explanation of below. If you like someone else's suggestion, +1 it to give me a [very] rough metric of its popularity (which I will use as a random filter in figuring out what to do in the future).

p.s. Don't worry if you don't have suggestions; I can always come up with some of my own, certainly enough to keep making these shows. I'm more wondering whether there are things that application developers would like to know about that I wouldn't have thought of all on my lonesome.


Filipe Abrantes said...

The whole Camera.rotateX/Y/Z seems to have stopped working with the introduction of hw accel in Android. Maybe I'm doing something wrong, or maybe not, but in any case it would be interesting to have some working examples of how we can achieve 3D transformations in non-GL canvases.

Also, it would be interesting to know a bit more of how the hw accel system interacts with the whole View/Layout drawing stack (e.g. what are the consequences of calling invalidate(), requestLayout(), changing a view size etc). Maybe this is too broad and maybe some views are treated differently than others (how are custom View subclasses handled and what about ListViews and their scrolling cache), but it would be nice to have some more info on a otherwise poorly documented area of android.

Thanks a lot.

John C. Bland II said...

I'd like to see more info on building the most performant list with images/text.

Chet Haase said...

@Filipe: The second suggestion is definitely too braod for one of these 5-8 minute segments. But fortunately, such an explanation of hw acceleration and the view hierarchy already exists. Romain Guy and I gave a talk on this at Google I/O in 2011: Accelerated Android Renderiong.

Dmytro Danylyk said...
This comment has been removed by the author.
Dmytro Danylyk said...


I am sure one of the most helpful topic would be "Image Loader for ListView/GridView"

This is huge topic, so I am not sure if you can cover it. Many people are still seeking for good network image loader to resolve such problems as:
- when user fast scroll to bottom, skip part of images which are not visible
- when user fast scroll to bottom, ImageView's are displaying previously loaded images (ViewHolder pattern)
- create own Executor or use AsynchTask (throws Exception when queue reach 128, different behavior on 2.3 and 3.0 Android Versions
- caching images (sdcard/memory)

Thank you for your all tutorials.

Cliff Ophalvens said...

I'm interested in the best practices for animating adapterview child views, like the listview (or horizontal listview) in the google + app.

Where to start, stop, reset child animations?

Maybe it's cool to imitate the animation used in the Google+ app?

Pepijn said...

Hi Chet, I would love to see how to do proper animation inside a custom view.
Let's say I have a circular progressbar and I want to animate between progress values. Would the best way be an inner animation or a thread like solution? Also taking into account a min-sdk lower than 10.

Unknown said...

I would love to see How to do the animations using Matrix , transformation. 3D animation using graphics.Camera object.

How to do a circular animation in z axis?

Omkar Sheral said...

Could you please do a tutorial on Widgets Animation? It would be really helpful for lot of people as very little documentation is available.