android

A textedit with button?

Hi I want to create a EditText and button that looks like this: This is almost the same as the quicksearch , but it is custom made, Can someone help me out? ...

Get list view's scroll position.

How would I go about retrieving a list view's scroll position? I am trying to get it to "round" or "snap" to items on the list so there isn't one half displayed at the top. I can make it move with setSelectionFromTop, but I can't find anyway to get the ListView's position. Also is there a way to use SetSelectionFromTop like smoothScroll...

Scroll to last line of TableLayout within a ScrollView

I want to have a dynamic table, with rows added over time as a result of user interaction, using a TableLayout inside a ScrollView. This works fine, but when I want to scroll to the end of the table using fullScroll(), it always leaves out the last line; that is, it scrolls so that the one before the last one is visible. The last line is...

Why is it discouraged to use Resources.getIdentifier()

In the Android SDK, there is a comment that says it's more efficient to retrieve resources by identifier instead of by name. Is this the only reason it's discouraged to use getIdentifier()? I need to programmatically access one of several hundred resources and so far my design makes it easier to access raw resources by name instead of ...

QSB Program-wide Search

I'm working on a dictionary application very similar to the Searchable Dictionary example. It's pretty simple, having 3 activities that show letters, words, and definitions (actLetterList, actWordList, and actShowDef). I have a ContentProvider set up, and the search is handled through the actWordList activity. When I am viewing that a...

Problem using SAXParser to get a list of strings to an arraylist

I'm trying to parse a web service response using SAXParser and get certain values, store them into an arraylist, then display them in a listview. Example XML being returned from web service: <ArrayOfStrings> <string>value</string> <string>value</string> <string>value</string> </ArrayOfStrings> Here is my SAXHandler class: public clas...

android Shape within a shape

I want to have a elmenent with a 2 color border outline. I can do a single color outline using the element, but this only allows me to draw a single line. I tried using 2 elements within my but that didnt work either. Is there a way to either draw a shape within a shape or draw 2 lines around my shape (which has rounded corners b...

Loading Multiple Audio files from SD card...

I need help/pointer to doc/sample code on how to load multiple audio files from a specific folder on the SD card and have it play a random file back(i think i can figure out the last step if i could just figure out how to load multiple files). Here is my incredibly poorly written app so far, don't judge too harshly as I'm learning as I ...

How do I set the defaults (Language & Keyboard) for an Android AVD (SDK 2.1 & 2.2)

I recently upgraded to Android SDK 2.1 and 2.2 but the AVD always displays with Chinese and Japanese characters active. I can go to Settings to uncheck these options but it's becoming a pain. How can I set the Language & Keyboard defaults to avoid this hassle? Thanks ... ...

Android - How to display an ImageView as a header in a listactivity ?

I'm trying to display an image before the list in a listactivity. If I put an ImageView before the ListView, then only the list is displayed... still quite an android n00b so any pointers appreciated :) Heres my main.xml which lays out the list activity: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schem...

android image in listview that thinks "outside" the box

I want to have an ImageView that is part of a listview row item, but that appears to both in and out of the row. is this possible? if so, how? many thanks in advance... ...

ListView on android - When I textfilter, regardless of the result, it always performs the action of position 0

Hello, I am having issues with my ListView text filter. Here's the problem: ** Upon using the keyboard to search for an item in the list, when that item is clicked, it always takes them to the actions I have specified for position 0 as my list is separated based on positions. Each position launches a different activity. Is it poss...

Using Android to Post XML files

EDIT : I am trying to send an xml file as a post request in Android. The server accepts text/xml. I tried creating a MultipartEntity, which has a content type of multipart/form-data. HttpClient httpClient = new DefaultHttpClient(); /* New Post Request */ HttpPost postRequest = new HttpPost(url); byte[] data = IOUtils.t...

Platform for develop on multi OS-Phone

I want develop on Android and iPhone... How Platform can i use? ...

Creating initial SQLiteDatabase when app is installed

I am writing an app that displays fun-facts (and the source they are from). The user can browse through the facts one by one. Here is the design I thought of : Create a table in SQLiteDatabase with a text column that stores the fun-fact and a second column that stores it's source. (not sure if this is the best way to go about doing it...

Browser Display Problem on Motorola Droid Phone

I have the mobile page displayed fine in iPhone with the meta element set. It also work fine in HTC G1 and G2 phone without the above meta tag. However, it is totally screwed up when displayed on the HTC Droid phone such as Motorola Droid. Does anyone know that what parameters I should set to display it properly? I have the backgro...

Android "layout editor" and "custom property"

I am building a custom view and trying to figure out how to integrate it with the gui layout editor in eclipse. I have added the code below to my constuctor. public baseGrid(Context context, AttributeSet attrs) { super(context, attrs); if (attrs.getAttributeValue(null, "bufferTop") != null) bufferTop = Integer.parseInt(attrs.g...

Find nearest transit station / stopover (bus, train etc) in google maps

Hey guys, I searched the web but for now I didn't found anything. Is it possible to find the nearest bus/train/ official stations of public transportation types? The 'nearest' is a seperate case ;=) but is it just possible to find them? this is that i'm searchin :) http://img443.imageshack.us/img443/7203/bild2zy.png They are tagged,...

How to open pdp context in java layer

Dear all, I'd like know how to open pdp context in java layer. Could anybody help me how can do it. best regards. mark ...

How to Draw a shape or bitmap into another Bitmap , Java/android

I want to draw a shape(many circles particularly) into a Specific Bitmap. I have never used canvas / 2D graphs etc. Anyone that can point me to the right direction to do what i want.? # As i see it i create a Drawable put the bitmap in it then "canvas-it" to the shapes i want etc but i really need some guideline ...