android

Dynamic ListView extends Activity

Is there anyway I can create a dynamically filled ListView when the class does not extend ListActivity? I appreciate the help. ...

V2.1 behaving differently on different phones

We have an application that runs fine on my Samsung Moment but crashes on load on my HTC Hero, both running 2.1. I thought Android was Android. ...

How to pass a keyEvent object to a Button to let it appears like clicked?

Hello,i have made a surfaceView to accept a OnTouchEvent,and in this view, i draw a Button manually with Button.draw(Canvas)(not make a ViewGroup). now, this button can be drawn on my SurfaceView, but when i pass a keyEvent from OnTouchEvent to Button like Button.onTouchEvent(keyEvent), but this button cannot show the click effect so t...

How to crop an image in ANDROID?

I have to crop an image in Android Can anyone help me how to do it? ...

Intent definition in Manifest file

I would like to start my own SMS editor when user selects "Send message" from contacts application. How do I define intent in manifest file to allow passing contact details to the editor? Thanks a lot ...

Design in Android, Shapes

I wounder how its possible to make a shape like the example, with round corners and padding from the screen borders, and also put text inside, how is this possible? ...

frmat entered Preference

I am using addPreferencesFromResource to display a list of preferences with the facility to edit them with a popup. Is there any way I can check the entry and show a hint for formatting whilst the individaul edit popup is still in focus? Is there some way to specify a format in the PreferenceScreen xml? For starters I want to ensur...

Android: Cannot set gravity of TableLayout to Right

I know there are tons of questions about this already floating around SO but I've read a bunch of them and still cannot get my 3rd column to align to the right. <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wr...

Problem about image cache on Android

Hi Guys! As lots of people do, I use Map and SoftReference to create image cache to cache downloaded image. In my implementation, the latest used bitmap will be putted at the first element of Map, so, when the image cache reach max cache size, the last element of the Map which is long-time not used will be removed, and SoftReference ma...

compass guide to gps destination

hello. here is the basic concept of the thing i want to do. i want to rotate a imageView with an arrow from the current user location to some previously saved GPS location. how do i do this? is the Initial Bearing got from the Location.distanceBetween... method the right way to go on this? if so how do i use it with the compass readin...

andrid fastboot permission problem

Hello, I am using fedora 13 and would like to use fastboot in order to install the CM6 on my phone,I have to use fastboot but when I open a console and do fastboot I get a message permission denied any suggestions???? thanks ...

Carrying SmartFoxServer connection across Android Activities

I am using SmartFoxServer for a multiplayer game. I have it working fine when it loads up in the main chat room. In my app you an create new game rooms and when you click on one it launches a new activity and enters that room. It appears I have to connect to the server again after that. Then I get already logged in error. How can I ...

What does Canvas.getClipBounds() return if the canvas is rotated?

I have a simple question which keeps me thinking for a few hours now. Assume a canvas which is rotated by a specific (known) degree. I want to get the screen coordinates of a bitmap I have drawn on the rotated canvas. To achieve this, I need the canvas' clip bounds. This would be no problem for a non-rotated canvas. But it keeps giving ...

code not running properly .

Some time gets "Launch Cancelled" error. Gets stuck at 'Open Time Sheet ' Button btn01. Any help is appreciated. TimeSheet.java package com.example.TimeSheet; import android.app.Activity; import android.content.Intent; import android.os.Bundle; public class TimeSheet extends Activity { /** Called when the activity is first cr...

Progress Dialog in Android

can i keep progress dialog anywhere in activity?? if possible then how can i do it??? ...

getting debugging output on the HTC Evo

One of the branches that I took in my effort to find a driver that could deal with the HTC Evo caused me to install libusb-win32. Although I am now able to install the correct driver, eclipse cannot see the phone because my system keeps insisting the the device type of the Evo is "libusb-win32 devices" instead of the correct "android pho...

wired headphones pluged in and out

Hello, I need an event executing when user plugs in/out wired headphones, it made in HTC sense player. android.media.AudioManager doesn't generate an event, it even doesn't return a correct value with isWiredHeadsetOn() How can i know if wired headset plugged or not? ...

Uploading an image from android to a PHP server

Hi , I'm trying to upload an image from android to a PHP server by using MultiPartEntity but i have trouble to find the source of the problem , the progress dialog steel downloading without providing any response here my code : public String postFunction(String s_v1, String s_v2, String s_v3) throws ParseException, ClientProtocolExc...

Most efficient way to draw multiple identical objects?

I would like to make a game out of many cubes and am planning on putting it on mobile platforms and also on the web using webgl. My problem is when I make a drawelements call per cube I take a hit on the frame rate. Is there a way I can make a single draw call to opengl es to draw them? The only difference between the cubes would be pos...

Parsing Xml Data

How to parse xml data.. file is php file and Soap is used in xml.. i am going to use this in a android application. please provide me proper codes ...