android

Best way to handle multiple getView calls from inside an Adapter

I have a ListView with custom ArrayAdapter. Each of the row in this ListView has an icon and some text. These icons are downloaded in background,cached and then using a callback, substituted in their respective ImageViews. The logic to get a thumbnail from cache or download is triggered every time getView() runs. Now, according to Romai...

Hook in your own item to the "share-list"

When you take a picture or looks at one in the album, there is a "share-button" visible. Is it possible to hook-in your own item to that list, so I can share the picture via my own app? If so, how do I do that? ...

How can I get jQuery UI’s Draggable and Sortable functions to work on the Android browser?

I have a question that is pretty similar to this one. Is it possible to make the jQuery UI draggable and sortable interaction work on in the Android browser? ...

In registration form adding date dialogbox how can apply validation in system date in dialog ends with system date in android

hi i am implementing registration form adding date field then click icon to display date dialog window then limit date validation in system date below date only how can implement the validation protected Dialog onCreateDialog(int id) { Calendar c = Calendar.getInstance(); int cyear = c.get(Calendar.YEAR); int cmonth = c.get(Cal...

Issue with WifiManager.calculateSignalLevel(RSSI, 5)

I am trying to use the Wifimanager to calculate the Signal Level of the access points found during a scan. I am using the following method: WifiManager.calculateSignalLevel(int, int) But it appears to always return the same int no matter what the RSSI level is. Here is my code: public int calculateQoS(int aRSSI){ signalLevel ...

Android Dashboard Pattern

In Tim Bray's latest Android blog post he mentions the "dashboard" ui pattern (what is used for the Twitter app, Facebook app, etc. Is this layout as simple as a GridView with Buttons or is it something else? ...

Render crisp text using Canvas.drawText in Android

Hi, I'm doing an AppWidget and in its settings I'm letting the user enable/disable text shadow. Since I can't invoke the shadow method through the RemoteViews class, I'm doing a "draw" method that dynamically paints the widget and its container. When drawing the text though, it gets kinda blurred and not that crisp like when using a Te...

Convert InputStream to String with encoding given in stream data

Hi, My input is a InputStream which contains an XML document. Encoding used in XML is unknown and it is defined in the first line of XML document. From this InputStream, I want to have all document in a String. To do this, I use a BufferedInputStream to mark the beginning of the file and start reading first line. I read this first line...

Update frequency of gpx fixes

In my android program I need to obtain the fastest update frequency of gps fixex. After several experimentations it seems to me that my program is not able to receive more than one fix per second. This seems to be true either if I use requestLocationUpdates() or poll with getLastKnownLocation(). Is the 'one fix per second' a constraint o...

remine focus on the main activity (while switching activities)

Hi, Ive got two activities in the same application. the first one is with gui(main activity) the second one is a listener which works infinite without gui. Wierd problem occurs: i am running the second activity with a diffrent thread so i could keep on manipulate the gui.. but for some reason, the gui losing it's focus for some rea...

is it possible to create listview inside dialog?

dear friends, i have created a custom dialog class public class NewPost extends Dialog { // functionality } now my requirement is to create listview inside it. i know we can create textboxes,buttons,dropdown list inside it. but in order to create list view we should inherit our class from listActivity class what you suggest is it ...

Initialize preferences from XML in the main Activity

My problem is that when I start application and user didn't open my PreferenceActivity so when I retrieve them don't get any default values defined in my preference.xml file. preference.xml file: <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:key="applicat...

My Spinner Widgets look different on different devices. How can I define a own Spinner that looks the same on all handsets?

I use this code to generate a spinner in my app: subCatAdapter = new ArrayAdapter<Subcategory>(this, android.R.layout.simple_spinner_item, subCategories); subCatAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); On my device (Motorola Milestone) and in the emulator this looks like the standard gra...

problem about gridview and baseadapter? Pls help

I need a gridview to place 9 items. And i write a custom baseadapter. But find a problem about the position in the getView method.it looks like this gridview miss the 7th item.The code like this:` public class ImageAdapter extends BaseAdapter { private Hashtable<String, LayoutDTO> menuHashtable = Global.menuHashtable; private LayoutI...

How to display available branches in Android source tree?

Following directions on Android's main website to pull down sources, I'm looking at this command to initialize repo for the cupcake branch: repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake How can I view all available branches besides cupcake, i.e eclair, donut, etc...? ...

Setting TextView properties in a ListView - Strange Result

I have an activity with a ListView which is populated through a custom ArrayAdapter. There is an array of objects which have a Boolean property called 'isRead'. Based on the value of this property, I want to set the typeface of one of the TextViews in the row to either 'normal' or 'bold'. I also set the color of the text to either 'gr...

How to add layers on View?

I'm going to develope a Android program, with a photo display on screen. And there are some text and drawing (circle/Rect) over the photo. The text and drawing will change when use touch on the screen. How can I implement? SurfaceView? ItemizedOverlay? or anything else? Pls. advise. Thx all:) ...

Get application uninstall event in android

Hi i have one application which play with content provider(contacts etc) now when i uninstall my application i want to arranger the original data of content provider. Is there any way, if my application is going uninstall at that time i get event and do my work. Thanks ...

Filtering with SimpleCursorTreeAdapter

I'm trying to implement filtering using ExpandableListView and SimpleCursorTreeAdapter (its subclass). How can I specify which data (maybe cursor field or TextView text) to use for filtering? Thanks ...

How to make a smaller RatingBar?

I've added a RatingBar in a layout : <RatingBar android:id="@+id/ratingbar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:numStars="5" android:stepSize="1.0" ></RatingBar> But the default style for the rating bar is too large. I've trie t...