android

How to do such a layout in xml? Android...

I want a Layout that is as big as the screen with two rows and three columns like that image => http://dl.dropbox.com/u/2024237/Bildschirmfoto-DroidDraw.png the colors should be buttons... please help .... i cant figure it out ...

Animate tab switch with TabHost

Hi: When the user clicks on another tab an animation should appear to the next view? What is the best to do this? ...

Possible to autocomplete a EditTextPreference?

Is it possible to have an EditTextPreference with AutoComplete attached to it? I know ho to attach one to an element with an id, but am having trouble figure out how to attach the ArrayAdapter to the preference field. This is wrong, but it's as close as I can get. final String[] TEAMS = getResources().getStringArray(R.array.teams); ...

what context should i use AlertDialog.Builder in?

Could anyone please explain what context should i use the AlertDialog.Builder class? I am new to android app development and I frankly don't understand which context to use when? Say, I want to create an object for AlertDialog.Builder class - AlertDialog.Builder ab = new AlertDialog.Builder(); ab.setMessage("Test"); ab.show(); What...

Why does the Android maps compass demo use a delegate for the SmoothCanvas class?

In the Android MapsDemo available in Eclipse for the Google API, they create an inner class SmoothCanvas in MapViewCompassDemo.java. Within this class the re-implement seemingly every method and reroute it to a delegate instance of Canvas. static final class SmoothCanvas extends Canvas { Canvas delegate; private final Paint mSm...

canvas different on android emulator compared to phone

Should there be any difference between a canvas on the emulator and a canvas on a real device (HTC Incredible)? On my canvas for the emulator I have this: canvas.drawRect(x*cell_size + 1, y*cell_size + 1, x*cell_size+cell_size, y*cell_size+cell_size, pWalls); (this is a grid type game) and it works and looks fine but on my real device...

Android: can not write to a txt file.

Hello! My program contains a file with the name "size.txt", which contains just a word "15". If a user choose a value from a spinner,say 17, then the chosen value should be stored in the file and replace "15". I have added the permission to the program <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-pe...

Asynchronous service call while starting the activity in android

Hi, I am starting an activity from one by passing some data in the intent. I want the next activity to call some asynchronous service (rest service) with the data from intent and show the result on screen. I made the asynchronous call by starting a different thread from onStartup method. But this is failing with below error: : INFO/Pro...

Authentication on your Android App

Hi I am developing an Android App where I require a user to authenticate his session before using the app. One way is to store a user name and password by asking him to register on the app and then use that to authenticate him. But i was looking to do something else, maybe use an OpenId account to authenticate or Opensoial or somethi...

Saving / Loading Images from android gallery as bitmap?

Hello, I am a beginner Android developer and I need to know how to Save and Load images (Bitmaps) from the Android Gallery, But I dont even know where to start! Can someone help me to know where to get started, or even look? ...

Android app using android.permission.READ_LOGS - is that impolite?

I have an app that is available from the Android Market. Some users have asked for a way of debugging when things don't work out as expected. I have been looking into adding a menu item that will display the output of Process mLogcatProc = null; BufferedReader reader = null; mLogcatProc = Runtime.getRuntime().exec( ...

How to get the current Y offset of a ScrollView

ScrollView has a method for setting the x and y scroll offset, but no method for getting the current offset (all I'm really interested is the y offset, since ScrollView only supports vertical scrolling). I don't see any method that would work in the superclasses, and tried getTop() for the content view, which is always zero. Am I missing...

Passing an Orderby

I have a list view with several columns; things such as name, date, etc. I want to be able to click on the header TextView and sort the list by that field. When the list loads the variable works, and a list is queried and sorted by the field _id (no surprise other than it works), but when i click on the header TextView i get a force clos...

bank account error google checkout

I added my dev account to my personal email and i want to change it to my company email...how to do this? Second: I used google checkout when first released and added scottrade account to google checkout. I let it go and never verified. No account is closed and I tried to verify but I'm now locked out of bank verification. I cannot add ...

Finding WakeLocks via ADB Shell and/or API

I've ran 'ADB SHELL dumpsys power' and it reports no wakelocks, yet when I compare my uptime and awaketime, it's not sleeping. I basically hit power to turn of my screen yet the awake time still ticks away. If I reboot the device (HTC Incredible) it sleeps fine.. once I use it for awhile.. the awake time keeps going... Here is my output...

Showing Keyboard with Android Dialog

Hello, I want to show the Android version of a Model Dialog with text input however I think the keyboard will be behind the actual activity since dialogs weren't made to have inputs. Is there any way I can get the keyboard to show in an actual dialog. I did see this SO question -- however I'd rather not use an Theme.Dialog'ed activity...

Cannot retrieve Intent Extras in Service onStart()

Hi, I'm trying to launch a service from another service with certain extras. However, I can't retrieve those extras in the launched service, .getIntExtra returns a NullPointerException. This is how I launch the service: Intent serviceIntent = new Intent(context, RefreshService.class); serviceIntent.putExtra(AppWidgetManager.EXTRA_APP...

Android - RelativeLayout CENTER_VERTICAL and BELOW issue

I want a TextView on top and a VideoView below it. I want to have the VideoView as center verical and below the TextView. I am using RelativeLayout. I am trying to do this in code: RelativeLayout layout = new RelativeLayout(this); TextView tv = new TextView(this); tv.setText("Hello"); tv.setGravity(Gravity.RIGHT); tv.setTextColor(Color...

finishFromChild android help

What is the usage for this? the docs at developers android haven't helped me allot. what is the child parameter? an explanation would be great :) ...

content restrictions on Andriod?

I cannot find any articles on the content restrictions for developing on Andriod. Are there any? My client wants to make an app that contains 'strong adult language' for sexual position as well as potentially adult imagery. ...