android

Android: use a datepicker and timepicker from within a Dialog

Hello, I am facing a problem I do not know how to solve... I have an activity, when I click on a particuliar item of the menu linked to this activity, a dialog is displayed and used to add an item. This item has a date and a time, but I do not manage to have a DatePicker and TimePicker within this dialog. I also try passing the activity ...

Android Single Select without Checkbox

I'd like to make a listview that used the ListView.CHOICE_MODE_SINGLE so that the user could only select one thing at a time. However, I want the background to change to the focused color when selected, rather than a checkbox checking off. A good example of what I'm trying to do would be basically any file browser, where the background c...

Google Map Dialog/Info Window Not Appearing on Touch

I am trying to add infowindows to markers/pushpins on the map. ATM, it is not working. Current code: TravelBuddy.java/TabHost package com.jappapps.android.travelbuddy; import java.util.List; import android.app.TabActivity; import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; import ...

Loading a Maps API site in a Native Android Application

I'm trying to follow the example from google: http://code.google.com/apis/maps/articles/android_v3.html Using the example files from their SVN repo: (http)gmaps-samples.googlecode.com/svn/trunk/articles-android-webmap/ But although it seems to compile and export it fails; can someone sanity check that its not just me this fa...

Android: Could not find method XXX, referenced from method YYY

I have two android projects, ProjA requires ProjB (in Eclipse Properties > Java Build Path > Projects > Add > ProjB). Every thing compiles ok in Eclipse, but when I run ProjA I get an error: Could not find method XXX, referenced from method YYY. Where XXX - is the method from ProjB. How can I fix the settings? ...

Android - Open resource from @drawable String

I have: String uri = "@drawable/myresource.png"; How can I load that in ImageView? this.setImageDrawable? ...

Android: TabHost with ListView of CheckBox's

I have a TabHost that contains 5 TabHost.TabSpec. Each TabSpec is a ListView that is populated using SimpleCursorAdapter, with the datasource being an sqlite3 database. The layout used by SimpleCursorAdapter contains 2 TextViews which hold database data (one hidden - which contains the database record _id, and one displayed). The 3rd ...

How can i make use of views defined in layout XML file as template to create views programmatic way

I want to populate a table, defined in layout xml file through the programmatic way. I have define Table with a single row defining its header, with all the attributes set. Now i want to know a way so that i can just replicate that header row in the table with new content. I tried using inflator inflate(int,view) method, but at runtime ...

How to clone a View object so that it can be added to current view hierachy

I like to know how can i clone a view object which is already there in the view hierarchy, so that it can be added to the same view hierarchy again. ...

Why can't Subclipse coexist with Android Developer Tools (ADT) plug-in?

On a fresh install of Eclipse: Eclipse - 3.52 Galileo-SR2-win32 Java Version - JRE 6 (update 18) Host OS - Windows 7 (32-bit) ...if I install both of the following plug-ins (in any order), they both stop working. Android Developer Tools plug-in - ADT 0.9.5 (recommended for Eclipse 3.5x) Subclipse plug-in - 1.6.x (recommended for Ec...

Why this Android view doesn't fill the screen vertically?

Having this XML view: <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/myScrollLayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android"&gt; <ScrollView android:id="@+id/widg...

SQL syntax to combine several tables

I need to display a single list, ordered by date which contains different types of data, images, video and whatnot. I guess you could have one separate table for each type and the use something like FULL OUTER JOIN (simulated as sqlite doesn't support it) and sort on date. But this would be complicated because I still need to have uniqu...

Use DDMS to push the sqlite database file faild.

i did not find my package name folder in the data/data. There just are many folder named com And then i try to push my sqlite database to data/data/com, But faild. Why? Pls help me . Can give me a smaple? How to use already exist sqlite database. I have learned from a blog : http://www.reigndesign.com/blog/using-your-own-sqlite-da...

ItemizedOverlay in OSM isn't working

hi, I have checked out the source code for osmdroid from code.google.com, everything is working great except Tapping the overlays, I don't what is wrong with it, as I have seen some screen shots of it being tapped. ...

Android TableLayout question: get a fixed-width right column?

(Edited: I'm one step further than before) I've been trying to get a simple 2-column TableLayout going where I have a LinearLayout in my left column that I dynamically add elements to which fills up the horizontal space except for the fixed 100px right column. Here's what I have so far which works for me IF the LinearLayout contains mo...

Information from listview row for Android context menu

Hi, I have created an application for Android that has an activity that has a ListView which lists all current users (each row is just an image of their profile along with some text with their current status and username). I have added a contextmenu, so that a long-click brings up several options such as "view profile", "send message",...

Java: constructing a file from a URI?

I need to obtain a File object from a URI, working in Java, but keep getting a length of zero - though I know the file size is not zero. I need the File object to pass to another constructor. I'm not sure if it's because I'm constructing it in the wrong way? Here's my code: File videoFile = new File(videoURI.getPath()); if (v...

How to color code individual rows in ListView as is done in MESSAGING app?

How can I color code individual rows in a ListView exactly like it is done in the native MESSAGING app? I do NOT want to simply do alternating rows, but I want to copy the format used in the MESSAGING app, where message rows have a different background color based on the username of the message. FYI: I am currently extending SimpleAdapt...

By clicking on my app's launcher icon, bring my app to foreground and not launch new Activity

My app has 2 activities - A and B. From homescreen I launch A, from A I launch B. The activity stack looks like this: A-B. Now I press HOME button, and from homescreen click again on my app icon, which launches A and adds it on top of the activity stack, which now looks like this: A-B-A. But I just want to bring my application to foregro...

Sqlite on Android: How to create a sqlite dist db function - to be used in the app for distance calculation using lat, long

We are building an Android App that will use user's current location (lat, long) and show top 50 venues around the current location, sorted by distance. We have these venues stored in an SQLite DB. We plan to ship with the sqlite DB with the app. In order to fetch only the relevant top 50 closest venues, we want to define a db function...