android

Android ListView OnItemClickListner Vs. View OnClickListener

Why does an OnClickListener for a View inside a ListView not respond to a trackball click on the view, while an OnItemClickListener for the ListView does respond to a trackball click on one of the ListView's views? ...

Android CheckedTextView - Set checkMark dynamically

Given this XML property of the CheckedTextView's checkMark: android:checkMark="?android:attr/listChoiceIndicatorMultiple" How can you set the checkMark property dynamically (i.e. from code)? Does Android have any documentation on this? Using: Android 1.5 Note: I am building a regular jar library that does not have any access to andr...

Change style of android MediaController

Hi, is there a way to customize the MediaController? I need to change the style of buttons, SeekBar etc. Thx for your answer i.a. ...

Scrollview vertical and horizontal in android

I'm really tired looking for a solution for Scrollview vertical and horizontal. I read that the any view/layout implements this feature in the framework but i need something like this. I need to define a layout within other, the child layout must implement scrolling vertical/horizontal for moving. Initially implemented a code that mov...

Android ContactsContract and building across multiple SDK versions

I need my app to run on all Android versions, but the Contacts API changed in 2.0. In SDK 1.6 and earlier I use android.provider.Contacts to query the contacts DB, but this does not work in 2.0 Instead, for 2.0 I use android.provider.ContactsContract. This presents a problem: when I have code for ContactsContract, my app will not build...

Set android screen resolution

Hi, I'm trying to alter the default screen resolution of the Android emulator (and by extension, the Android device) to work at 1700x1200. In other words, I need the screen to be able to display unique points over that range. I have set the dimensions in my layout file, yet the device still defaults to 320x480. I've set different dpi...

RuntimeException on Camera.setParameters() on nexus one

I copied the code from the answer here and I still am getting a RuntimeException: setParameters failed error on my nexus one. My manifest file has camera and wake_lock permissions. This works on the emulator, and on the droid I don't get the error but it does have a rotation problem. ...

Problem displaying ShapeDrawable in an ImageView.

I am writing an app which will create drawable shapes and add them to other drawables. (Think Tetris pieces onto a Tetris board.) As a test, I want to have a particular shape appear when my activity is loaded, but I cannot get a Drawable to appear in the ImageView I created. Could anyone explain why the following code isn't working? Act...

Making a draw/paint app

I'd like to include a simple draw feature on my app. A friend told me I can't use canvas because I need to control the frame buffer and not redraw the entire screen every for every frame. He suggested I find a openGL 2d engine. I've searched around and I've only found Rokon which doesn't have any documentation and the examples aren't qui...

Application owner issue

Hi guys, I want to publish my application to android market and I have a question to ask. I am just wondering where I can define owner names of the application. I want the owner name to be seen in users willing to download my application. Is it possible to define the owner name when I sign my application? If not can I define it when I p...

Android runs OpenGL ES 1.1 or 1.0?

I'm developing a native app for Android and I'm trying to use functions such as glIsEnabled which appear to be only available in OpenGL ES 1.1. Google's docs claim that NDK 1.6R1 supports OpenGL ES v1.1 but the function call fails with "unimplemented Open GL ES API" and if i do a glGetString(GL_VERSION) it returns "OpenGL ES 1.0 CM" as t...

When is mText(member variable of TextView) displayed, actually?

While I'm developing custom widget by using TextView widget, this question come up to my mind. When mText(member variable of TextView) is displayed, actually? I have thought that ,just like other widgets, if I override onDraw method in the custom widget, which is derived from TextView, I can draw mText as I want. But, it's not true. I'...

Any simple interpretation about 3G

Can anyone explain 3G technology from a programmer's perspective? I am a little bit confused. For instance, if I develop a mobile application with Android or IPhone SDK. Shall I concern about the network I used? Or the SDK has a same interface for all those different network(3G,GPRS,CDMA). Moreover, is 3G a specific technology or a set o...

Including other Eclipse Projects in an Android application project

I have a library-only Android eclipse project (no main class, only library classes) that I want to include in my main Android Application project. I went to the Build Path and added the library project to the "Required projects on the build path" on the Projects tab, and checked it on the "Order and Export" tab. However, when the appl...

Using Android Test Framework

Android provides various packages for testing like AndroidTestCase ApplicationTestCase InstrumentationTestCase ActivityInstrumentationTestCase2 ActivityTestCase I need to know how to decide which package is best suitable for testing my app. Some info is provided in this link ht...

INSTALL_FAILED_CPU_ABI_INCOMPATIBLE while installing apps on target getting this error message how to resolve ?

want to know is there any architecture wise problem or else ? ...

How to make ImageButton in Android automatically scale based on screen density?

I have an image put on an ImageButton, which looks good on a mdpi (medium-dpi) screen. However, when the device has a hdpi (high-dpi) screen, the image is still pixel-by-pixel accurate, which look small on the device screen. How do I make such that the image (and therefore the ImageButton) scaled based on the density-independent pixels...

How to draw filled polygon ?

Hi, How to draw filled polygon ? Thanks in advance. ...

Apache Commons Codec with Android: could not find method

Today I tried including the apache.commons.codec package in my Android application and couldn't get it running. Android could not find method ord.apache.commons.codec.binary.* and output the following errors in DDMS 01-12 08:41:48.161: ERROR/dalvikvm(457): Could not find method org.apache.commons.codec.binary.Base64.encodeBase64URLSa...

Simulating opening/closing the hardware keyboard in emulator

Hey all! Is there a way to simulate opening/closing the 'hardware' keyboard in the emulator? I have to test some changes that I capture using getResources().getConfiguration().keyboardHidden and this would help a fair lot :) Thank you in advance! ...