Posts

Showing posts with the label android

Android ListView with CheckBox - The easy way

Image
After MUCH Googling for a simple way to add a checkbox to a listview, I finally found an example in the ApiDemos that come with the SDK. If your looking for this end outcome, then read on. Auto Uploader The "Enabled" with CheckBox above is actually a ListView, within a regular Activity, with just one item in the list. First, simply add the ListView to your xml layout (main.xml): < ListView         android:id = "@+id/listView1"         android:layout_width = "match_parent"         android:layout_height = "wrap_content" > </ ListView > Second, in your Activity, define a String[] of items (just one for me), and wire up the ListView into a variable. List so in my onCreate(): ListView listView1 ; String[] listItems = { "Enabled" }; listView1 = (ListView)findViewById(R.id. listView1 ); listView1 .setAdapter( new ArrayAdapter<String>( this , android.R.layout. simple_list_...

SimpleHood

Image
UPDATE: A new version of SimpleHood has been released on the market! View things in your neighborhood! SimpleHood displays features from the SimpleGeo database that are within 25 meters of your current location. Features: 1) Display nearby things on map 2) View details 3) Dial phone number 4) View in Google Maps Fixes: -Significant amount of bug fixes and performance updates. -Sorting by category -Added list view of items (menu key) -Updated details page, view in Google Maps and call button The first version of SimpleHood is available on the Android Market ! I'm not exactly sure what I want to do yet with this, so please give me some feedback! Main Screen

WhoCalled

Image
WhoCalled is the easiest way to instantly search on whocalled.us!   This app only responds when the incoming phone number is NOT in your phonebook. After declining the unknown number, a notification will appear in your notification bar. Simply click the notification and it will search whocalled.us, showing the most popular answer! Permission explanations: READ_PHONE_STATE: to know when call is over. INTERNET: to lookup who the caller is. READ_CONTACTS: to filter out known contacts.

Starting an Activity from ItemizedOverlay

I while back I wanted to be able to start an Activity from a class that extended ItemizedOverlay. Since ItemizedOverlay does not extend Activity I couldn't call startActivity() in order to start a new Activity when the onTap() method is executed. So after much searching on the internet I found my answer. Only thing is I don't have enough "reputation" on stackoverflow to vote up this particular answer. Simply calling Context.startActivity(Bundle myBundle); did the job! I was following the example here:  Hello MapView Original post:  StackOverflow post