android

how to block characters in edittext in android?

how to block characters in edittext in android? ...

Android SDK Manager and AVD Manager doesn't have the correct information and fails to update on Ubuntu

I'm trying to install Android SDK on Ubuntu but fail when I try to use the SDK Manager and AVD Manager to install Android platforms. I've downloaded: android-sdk_r04-linux_86.tgz The I start the SDK Manager and AVD Manager (UI) according to the README file: ./tools/android And I get the following Installed Packages: - Install ...

Android Custom Dialog Class Title Problems

public class MessageDisplayDialog extends Dialog implements OnClickListener { public MessageDisplayDialog(Context context, String title, String message) { super(context); setTitle(title); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.color.default_text_color); Log.v(getClass().getSimpl...

Using MatrixCursor and SimpleCursorAdapter in a ListView with Text and Images

I'm new to Android development and running into an issue with using a MatrixCursor to populate my ListView. private void fillData() { String[] menuCols = new String[] { "icon", "item", "price" }; int[] to = new int[] { R.id.icon, R.id.item, R.id.price }; MatrixCursor menuCursor = new MatrixCursor(menuCols); startManagin...

android sdk version

How can i get the current android sdk version (1.5, 1.6, 2.0, etc.) programmatically ...

How do I copy an android app to an actual device?

I have written a simple android app and it runs in the emulator. Now how do I actually copy it to my phone? I have HTC's Eris. When I attach it with USB it asks me If I want to mount it as a USB mass storage device. I then see it in my drive list. the directories on the device are: albumthumbs amazonmp3 com.google.android.apps.listen C...

Android Borderless Dialog

I have created an AlertDialog using AlertDialog.Builder, but the Dialog border takes up too much space on the screen. How do I remove the border? I have tried using another Activity to emulate the dialog with a transparent background, but the dialog is used repeatedly, and creating a new Activity every time introduces a significant amoun...

Android compass noise algorithm

I am trying to filter out the noise from the orientation/compass sensor in my magic phone. Some of the readings seem to be 90-180 degrees off and there is a lot of jiggle. I have tried different things with limited success, so I was wondering if anyone could recommend an algorithm to filter this sort of noise to get a stable output. BR...

How to create Android Applications only for the Enterprise

Hi, I want to create an Android application that is not released to the Android Market for public consumption but only for private use of my company. Is this possible? If so can you post a link to where you can do this? Thanks! Joe ...

Android: How can we change the view in the tabs?

I want to provide a clickthrough on the list in a tab which opens another view. I need to open the new view within the same tab. I then need to provide a back button on the changed layout to change the view to original view. I have tried this. Intent intentA = new Intent(this, AView.class); Now I am trying to access the tabSpec from m...

Problem with system intents

I have a program that has a broadcast receiver that listens for Phone_State and then sends a user defined intent. Well, my problem is that the system also sends out an intent (the one that I am trying to replace with my program) So I am trying to find a way to CANCEL the systems intent. I have found that if i have a timer just wait for a...

Android: how do you mix and match colors, styles, and sizes in a single view?

Is it possible to style a single, say, TextView in Android with multiple alternating styles, colors, and sizes? Think inline HTML or CSS but in the Android world. As an extreme, to demonstrate the point, let's say I wanted to have a word "CIRCUS" with each letter a being different color. Do I have to create 6 TextViews for this or can t...

android radiobutton

How can I create a radiobutton with the option on the right side of the text. ...

Android and storing/loading preferences for resources - how to achieve consistency?

I'm writing an application and need some help with consistently storing and loading preferences related to certain resources. Let me give an example. Suppose I have 10 spinners. They all have the same functionality but different meaning. Because they have the same functionality, I can bind them to the same onItemSelectedListener, which ...

How to stop service by itself?

I start a service in an activity then I want the service to stop itself after awhile. I called stopSelf() in the service but it doens't work. how to make the service stop itself? thanks!!! ...

Android Map: Map does not show up on Device

I am able to see Map in emulator but once I load app on device map does not show up. Emulator have target as google api 1.6 and device have android 1.6 loaded. Is this diffrence causing issue? please help and thanks in advance. ...

Android: How to capture button press event for contact create app of device

I want to invoke my application once user creates / updates contact from his device. i.e once user hit "Done" button. is it possible ? If possible please provide sample code or link. Please help and thanks in advance. ...

How to convert numbers from exponential to normal form in Android?

How to convert numbers from exponential to normal form in Android? ...

Problem in Back Button

Hi am creating a small application In View Page am doing update and delete operation from database am displaying data s in the top (ex 10 records) and bottom i have 2 buttons Edit and delete if user clicks Edit button it redirects to Edit page In Edit page i am displaying content for editing also i have 2 buttons update and cancel if use...

ListActivity: alter data from SQLLite before putting it into the row

This is my ListActivity: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.my_list); mDbHelper = new MyDbAdapter(this); mDbHelper.open(); fillData(); registerForContextMenu(getListView()); } private void fillData() { // Get all of the rows ...