android

Android app crash when progress dialog is on progress and app's orientation changed. why?

I have an application in which a progress dialog is shown. The progress dialog is working properly on any one orientation. But when I change the orientation during the progress dialog is on progress mode, then the app crashes. So, now how can i fix this problem? ...

How to push view upwards when displaying keyboard?

Hi, Is it possible to push the entire view upwards when the keyboard is activated? Like, a TextField is located at the bottom of the view. When user taps on TextField, a keyboard will cover the TextField. So Im asking, is there a code that will push the view upwards so that the keyboard will display underneath the TextField. I have co...

Scale Map Markers by Zoom, Android

Hi, I have lot of markers on my map. Zooming in each marker shows me a position. but zooming out the markers are overlapping each other and it is more difficult do determine the position of a marker. Is there a way to scale the marker image depending on the zoom factor? ...

Android Animation one after other

I have two TranslateAnimation on a TextView and i want them to execute one after other.. but using the below code, only the second one executes.. how can i solve this TranslateAnimation animation = new TranslateAnimation( Animation.ABSOLUTE, 0.0f, Animation.ABSOLUTE, 0.0f, Animation.ABSOLUTE, 0.0f, Animation.ABSOLUTE, -150.0f); ...

Make ScaleAnimation move evenly, or figure out how it moves

So I used a ScaleAnimation to make a timebar shrink in a game. When the current level was finished, I wanted the timebar to quickly shrink to the bottom. So what I did was that if 30% of the time had passed, I assumed that 30% of the timebar was gone. So I just started a new ScaleAnimation that started at 70% of the timebars original siz...

display image from byteArray.

hello guys, before asking question let me tell you about my class hierarchy. i have a Main class with has onCreate() method. in that method i have made the MapFile class' object.and called its readFile() and readIndex() methods. in readIndex() method i call another class named MapTile where i read the images tiles from my binary file a...

Problem with Landscape

Use a folder layout-land and layout-port them is a copy main.xml. public void onSensorChanged(SensorEvent e) { if (event.sensor.getType()==Sensor.TYPE_ACCELEROMETER) { if(event.values[0] >= 8) setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); else setRequestedOrientatio...

can we use truncate query in android sqlite

can we use truncate query in android database? otherwise can we performing truncate operation using our java code? ...

Why do I get the proper URL response from a browser, but empty within Android's "HttpGet"?

I am writing an android application which uses a REST-based API on the server. So far the login works perfectly using HttpGet = I send the credentials, it sends me back a JSON response object containing session id or failure. I then moved onto using another get api (this one is passed the sessionid) and the response I get back looks like...

How to determine a vector using 2 Points in Android map?

Hi there everyone. I'm trying to do some advanced features with android maps and to do that I need to do some operations on vectors. Now - I read the answer from this and it gave me some hints and tips. However, there is a part which I don't understand. Please allow me to quote this: Now that we have the ray with its start and end co...

Dynamically load customized table cells in table

Hi all, I want to create say 5 different types of cells in table along with identifiers and load them appropriately as per the given data depending upon the type? Creating TableRow inside TableLayout seems to be one of the options but how to dynamically create the tableRows depending upon the type? Thanx in advance. ...

Problem in backgroung of list when scrolled.

I have list view to display data,it dispalys well with white color background initially,but when i scrolled the background of list view has been changed to black,when i stop scrolling it get white background,i need to have white color background when i scrolled,how can i fix it. Thanks in advance. ...

how to get width in pixels of view with android:layout_width="wrap_content"?

I have view, which have layout_width="wrap_content". If i use view.getWidth() in code, it returns 0. :-( How can I convert width of view "wrap_content" to pixels? ...

how to replicate sd card changes to content provider

Hi, I'm writing custom content provider and i have to make changes to content provider(means in the table records are stored) when i delete,download or update file in the sdcard please give the solution.How to get intent when file deletes, updated or downloaded to sdcard Thanks, ...

android: how to access ressources in the res/raw directory via BufferedReader

hello, i save some ressources in the res/raw directory which i then would like to read with my custom loader. how can i do this? ideally i would get a BufferedReader on them. thanks! ...

ebook reader using Android SDK?

Hi I would like to include an ebook in my Android app along with some other functionality. How can I let the user read the ebook without having to leave my application or having to ensure that they have an ebook reader app installed on their devices? Thanks. ...

Android Intent Action "ACTION_INSERT_OR_EDIT" - should it be used for adding contacts?

Hello. At the moment I am searching for an easy and supported way of adding contacts in Android up from SDK level 7. (when some kind of data like the phone number is available) I looked at the default contact application and found "Intent.ACTION_INSERT_OR_EDIT" which is used for adding a new contact (or adding a number to a contact fro...

Android-SQLite Database

Hi, I am new to android.I want to save my name in Sqlite database when i enter the text in TextEdit and clicking the save button .I have created a database as name.db.I do know how to link the text in TextEdit and button to the database. Please Help me out .Sample codes Will be were useful.Thanks in advance... ...

Security exception while calling bindAppWidgetId

Hello, While developing a Launcher (Homescreen) application for Android, I've come into a security exception I don't understand. When calling the [bindAppWidgetId()][1] method from within my Launcher Activity, I get this security exception : 08-19 11:30:11.689: ERROR/AndroidRuntime(6032): java.lang.SecurityException: bindGagetId ap...

Android Market subscription payment model. How to?

I would like to have two apps. One to do the real job and another one to carry the payment on a monthly basis (licensing app). Users must download the licensing app each month from Market. But, should they have to uninstall the last month's app before that? Can an app auto destroy itself (uninstall itself)? ...