android

Positioning an image inside an ImageView with max height and max width set

I have an ImageView with max height and max width both set to 100. The figure below is clearly not a square, but you can use your imagination ;) Figure 1: ╔══════════════════════════════════════════════╗ ║ ImageView ╔══════════════╗ ║ ║ ║ ║ ║ ║ ║ Actual image ║ ...

Broadcasting an intent to a specific component.

I have an activity that is starting a background operation in another service. This activity receives various notifications from this service. As part of the intent I use to initiate the background operation I pass extra data with the context of my activity so the background service can broadcast intents back to me (the download service ...

How to make softkeyboard candidate view not block application view?

Hi, I am playing with the Demo SoftKeyboard the comes with the Android SDK. In portrait mode when the candidate view is shown, it doesn't move the app up as the default android keyboard does. Hence it covers part of the application view. What should be changed in order to make the candidate view in the demo softkeyboard behave as the ...

Shader as a drawable (Android)

How do I use obtain a drawable from a Shader (such as LinearGradient) so that I can use it as a background in my UI? ...

How to use EMMA code coverage in android.

Hi all, Im new to EMMA, i dont know how to use this for android system. Can anyone please give a sample for using this with android. Thanks a lot. ...

XML/SOAP attributes for a complextype in kSOAP

Hi, I'm trying to parse a SOAP response that contains nested ComplexTypes using the kSOAP library on Android 2.1. <event att1="value1" att2="value2" att3="value3"> <tag2> ... </tag2> <tag3> ... </tag3> </event> I've implemented my own class Event that implements org.ksoap2.serialization.KvmSerializable to parse this response...

Apply Alphabetical Filters on listView on Android os

Hi.. i need to create a list view that display same functionality as Contact App. I need to have a scroller through which i can traverse the list alphabetically. To achieve this i am following an example from API demos "com.example.android.apis.view.List1.java". When i implement this functionality on a static list view => it is working ...

ListActivity Item with remote image

Hello, I have a ListActivity that should display quite a lot of items and where each list item should contain a text and and an image. The images are gotten from a remote server. How can I display the remote image on the list item. Thanks in advance ...

Android: Goto HTTP Url on Button Click

Hi all, I want to go to a web page on the click of a button in my android app. So say, I have a button called "Google", when the user clicks on that button I want google.com to open up on the screen. How is this achieved? Also, is there a way I can gain control back to my app once the user is finished with google? Thanks George ...

After making a call programatically, my android app crashes

The title explains all... I have this snippet of code in my application: String url = createTelUrl("3112007315"); Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse(url)); context.startActivity(intent); It does make a call, but once the call ends, my application crashes. I'd like to return to my application once ...

java.lang.StackOverFlow error. Suspected too many views?

When you get an error like the one below (Android 1.5), is it because there are too many nested ViewGroups, or because the total number of Views is too great? Are there any tricks to get around it while still keeping the same look to your app? java.lang.StackOverflowError at android.text.Styled.measureText(Styled.java:371) at and...

How best to implement a cohesive Model layer for Android MVC apps?

I'm pretty new to Android and Java, though I've really been excited about what I've learned so far. I'm a little uncertain though on how to implement the Model layer. I come from a background in PHP web applications with Zend Framework and the like. I'm used to having an ORM component, through which the Model maps to a database. I haven...

How to code Android for the visually impaired?

Does Android support visually impaired users in the same way as HTML alt tags are used to provide input for screen readers on the web? If so, what is the best practice to code Buttons and ImageViews etc so they can be read by a screen reader? ...

Android: How can I validate EditText input?

I need to do form input validation on a series of EditTexts. I'm using OnFocusChangeListeners to trigger the validation after the user types into each one, but this doesn't behave as desired for the last EditText. If I click on the "Done" button while typing into the final EditText then the InputMethod is disconnected, but technically f...

Which thread invokes SensorEventListener.onSensorChanged

From my records it seems that SensorEventListener.onSensorChanged callback is called by the same thread that registered the callback. I.e there must be some message-queue synchronization going on in the background which allows the activitys UI-Thread to handle the callbacks. That leads to my question: Is there a need to synchronize ...

custom content providers in android

I'm attempting to make a custom ContentProvider so that more than one application (activity?) has access to it. I have several questions about how to do this, How do I declare in the code that it is a ContentProvider? How do other applications (activities?) use or import the ContentProvider? ...

Can I get Androis OS?

I bought a umpc on ebay, A Ipad touchscreen like device. I had been looking at a particular hardware model that many sellers had, on which was running Android (1.6). I based my choice on the one that offered "free" shipping via UPS (3-5 day) delivery. after the purchase I noticed that the one I bought has Windows CE, not android (!#$^%!!...

Displaying Calendar in an Android App

Hi experts, I would be obliged if someone could provide me a solution as to which component to be used so that I can display a fairly good looking calendar in my Android application. I kept browsing for a solution for the past two days, but unfortunately could not find a solution. Since this is a very basic requisite, I am sure that the...

Issue with 'Hello Android' tutorial

I am brand new to Eclipse and Android, but somewhat familiar with Java. That having been said, I tried to follow the 'Hello Android' tutorial from the developer site using the latest Eclipse (Galieo) and the 2.1 Android SDK, I am on a Macintosh running Snow Leopard (OS X 10.6). I have a default virtual device (though my target is actu...

Large amount of constants in Java

I need to include about 1 MByte of data in a Java application, for very fast and easy access in the rest of the source code. My main background is not Java, so my initial idea was to convert the data directly to Java source code, defining 1MByte of constant arrays, classes (instead of C++ struct) etc., something like this: public final/...