android

Saving Drawable to Disk and retrieving - Android

how would I save a drawable to the SDcard (custom folder) and later retrieve it assuming im keeping track of the path of the saved item. Thanks, Faisal ...

Move ImageView around inside RelativeLayout.

I need to move an ImageView (or anything else, for that matter) around inside a RelativeLayout. Does any one know the proper way to do this? ...

Android: EfficientAdapter with two different Views

I'm using an extended version of BaseAdapter based on the EfficientAdapter example from the SDK demo samples. My data is basically an object (ListPlaces) which holds an ArrayList with the actual list of places, accessible via listPlaces.getValues(). This ArrayList data is sorted by range and the ArrayList consist of some special items (...

different drawable resolutions

Hi, I want to deploy my application on different screen sizes using the 1.6 feature. I exported the drawable resources with different resolutions in drawable-ldpi, drawable-mdpi and drawable-hdpi folders. On android 1.6 and 2.0 everything looks good. My problem is that on 1.5 the drawable-ldpi resources are used instead of drawable or d...

Android application update - how to?

What is the best way to let my users perform an application update? Is there any way to force device reboot after the update? I'm asking this because my application registers some behavior on boot. Please note, the application would not be published in the Market. Update: My app will be preinstalled on a set of ~100 handsets. Should...

[Android] Why do ListView items not grow to wrap their content?

I have a rather complex ListView, with variable list item heights. Under certain conditions, I need to display an additional view in a list item, which is hidden by default (View.GONE). By enabling it (View.VISIBLE), the list item grows in height (or at least it's supposed to). The problem: Even though I declare the item's root layout t...

dynamically fill ListActivity

Hi, There is a thread that fills the db and I am trying to make my ListActivity to grow dynamically according to the entries in the db. By dynamically I mean to grow in real time while the db is filling. What is the best way to implement this. ...

Stack of activity from Activity stack

Hi, There is a stack of activity i want to call the activity from that stack , My question is that is it possible to check from that stack and call that intent . When i press home button and again when i press the executable it should start the activity where i have left . Is it possible ? Any example related to the same would be ...

Android sending lots of SMS messages

I have a app, which sends a lot of SMS messages to a central server. Each user will probably send ~300 txts/day. SMS messages are being used as a networking layer, because SMS is almost everywhere and mobile internet is not. The app is intended for use in a lot of 3rd world countries where mobile internet is not ubiquitous. When I hi...

More efficient map overlays in Android

In my app I am drawing bus routes on top of a MapView. The routes have anywhere between a dozen and a few hundred GPS coordinates that describe the route that the bus takes. The problem I'm having is that once I draw out all these lines panning/zooming the MapView is incredibly slow (even clicking the 'Back' button takes a minute to h...

Persisting a context menu after screen rotation

Hi. I have an activity that on it's onCreate method it does: registerForContextMenu(theView); and in onCreateContextMenu: super.onCreateContextMenu(menu, v, menuInfo); menu.add(blablabla); This works great, but the problem is that the context menu disappears when the screen rotates. How to fix this? Thanks for reading! ...

cannot sync from android repository

I'm trying to make sync according http://source.android.com/download manual, so everything is good, except syncing :) repo sync ... Fetching projects: 5% (8/143) Initializing project platform/development ... fatal: The remote end hung up unexpectedly error: Cannot fetch platform/development .. or Fetching projects: 2% (3/143) fat...

Android Stretch columns evenly in a TableLayout

I am displaying a table of values in my android application, and would like the columns to be distributed evenly in terms of size , instead of sizing according to content. Been playing around with stretchColumns but couldn't manage to figure out the right combination, Any Ideas? ...

Android: TextView automatically truncate and replace last 3 char of String

If a String is longer than the TextView's width it automatically wraps onto the next line. I can avoid this by using android:singleLine (deprecated) or by setting android:inputType="text". What I now need is something that replaces the last 3 characters of my String with "...". Since I'm not using a monospace font this will always be dif...

Flash and Android - common future?

Hello, Thus far, all the Android applications I've worked on, are multimedia-oriented. In this context, support for Flash in Android is very intriguing topic for me (and many others, I believe). Do you think that HTC Hero's Flash in the browser is strong enough indication that, at one point in the future, Android will support the Adobe...

Need help in using CheckedTextView in android

Hi, I have the following in my layout.xml file: <CheckedTextView android:id="@+id/checktext" android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight" android:textAppearance="?android:attr/textAppearanceLarge" android:gravity="center_vertical" android:checkMark="?android:a...

Are there any push notification system in place for Androids?

There are currently push notifications available for iPhones, Palm Pre and Blackberries each provided by their respective manufacturer. However I have heard nothing for Androids (probably because google does not actually sell the phones themselves. Are there any solutions out there at all? ...

Android - cutomized keyboard key and action

If you own Android phone you are no doubt have noticed how in the certain apps the keyboard layout can change from the standard issue to digits-only or to have .com or .net special buttons based on the text field input type (e.g. phone number). So I have 2 questions: how to trigger this customization? I suspect it has to do with EditT...

Setting setOnKeyListener for a ListView

Hi, I have trying to set an OnKeyListener, but I am not sure how can I get the selected row on the list view in the OnKeyListener(). The 'v' parameter always give me the ListView, not the selected row. Any idea how to solve this problem? Thank you. listView.setOnKeyListener(new OnKeyListener() { public boolean onKey(View...

android can not find a target

i am using eclipse with android plugin and sdk, but i can not create a virtual device due to there is no target, and when I execute this: $ ./android list targets Available Android targets: what should i do? and.............. when i try to install the available packages in eclipse avd manage it comes to: Downloading SDK Platf...