Read the whole article @ Daily Tech

For no particular reason other than to celebrate this particular Monday, I wanted to update developers on two Android-related news items.
If you're a developer who will be in the San Francisco Bay Area at the end of May, I hope you'll join us at the 2009 Google I/O developer conference. You might have already seen the sessions we had listed for Android, but today I'm quite pleased to let you know that we've added a few more Android-related sessions. You can find the full list plus abstracts on the Google I/O site, but here are the titles:
These sessions don't even include the "fireside chat" with the Core Technical Team that we have planned. We're working on still more sessions too; keep an ear to the ground on this blog and the Google I/O site for the latest info. I'm pretty excited about how the Android sessions for Google I/O are coming together. I think it's going to be a great event, and I hope to meet many of you there.
The other topic I want to mention is that our partners at HTC have uploaded a new system image for Android Dev Phone 1 owners. This new image is mostly the same as the one we mentioned earlier this month, but adds voice dialing. Note that not all features will work correctly in all countries, such as voice dialing and Google Voice Search which currently only work well for US English. Additionally, there are some features that we aren't able to make available at all in some countries. For instance, this build can't currently include Google Latitude due to privacy standards in some regions. We'll always keep the ADP1 builds as full-featured as we can, but it's important to remember that these devices are primarily intended for development, and won't necessarily have all the features included on mainstream builds.
I hope this news is useful to you. As always, happy coding!
Sharing and reusing layouts is very easy with Android thanks to the <include /> tag, sometimes even too easy and you might end up with user interfaces that contain a large number of views, some of which are rarely used. Thankfully, Android offers a very special widget called ViewStub, which brings you all the benefits of the <include />
without polluting your user interface with rarely used views.
A ViewStub
is a dumb and lightweight view. It has no dimension, it does not draw anything and does not participate in the layout in any way. This means a ViewStub
is very cheap to inflate and very cheap to keep in a view hierarchy. A ViewStub
can be best described as a lazy include. The layout referenced by a ViewStub
is inflated and added to the user interface only when you decide so.
The following screenshot comes from the Shelves application. The main purpose of the activity shown in the screenshot is to present the user with a browsable list of books:
The same activity is also used when the user adds or imports new books. During such an operation, Shelves shows extra bits of user interface. The screenshot below shows the progress bar and cancel button that appear at the bottom of the screen during an import:
Because importing books is not a common operation, at least when compared to browsing the list of books, the import panel is originally represented by a ViewStub
:
When the user initiates the import process, the ViewStub
is inflated and replaced by the content of the layout file it references:
To use a ViewStub
all you need is to specify an android:id
attribute, to later inflate the stub, and an android:layout
attribute, to reference what layout file to include and inflate. A stub lets you use a third attribute, android:inflatedId
, which can be used to override the id of the root of the included file. Finally, the layout parameters specified on the stub will be applied to the roof of the included layout. Here is an example:
<ViewStub
android:id="@+id/stub_import"
android:inflatedId="@+id/panel_import"
android:layout="@layout/progress_overlay"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" />
When you are ready to inflate the stub, simply invoke the inflate() method. You can also simply change the visibility of the stub to VISIBLE or INVISIBLE and the stub will inflate. Note however that the inflate()
method has the benefit of returning the root View
of the inflate layout:
((ViewStub) findViewById(R.id.stub_import)).setVisibility(View.VISIBLE);
// or
View importPanel = ((ViewStub) findViewById(R.id.stub_import)).inflate();
It is very important to remember that after the stub is inflated, the stub is removed from the view hierarchy. As such, it is unnecessary to keep a long-lived reference, for instance in an class instance field, to a ViewStub
.
A ViewStub
is a great compromise between ease of programming and efficiency. Instead of inflating views manually and adding them at runtime to your view hierarchy, simply use a ViewStub
. It's cheap and easy. The only drawback of ViewStub
is that it currently does not support the <merge /> tag.
Happy coding!
Obviously, you are going to want the Google app and the Facebook app, but what else? Here's a few 'must have' web apps that cover music, movies, books and even news.
There were a number of factors that people were concerned with, such as:
Play stresses that these aren�t �unlocked� but totally new and sim free - so totally available to use on all networks and not unlocked from a certain network.
All the devices are legit, kosher and on the level. A spokesman for Play.com explained that the stock �is available due to EU legislation ensuring the sale of sim-free mobile phones� and ��comes with a full manufacturer warranty.�
Bluesense theme designed by Make Money Online | Dosh Dosh
Bloggerized by Free Blogger Template