android

Dynamicly added Rows aren't visible

I recently started to play arround with Android. One of the first things I tried to achieve was creating a dynamic TableLayout. Searching the web, I found some sample code at http://en.androidwiki.com/wiki/Dynamically_adding_rows_to_TableLayout which I copied into my activity. So my Activity now looks like this: public class FooActivit...

Android Matrix, what does getValues() return?

Hi, i'm having trouble working out the returned values of the below code pMeasure = PathMeasure, m = Matrix, distCount is the distance along the path pMeasure.getMatrix(distCount, m, 0x01 | 0x02); m.getValues(float[] values) float[2] & float[5] are position x & y respectively but i can't figure out the rest any help once again appre...

Arabic in browser

Hello My browser in my emultor android doesn't suooprt arabic reshaping.I doesn't find system/lib. Please help me. ...

How can I or values together in a style item?

I'm trying to set up a style that I'll use for my text entry boxes on forms in my application. I've got a basic style, TextEntry, and extensions such as TextEntry.Name. Here's what I want to do: <style name="PgoTextEntry"> <item name="android:textAppearance">@style/PingoText.White</item> <item name="android:layout_width">fil...

Uploading a bitmap to the server with http protocol

i have a camera Activity after which i take a picture and saving it to gallery and uploading to the server My upload code is not working, i need help on this? // image capture Intent intent = new Intent("android.media.action.IMAGE_CAPTURE"); startActivityForResult(intent, 0); //image Saving if (requestCode ...

Touch Scroll on View Flipper in Android?

Hi Folks, I have to acheive that the Touch Scroll on the View Flipper. For Example. I have to Images. At First, ViewFlipper Shows an First Image. Now I Flung the view from right to left. The First Image view SLide out Left and Th Second Slide in from Left. I can Achieve it By this Post. But I want to Scroll the image. that is, On the Ac...

Bringing up SoftKeyboard on android

I want to pop up the software keyboard when the user presses the search hardware search key. At the moment I use the following function with doesn't seem to work for the search key but which does work for the back key: The logging doesn't get even tiggered through the search key. @Override public boolean onKeyDown(int keyCode, KeyEve...

How can I intercept the audio stream on an android device?

Let's suppose that we have the following scenario: something is playing on an android device (an mp3 par example, but it could be anything that use the audio part of an android device). From an application (android application :) ), I would like to intercept the audio stream to analyze it, to record it, etc. From this application (let's ...

Different behaviour of @Override in OnPreferenceChangeListener.onPreferenceChange method of Android 2.2 application depending on source code level.

Hi, I'm developing Android 2.2 application and I'm going to use Preference.OnPreferenceChangeListener interface. I've added the following piece of code to my preference activity: Preference somePref = findPreference(SOME_PREF); somePref.setOnPreferenceChangeListener(new OnPreferenceChangeListener() { @Override ...

How to do a Sub-menu without a new Acitivity? Android programming

Hello! This is my first question at stackoverflow :-). However, I've started to Android programming some weeks ago and now I have get into a problem that I will describe below. Problem: I have a background-image for the whole screen. Inside this LinearLayout I have another LinearLayout with Buttons inside. How can I (without to start a ...

Activity remains on screen Android

I have a service that is listening to some events. When that event happens, it shows a screen by startActivity(intent) When the user finishes doing something on that screen, the code calls finish() but instead of 'closing' the complete application, it shows the main/launcher activity. I mean, whats the best way to remove all app screen...

android: can 140 dpi will get mdpi resource?

In android docs, it is said that 140 still is ldpi, but when I change dpi to 140, I find mdpi resource is retrieved, can someone have idea? thanks a lot. btw, I read the code about how to get resource, seems ldpi's max dpi value is 131.25? Does google post the wrong doc? ...

Android menu controls

I am developing an application and I would like to use the control that I can see in the Photos application and the Desk Clock (on an HTC Desire). The one I am referring to is the bar along the bottom of the screen that has various icons in it. When you press on an icon, the bubble moves along the bar to the icon you have pressed and th...

Setting drawable defined in XML as view's background in Android

Hi I'm trying to set a shape defined in XML as view's background. Here's it: <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:startColor="#fcfcfc" android:endColor="#cfcfcf" android:angle="270" /> <padding android:left="10dp" android:top="10dp" android...

Archiving mechanism

Hi, I'm working on an archiving mechanism of my application's log files and would like some advice. What I want to do: When receiving a LogEntry, the LogListenerService will save it in a buffer and at some point it will print all the log entries in a file. When the file reaches a certain size an archiving service is called that will zi...

android - how to assign an image to a button??

i want to assign an image to one of the buttons in my activity?? how do i do that?? and for that where shall i place image.jpeg or any othr image file?? ...

animation does not start in canvas on adnroid

Hello. I'm working on a game that requires drawing to SurfaceView's Canvas. I'm using SurfaceHolder to obtain Canvas to draw to, and perform drawing in a separate thread. Everything I draw displays correctly except for this one animation. Here is the animation definition (it is in res/drawable/ my_animation.xml: and here is how I ...

Custom Fonts in Android

Hello.... i have already read some articles and searched on google.....but i am failed to do it. My problem is regarding the font-face. In android, there are only 4 attributes in "android:typeface"...which are Normal,Sans, Serif, Monospace... so what i have to do to use "Verdana" in my application ? pls suggest me a correct way to use...

Store Application Preference Android

I have added a mute button to a menu on my application and am wondering if it is possible to store the user's latest preference of either muted or unmuted for use when he/she reopens the application. Here is the code I am using for setting mute or umute: public void isMute() { if(mIsMute){ mAm.setStreamMute(Audio...

Account preferences in Android 2.2 per account, not account type

Hi, I'm developing an Android application and have one account authenticator with preferences. But when I add two accounts of my type, then the preferences are shared between them. How can I define preferences, so that they could be set for each account separately? Thanks in advance! Przemek ...