android

AndroidTestCase - Asynch calls

Hello, I have a question, I am relatively new to Android and threads etc...anyways, hoping there is help for me. I am writing unit tests (AndroidTestCase). The application under test uses some background services to communicate over the web the get information. To recieve notification of events I am interested in, (like when content...

Need help on AutoCompleteTextView for Searching

Friend's I implemented AutoCompleteTextView for searching whether it supports in all SDK Version and target,because i tried the sample from http://developer.android.com/resources/tutorials/views/hello-autocomplete.html it nothing shows in dropdownlist, when i used im application for parsed content kept in an string array,i'm getting ...

Get last inserted value from sqlite database Android

I am trying to get the last inserted rowid from a sqlite database in Android. I have read a lot of posts about it, but can't get one to work. This is my method: public Cursor getLastId() { return mDb.query(DATABASE_TABLE, new String[] {KEY_WID}, KEY_WID + "=" + MAX(_id), null, null, null, null, null);} I have tried with MAX, b...

Android 2.2 SDK - Reset Layout Inflates setOnTabChangedListener?

Is there a way to reset any layout inflates done inside the setContent xml file upon selection of a tab? Or to set a new content view completely without setting a new activity? ...

KitchenSink tools/apkbuilder error when trying to run for Android

When I run KitchenSink example project on iPhone emulator everything is OK, but trying to launch for Android emulator produces errors: [ERROR] /Users/lukasz/Android/android-sdk-mac_x86/tools/apkbuilder [ERROR] Failed installing com.appcelerator.kitchensink: pkg: /data/local/tmp/app.apk It happens whatever Androig API I choose (from 1....

Best way to display a large amount of text?

Hi, I currently have a list and would like to display a large amount of text once a list item has been clicked. The amount of text will vary depending on the list item that's been clicked, ranging anything from a paragraph to a number of paragraphs. I'm still very much an Android noob, so any tutorials that you know of that relate to y...

Json to pojo unmarshaler with polymorph classes for android

Hello, I am having a problem with rest and android, the problem is I have a transport object in example a class Human, which is extended by Male and Female, I want to use json as transport for the human object. if I use standard serialized objects, i would usually do if(human instanceof Male.class){} else if(human instance of Female...

Showcasing Android app on a website

I have an app in Android Market which is a standalone app that's essentially a full conduit to an SQLite Database(add, change, delete, inquiry). Some of my potential clients have asked to see a sample of my work, but they don't have an Android device. Other than just showing them screenshots etc., is there a way I could have them go to ...

Text Filter: strange behavior with SimpleCursorAdapter

Hello all I have a problem with a filter on my listview. In fact that work pretty well with an IndexAdapter, but not with a SimpleCursorAdapter. In the following example, if isCursor==false, the filter work pretty well but if it is == true, the filter does not work! By the way, the adapter work pretty well. if(isCursor){ mCursorA...

Android Bluetooth : read service records

Hello All, I am working on developing a HID Bluetooth Driver, that would allow an user to connect a bluetooth keyboard or mouse. So far I was able to achieve this using JNI, and a C BlueZ interface, but there were compatibility problems: the software only worked on a few devices. As Bluetooth support was introduced from Android 2.0, I ...

Calling setContentView() multiple times

Is there a way to call setContentView(id) multiple times with different id during one Activity to render different views or do I absolutely have to start a new Activity? ...

Android Overridden onScroll still scrolls a little

I've got my own version of the SimpleOnGestureListener. Within it is the onScroll function. I have it set to do absolutely nothing because at this point I don't want it to scroll at all. I've got plans for it later, but for now I want to override the scrolling with nothing. This is all that's in the function: public boolean onScroll(Mot...

How to automatically display an overlay when the button is pressed.

I know there is the selector method for the pressed and normal state xml method. However, for that method, you always need 2 image resources. So for every button, you need an alternate one for the pressed state. If you have 25 buttons, you will need 50 buttons. Is there any way to do this dynamically? ...

Need help with screen design

Hi, I need to create a new screen and I don’t know from where and how to start. These are the requirements': The screen will be separate in the middle while each side will hold few components (TextView) and will have different color. (two layouts or custom view ??) The borders of the new screen should be rounded and padding. Unfortu...

Android XML: Centering Horizontally On Bottom

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:text="Title" android:id="@+id/TextView01" android:layout_width="wra...

Item in listview to be displayed in single line each

Hi there, I have created a simple listview and added a few items in it. I am trying to add really long text in each item. I want this text to be displayed in single line only. the text that does not fit should fade in the corners. I have seen this kind of list in samsung galaxy s but somehow I am not able to achieve this. Can anyone hel...

Downloading and decompress a zip-file in the background?

I need to download a zip file and unpack it, in the background (in an AsyncTask I'd imagine). As it is now, I've got a DefaultHTTPClient set up, and a ZipInputStream ready to go, but here's where I am stuck - I have no idea how to use these two together. Here's the relevant code in the AsyncTask: DefaultHttpClient http = new DefaultHtt...

Android ScrollView isFinished?

Just looking for an easy answer that I can't find on Google. Simply put. Is there a way to tell when ScrollView has stopped scrolling after a fling? ...

Android: list.getCheckedItemPositions() always returns null

Hello, I've created a custom ListView by extending SimpleCursorAdapter. The result is IMAGE + CheckedTextView (Text + Checkbox). After I had issues with the wrong checkboxes getting checked (see here) I had to remove lv.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); from onCreate. Now I click on a ListItem line and it checks the right ...

Need help building a Calendar UI for Android 2.2. Any suggestions on how to start?

Hi, I am building a Calendar Application for Android OS. I have previously made some Android applications with built-in android widgets such as buttons and spinners etc. Now I want to create an Android Application that displays 4 'tabbed' views of a Calendar (month, week, day & list). I have already built the backend stuff for the appli...