GrabGirl ver 1 - Have fun with ListView, Intent and Google Maps



In this post, we are going to build a small app to play around with ListView, Intent and Google Maps.
Let 's call it "GrabGirl", which means "Uber for Love". Discover hot chicks around, look up their info, including age, phone, and interest. After that, you will send them a lovely message to plan a perfect date. Finally, check out where they are, prepare your handsomeness and of course some bucks or bitcoins :)

1) Create a ListView
ListView is a view group that displays a list of scrollable items. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array or database query and converts each item result into a view that's placed into the list.

Add ListView to activity_main.xml
If you want to customize your list to be different than the default appearance::
– Write a short layout XML file describing the layout for each row. 
– Write a subclass of ArrayAdapter that overrides the getView method to describe what view must be returned for each row

So yeah, let 's try that

2) Create a new layout that represents a row in your ListView

myListLayout.xml - a customized layout for a row
3) Create the Contact class

Contact.java class in OOP structure

4) Using the ContactAdapter to push data from ArrayList into ListView


Create Contact Array and setAdapter() in MainActivity


Override getView() in ContactAdapter class

5) Handle OnClick events through ContactAdapter with Intent


An example to make a phone call 

6) OOP structure in Contact.java class


Security First

7) Create Google Maps Activity

To use Google Maps in Android, you gonna need an API key from Google. So please follow this one from Google carefully: Maps SDK for Android



8) Using Google Maps with Markers and Camera animation

Add marker and animate the camera to your contact location


The project on my GitHub
Steps in this post contribute to the first version of my app. We will talk about Direction, Navigation and AR in the next post. I 'll see you there :)

Kocarus/GrabGirl

GrabGirl - Uber for Love

No comments

Hey, buddy. What's on your mind :)

Powered by Blogger.