Android Basics – Learn how to use Adapter with ListView

In the last Post you learnt about the ListActivity class. In this Tutorial I want to introduce you to Adapters and how to use them with ListView.

Adapters are used to bind or connect View with Data Source. Now a data source can be an array, a database or a web service.

An ArrayAdapter enables us to work with Arrays. Creating one is pretty simple.

ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_expandable_list_item_1, colors);

You can follow along with me in the Video above to understand about Adapters.

Source code can be found here

Android Basics – Learn how to use a ListActivity to display and manage a List of Items


In the last Post you got familiar with using a ListView to display a list of items which came from a static String Array.

You can also accomplish the same using a ListActivity.

Why use ListActivity ?

A ListActivity class is quite useful as you don’t need to create a Layout file.

You have the option to create your own Layout file, but it’s not mandatory.

Also you don’t need to create an Event Listener. In order to use the ListActivity you will need to extend this class.

public class ScrollingActivity extends ListActivity {

protected void onCreate(Bundle savedInstanceState) {


Follow the Video in which I will guide you to create a new ListActivity to display the items.

Source Code is available here

Robin, the newest Android Smartphone, will solve the Storage Problem and will Learn from your usage patterns

Introducing Robin, the first Android phone that makes running out of space history.

That’s what the official website promises.

The phone is a mid-range, but capable Android phone from a small, independent startup led by ex-Google and HTC executives and engineers.

It goes on sale at the company’s website, starting today, 32GB unlocked for $399. This also gets you 100GB of Cloud Storage.

The website also mentions that the Smartphone Learns what you use, and it’s designed for fast OS updates.

You can explore more and buy at

Android Basics – Learn about Event Listeners. How ListView Item Click Works ?

In the last Article you learnt about ListView and how it can be used to display a List of items.

So the list of items is ready, what’s next ?

Don’t you think the user should be able to do something with that. Like view the details of an item.

To enable the App to perform some activity when an item is clicked you need to use an onItemClickListener.

Source Code is available here


Wow Kids can now have there Own Tesla “Model S” Car

Like many, I am a Huge Fan of Elon Musk. He is one of those Rare Risk Takers our Planet needs.

His ideas and concepts are a breath of fresh air and the best part is he makes them work. Be it SpaceX, Tesla or HyperLoop, which has inspired companies to make it a reality.

I am always looking forward to what’s coming next from him.

Well this time his offering is for the Kids.

The company just started accepting pre-orders for its first kiddie-car, a US $499 all-electric model designed in partnership with red-wagon maker Radio Flyer.

The basic “Tesla Model S for Kids” (couldn’t they come up with a shorter name?) has a 130-watt-hour lithium-ion battery pack, working headlights, and a sound system.

It’s available in red, silver, and blue. It has a top speed of 6 mph, but parents can choose to lower the top speed to 3 mph.

It holds a driver who weighs up to 81 lbs; there is no passenger seat, but there is a “frunk” (a front trunk) to hold emergency snacks and teddy bears.

I am sure the kids are going to love this one.

Pre-Order here

News Source

Android Basics – Learn how to display a List of Items using List View

ListView comes handy when you want to display a List of items.

Consider an App which allows you to view a list of latest Mobile Phones. Now in order to display this list you can use ListView.

The data for the list can come from some Database, an Array or a Web Service. For now we will use a String Array for this List.

Follow along to learn about ListView.

Source Code available here

Android Power – Now a Smartphone for less than 8$ or Rs 300

Noida based Ringing Bells will launch the ‘Freedom 251′ Smartphone today in Delhi.

The Smartphone is expected to cost only Rs 251. Defence Minister Manohar Parrikkar will launch the Smartphone.

The Ringing Bells Freedom 251 runs Android 5.1

The Ringing Bells Freedom 251 is a single SIM (GSM) smartphone. Connectivity options include Wi-Fi, Bluetooth, FM. Sensors on the phone include Proximity sensor.

The smartphone with a 4-inch WVGA resolution display, features a 1.3 Ghz quad-core processor, 1GB RAM, 8GB total storage space and a 3.2 megapixel camera on the back. It will have 0.3 megapixel camera on the front and has a 1450 mAh battery.

Bookings for the Freedom 251 will start from Thursday 18 February from 6.00 am in the morning and will close on 21 February at 8.00 pm. This is dual-SIM 3G capable phone.

See more at:

Android Basics – Learn how to use Images in your App

If you want to use images in your Android App you will need to put them in the drawable folder under the res directory.

Like on my System the path is   /HelloAndroid/app/src/main/res/drawable

Android also gives you the option to put images for different screen densities.

For this you can create the following folders under drawable.

  • android-ldpi : Low Density Screens around 120dpi
  • android-mdpi : Medium – 160dpi
  • android-hdpi : High Density – 240dpi
  • android-xhdpi
  • android-xxhdpi
  • android-xxxhdpi

Source Code

Google might deliver Packages using Self Driven Trucks

A new Patent awarded to Google outlines what it calls an “autonomous delivery platform” for delivery trucks.

The trucks would be fitted with a series of lockers that could potentially be unlocked with a PIN code sent to the person waiting for the delivery before the truck arrives at their location.

The patent also suggests the locker could be unlocked by a customer’s credit card, or an NFC reader. After the package is dropped off, the truck will continue on to its next delivery point, or return to the depot to pick up more packages.

Read More here