android

How to arrange buttons with different text-sizes in a TableView so they are not displaced?

I write a rpn calculator app for just for learning. The buttons are arranged in a table layout. The arithmetic buttons uses a bigger font size because the symbols are very small otherwise. This produced slightly displaced buttons, but they are all the same size. It works if all buttons use the same font size. Look here for image: http:/...

Android Gallery: how to have scrolling animation programmatically

Guys, I'm trying to implement scroll animation for gallery...programmatically. tried with setSelection(int pos, Boolean animate) and it's not working. is there anyway to override setSelection() method Thx Samurai ...

Android: how to read system setting for vibration on key presses

How can I programmatically read the system setting for the virtual keyboard? I want my app buttons to behave like it is set in the system settings for the virtual keyboard (beep, vibrate or nothing). ...

EditText without auto-correction, etc.

My EditText needs to accept input consisting of partial words, names, etc. At least on my HTC Desire, this is difficult since the keyboard wants to suggest and/or correct some entries (e.g., changes "gor" to "for"). I tried setting textNoSuggestions on the view, but that doesn't fix it. Any simple solution to this? ...

Using TextFilter with custom ExpandableListView on Android

I am using an ExpandableListView with custom child and group elements that I inflate from the xml on the fly. setTextFilterEnabled does not seem to work anymore, probably because it doesn't know what data in the child view needs to be used to perform the filtering. Is there any way I can specify that? ...

logging into youtube from android

I am trying to log into you tube using the following code mService = new YouTubeService("Nothing", developer_key); //Authentication try { mService.setUserCredentials(mUsername, mPassword); } catch (AuthenticationException e) { Log.v(TAG, e.toString()); } but I am getting: ConnectYouTube: com.google.gdata.util.Authentication...

Drawing a border using a custom view Android

I'm trying to draw a custom border by drawing a custom view. Here is a sample of one side of the border: package com.sparkydev.guessaphrase; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.shapes.RectShape; i...

Distinct values in Android ExpandableListView

Hi all, I'm having trouble with an ExpandableListView. What I want is for each group to be from column "bond", which is non-unique, but I want the groups to be unique (i.e. each value of "bond" should only have one group). Each value in the group has data in other columns which should be displayed. The problem is that it seems I can eit...

How to draw Arabic Text on Android after reading from a file?

Hi all, I've figured out how to draw Arabic characters properly (connected and right to left) using string literals like this: textView.setTypeFace(Typeface.createFromAssets(getAssets(),"DejaVuSans.ttf")); textView.setText("\uFEB3\uFE92\uFE98\uFE94"); But for some reason I cannot get the arabic to format properly if I read anything f...

Close activity hierarchy in Android

How do I close a whole hierarchy of activities and show a new activity not present in the current task? Context Consider a FTP browser that resumes the previous session on launch. Each folder is displayed in its own activity. When I click on a folder, a new activity is started for the folder. If I press the back button, the app returns...

Initiating activity for settings class

In my code I'm calling a preferences activity from my main activity which prompts the user to enter username/password, as below.. // Launch Preference activity Intent k = new Intent(application.this, settings.class); startActivity(k); This calls settings.xml, but I want to re-initiate the main activity once the username/password ...

creating a custom image based layout on android

Is it possible to create a layout based on (background) images? For example, there is well know app called Appie that uses this picture as a homescreen: I might be able to recreate the layout with a TableLayout, but this will be difficult to get it perfectly aligned with the buttons in the image. The default layout options make it ver...

How does one send ICMP packets (with associated TTL values) in Java on Android? Is it possible without a 3rd-party library? If not, what do you use?

This seems like it should be a simple solution to find, but I'm not having any luck. I want to write a simple ping/traceroute/dns troubleshooting app, but am simply not finding any documentation or examples on sending ICMP ECHO packets with set TTLs and interpreting their responses. I realize that Java likes to keep you away from "low-le...

Viewing a Set of Images

Greetings Fellow Coders. My app downloads a set of images from a website but I need to figure out the how to display them to the user. How can I display these to the user if they are coming from a ListView? Also, they'll need to be able to get back to the ListView. Cheers. ...

Android ADP2 Sapphire audio chips?

Anyone ever looked under the hood on an HTC phone to see what ic they use for the mic? Stupid HTC support said it was 'proprietary', like if they told me, I'd build a buch of android phones and put em out of business? I've searched the sapphire *.c source files for 'mic'. Seems like there is legacy support for soundblasters, all sorts of...

Android: How to Get 3G/UMTS Signal Strength Values

Hello All I am a Cellular RF Engineer and have been trying to get some specific WCDMA/3G/UMTSsignal measurement values out of Android SDK environment. Using the public class SignalStrength I have been successful in getting meaningful GSM values (with the assistance of a Software Engineer) using getGsmSignalStrength(), but only yield "-...

Eclipse using Android XML-RPC help

I know this is a noobish question, but I cannot get android-xmlrpc properly hooked into my android project in eclipse. The project website offers no advice and I have little experience developing with eclipse. Could someone please tell me the necessary steps to get the library properly into my android project? ...

MediaScannerConnection scanFile scanner is crashing

Hi, When I run the following line of code: MediaScannerConnection scanner = new MediaScannerConnection( this, null ); scanner.connect(); scanner.scanFile( szFinalFileName, null ); //<---crash here I get a crash and this message in the console window: 09-26 14:47:44.074: ERROR/MediaScannerService(10288): Failed to delete file...

How do I rotate a canvas without disturbing the coordinate system in Android?

I am trying to rotate a canvas with canvas.rotate and move an object on it at the same time. The problem is that with the rotation, the coordinate system of the canvas rotates as well, so I get cases when my object is supposed to be moving along the y axis, but the y axis is rotated on place of the x axis. It is a mess. Is there a way to...

Getting started with Android Market?

How do I get started as an Android developer? I know that I need to pay a fee, but I'm unsure about other things. I have done iOS development, so forgive me for making comparisons or assumptions based on the Apple App Store. How do I distribute my apps? Is there an app review process? What do I gain by paying Google the $25.00 fee? Do...