android

Android: How to create a button that produces the same result as hitting the down key on the D-Pad?

How do you create a button in an Android app that produces the same result as hitting the down key on the D-Pad? ...

Android - Main.xml doesn't recognize my color values... ?

In the values/colors.xml, I put: <?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"&gt; <color name="blank">#f0f0f0</color> </resources> In the layout/main.xml, I put: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/androi...

How to copy all properties of a view ?

Hi everyone, I’m creating an currency exchange rate application to learn Android. The app will list all exchange rate in a list, each of them has the layout like this (in essential): <TableRow> <ImageView> [properties for the Flag image here] </ImageView> <TableLayout> <TableRow> <TextView> [Buyi...

Android: Starting An Activity For A Different Third Party App

Hi, I'm working on an app and I want to integrate the Last.fm app into it. Basically, when someone is looking at an artist in my app, I would like to have a button that they can tap to open up Last.fm application with the artist's information. This intent works, but it loads a menu asking which app I would like to use (Browser or Last....

setOnClickListener to all extended ImageViews - Java

I have a custom class that I've written that extends ImageView (for Android Java). I want to add a ClickListener to every instance I create of the class that will do the same thing (just animate the ImageView. I tried a few different things to no avail. The code below is what I want to accomplish but it's being applied to an instantia...

icon launcher not working

Hello: Another newbie question here. For some reason, when I click on my icon, it says "application not loaded". The rest of it runs OK in the emulator, but not at all on my new Droid X phone. I'm sure it's something small I'm overlooking but I've gone through the Manifest and checked sample code and can't seem to find what I'm missi...

Android: how can i position the listview at a particular location on the screen

Hi, I'm trying to write an app for my Samsung Vibrant (running android 2.1). I used the example "Form Stuff" app available as tutorial on the android developers website. I basically added a background picture to the application. the background picture has some text on it towards the top. I want to display a list of elements (to be selec...

Listview error can't run; force close

Hi all! I've managed to show existing user in a textview. But it can only show one at a time so I decided to use listview. package log1.log2; import android.app.ListActivity; import android.database.Cursor; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.SimpleCursorAdapter; public class AdminMain...

Box2d body moves faster after step is stopped and restarted in a pause [Android]

I am writing a game in android using Box2d physics engine in NDK. So physics is entirely in the native world but the drawing is still in Java world. In my game I have an update thread that steps the physics world and invalidates the canvas for redraw. So far so good. When the user wishes to pause the game I stop all the threads. Then us...

where can a video file be placed and played in android other than sd card?

hi, 1.how do we build our own video player in android,it will be helpful if ull can give me some code related to it. other than the sd card where else can we place a video file and paly it. thank you. ...

How to make sure an Activity is displayed before another?

I have some activities and I have to display a fullscreen ad image before displaying the activity... all my activities extends a custom activity and I thought it was a great idea to implement that advertisement there, so I did: public class BaseActivity extends Activity { public void onCreate(Bundle icicle){ super.onCreate(i...

Android - How to share an WebView control among different tabs?

Hi, I'm developing an android application based on HTML. I made several tabs and put a WebView into each tabs to display the page. Currently I want to use just single WebView instance for all tabs to support login/out feature. I mean I need consistency of user's status during transition of each webpages in tabs. Is it available to shar...

java.lang.out of memory error : bitmap size exceeds VM budget ?

Hai friends, In my application am displaying a list of names and respectives pictures ? i am picking picture from galery through Drawble.getFromPath(). ? am displaying list , some i encountered with out of memory error ? please help me to sort out this error ? regards , srinivas ...

Moving textview in listview

I have created a listview using the "simple_list_item_multiple_choice.xml" file but whenver i select any item ,the text in the textview moves . I am following a layout: <Button android:id="@+id/Done_Button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Done"> </Button> <But...

Keycode back press in android

Hello In my android application , i have three pages A,B,C.All the three pages have table layout.If i person clicks on a particular row other page related to that row will display. Now what i require is if a person clicks on back after the second page,I need to focus the row which he had clicked in the first page on his return. Can i do ...

Opening ContextMenu by Clicking a Button in Android

How to open the ContextMenu in Android by Clicking a Button? ...

Changing the height and width regarding your screen Size

How to change the size of height and width according to the screen size? ...

How to change the Text color of Menu item in Android?

Can I change the background color of a Menu item in Android? Please let me know if anyone have any solution to this. The last option will be obviously to customize it but is there any way for changing the text color without customizing it. ...

how to transfer files via bluetooth from my android application

How to make my android application transfer files (jpg , mp3 ..) via bluetooth.. Is it supported .. Thanks Sarath ...

How to put a gallery into a widget in the home screen?

I am trying to create a gallery inside a widget in the home screen ....as i am new to android please do give me guidelines and the source code ... ...