android

Transfer file from android(nexus1) to other server using GPRS

I want to write the application which will transfer file from android (nexus1) to some other server by using GPRS.which protocol should i use and how to implement that? ...

I want to create a search bar in android

Hi! I intrested in creating a searchbar just like the one in twitter app. I wounder how it is possible? http://android-developers.blogspot.com/2010/05/twitter-for-android-closer-look-at.html ...

Create Android JarFile object that looks for file inside .apk?

Hi, I was curious if there was an effective way to create a JarFile object (see: http://developer.android.com/reference/java/util/jar/JarFile.html ) that references a jar file imported into the running APK? I'm trying to make a self-updating JAR file that can be imported into projects, so I can release patches and updates for the libra...

[Android] Images in TextView

1) How would one go about altering/extending TextView to render inline images? It seems that setText(Html.fromHtml(...image tags...)) might actually allow image insertion if set up correctly, but I haven't tried myself. Even if, I would still need fine grained control over the image drawing (my final goal is to display inline animated s...

Displaying a non-static string on an Android app?

I'm making a calculator-type application and it will have a resulting string that is generated by user-given inputs. This is my first android app, so I am not too familiar with the SDK. In main.xml I can make the static, non-changing strings, but how can I similarly display a string that can change and has no set value? ...

How do you put two Views in a horizontal Layout so that one is aligned to the left and the other one - to the right?

Let's say you want to have a TextView and a Button in a Layout with horizontal orientation. Can you have the TextView aligned to the left and the Button - to the right? --------------------- TextView Button --------------------- ...

Is it safe to unplug the phone while USB Debugging is turned on?

I am developin with Eclipse on an Android device. Each time I want to install the new version of the app on the device I need to connect it, enable USB Debugging, install the app, disable USB Debugging, unplug the device (optional). I was wondering if it was safe to just unplug the device without disabling USB Debugging. After all, the d...

Can I get original request data (intent extras) in onActivityResult callback?

Curious, if I can invoke some 3rd party activity, and then in onActivityResult read my original intent data. ...

How to calculate distance between two GeoPoints with Android MapView

I want to know the distance of two points or the width and height distance of my current mapview in km unit. Is there any android map api to do that? ...

Setting global style for Views in Android

Let's say I want all the TextView instances in my app to have textColor="#ffffff". Is there a way to set that in one place instead of setting it for each TextView? ...

Dalvik Memory Allocation - How to change the default limits?

I am currently considering to develop an application for processing of images captured by the camera of mobile phones using the Android OS. Before I make the decision to go forth, I have done some research and found out there are some complaints regarding the limits of the memory allocated by the Dalvik VM, which seem to be limiting to a...

ListView items won't show focus when touched

I've got a ListView that works just great, except for this minor annoyance. I can use the trackball/dpad to move up and down my list, and the background changes according to which row has focus. But when I touch the row (click or long click), there's no background change letting me know what's been focused. I've tried setting 'focusab...

Android: Set selected icon in GridView

I'm trying to find a way to store the name of an icon in my database, then use that name to let a user select an icon from an ImageView. I've found various guides on ImageViews and Galleries, but none that show how to get/set the selected image by name. The list of available images won't change, but what's that best way to implement this...

Why does showing a Toast outside of onCreate() crash my application?

old question: "Why does creating a Toast crash my application?" My application runs fine if I don't use toasts but if I want to create and show a simple Toast like this: Toast SimpleToast = Toast.makeText(getApplicationContext(), "Just a toast.",Toast.LENGTH_LONG); SimpleToast.setGravity(Gravity.TOP, 0, 0); SimpleToast.show...

Is using Shared Preferences for storing user data reliable?

Will the data still be there after the user restarts his / her phone or changes SIM / battery? ...

How to change the border and separator color of spinner widget

I have customised the spinner items background into black color.But border around spinner and the separartor between each spinner item is in white color. I want to change separator color and border to dark gray color. How can i change these color? Is spinner uses list view or some other as parent to populate items in spinner? If so can...

UI design guidelines of Android - where to be found?

Dear Android community, I'd like to develop apps for Android after 2 years of developing iPhone apps. First of all, I'm not a programmer. I'm a UI designer and usability engineer with basic knowledge of app programming. I have a colleague doing the part of the programmer. So my first look into the documents on developer.android.com titl...

Identifying image area clicked in Android?

Is there a way to determine in an Android app which area of an ImageView (x,y coordinates, for instance) was clicked by a user? Thanks. ...

signature widget (painter) does it exists in android?

I want an widget that one can sign on it on the tocuh screen its ambivalent to painter so is there a way using the painter in my application?... thanx i want it too fit the 2.1 version does it exist ? ...

Auto Screen Rotation Disabling Widget RemoteView onClick event

Hi, I have a bit of a strange bug with a widget I've coded- after the screen rotates the widget stops responding to onClick events. The code is exactly the same as in the Android Developer Documentation for App Widgets here. I've noticed other widgets from the market don't have this problem- is there a known workaround perhaps? I've tri...