Home Home

Lastest Discussion

Progressively loading ListViews PDF Print E-mail
Saturday, 06 March 2010 03:38

Again I received a mail from somebody who asked for lists with forward/backward paging option. These lists are not trivial to implement but I was more intrigued by the need why anyone would want such a clumsy UI construct. Then it turned out that the guy wanted to back the list with data from a web service. Obviously, he did not want to wait until the entire list is loaded through the network but wanted to present something to the user as soon as possible.

Such a list can be found in Android Market when the list of applications is progressively loaded from the network server. The problem is worth a simple test program to analyse because it clearly shows the power of the Android adapter concept.



Click here to download the test program.

Read more...
 
Two-dimensional lists PDF Print E-mail
Saturday, 06 March 2010 03:28

I got another question whether TableLayout can be used like a two-dimensional ListView. My initial reaction was that it cannot be done because TableLayout just arranges items, all the complicated focusing/highlighting logic in ListView is completely missing from TableLayout. I realized later on, however, that TableLayout can contain Buttons and the rest will be arranged by the general focus handling logic in ViewGroup.

Click here to download the example program.

The only exciting part of this rather simple program is the way how an array of Buttons are made to look like selectable list items. The key is that the Buttons are styled. For example (XML fragments are mangled due to blog engine limitations):
 

Read more...
 
Expandable lists and check boxes PDF Print E-mail
Sunday, 14 February 2010 20:14

I got another trivial question in a comment: how to add checkboxes to an expandable list view like this one? Nothing can be simpler, you just add CheckBox control to the child view that forms the row and that's it. Except that it does not work without some tweaks.

You can download the example program from here.



 

Read more...
 
Service API changes starting with Android 2.0 PDF Print E-mail
Sunday, 14 February 2010 20:04

Service API changes starting with Android 2.0

Watching developers use the Android platform the last year has shown a number of trouble areas in the Service API as well as growing issues in the ways services operate. As a result, Android 2.0 introduced a number of changes and improvements in this area for both developers and users.

The three main changes to be aware of are:

  • Service.setForeground() is now deprecated and in 2.0 does nothing.
  • There were many edge cases in the service lifecycle that made it very easy to accidentally leave a service running; new APIs in 2.0 make this much easier to deal with.
  • Android 2.0 also introduces a new UI for end users to monitor and manage the running services on their device.
Read more...
 
RatingBar PDF Print E-mail
Sunday, 14 February 2010 20:00

A RatingBar is an extension of SeekBar and ProgressBar that shows a rating in stars. The user can touch/drag or use arrow keys to set the rating when using the default size RatingBar. The smaller RatingBar style ( ratingBarStyleSmall) and the larger indicator-only style (ratingBarStyleIndicator) do not support user interaction and should only be used as indicators.



Read more...
 
SeekBar PDF Print E-mail
Sunday, 14 February 2010 19:19

A SeekBar is an extension of ProgressBar that adds a draggable thumb. The user can touch the thumb and drag left or right to set the current progress level or use the arrow keys.



Read more...
 
Android Deleted From Linux Kernel PDF Print E-mail
Sunday, 07 February 2010 05:56

Uhohs! It appears that the Google Android Code has been deleted from the Linux Kernel. The change is explained in depth at Kroah.com but the folks at RegHardware sum it up nicely:

“No one cared about the code, so it was removed,” writes Kroah-Hartman. “As I’ve stated before, code in the staging tree needs to be worked on to be merged to the main kernel tree, or it will be deleted.”

But the larger problem, he continues, is that Android uses a new lock type, new hooks for its “sometimes bizarre” security model, and a revamped framebuffer driver infrastructure. All this, he says, prevents “a large chunk” of Android drivers and platform code from merging into the main kernel tree.

Google, he ultimately argues, has forked its mobile OS.

Read more...
 
ProgressBar PDF Print E-mail
Sunday, 07 February 2010 05:46

ProgressBar is a visual indicator of progress in some operation. Displays a bar to the user representing how far the operation has progressed; the application can change the amount of progress (modifying the length of the bar) as it moves forward.



Read more...
 
Android File Explorer with MapView function PDF Print E-mail
Thursday, 28 January 2010 05:03

Extends work from "Android File Explorer with JPG's Exif & Photo displayed", and geoDegree class of the article "Convert Exif GPS info to Degree format", In this exercise, a new class AndroidExplorerMapView (actually, it's simliar to the exercises in "AndroidMapper") will be implemented to open a MapView locate the GPS location of a photo.



Read more...
 
JARs on the classpath PDF Print E-mail
Friday, 22 January 2010 03:21

Directory tree of a typical Android project (at least those created by the "android create project" command) looks like this:



Read more...
 
« StartPrev12345678910NextEnd »

Page 1 of 29