android

TabHost Clic on the selected tab

Hi, I have a tabhost with 5 tabs, and the content of each one is an ActivityGroup than can start different activities. I'm trying to redefine the clic on the selected tab of my tabHost, to go back on the main activity of this tab. For example, I'm in the first tab, which has a list of item. If I select one item, it replaces the conte...

Android RelativeLayout - using multiple layout attributes

If you have two TextViews side by side each with a varying number of lines and then want a TextView below both of these how would you implement it? For example, if you had: <TextView android:id="@+id/textview1" android:layout_width="160dip" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:m...

How can I create an order form?

I am new to Android, and am trying to develop an app that presents a list of choices with a textfield next to each that allows the user to enter in quantity information related to each item. What would be the best way to impliment this? Currently my app is using a buttonlist with checkboxes next to each item to select it. I'd like to ...

"Set wallpaper" button function, Android.

I've created a custom gallery; however, the "Set wallpaper" button will not set the wallpaper. Here's the wallpaper.java I have. I'm just lost on how to implement OnClickListener and then set my button to use an onclicklistener like so: buttonName.setOnClickListener(this); package com.totem; import android.app.Activity; import android...

Application non showing in global Quick Search Box

I want to create a simple app which shows infos on the global quick search box in android. I did follow some howtos but i can't get my app in the menu "Settings->Search->Searchable Items" which is the menu that let the user check which suggestions he wants in the QSB. I can attach the manifest here and the searchable xml file.. <?xml ...

Accessing Identi.ca Update Status

I am working through an Android tutorial from CommonsWare and cannot figure out why I am gettting my error. Here is my code: public class Patchy extends Activity { public String DEB_TAG = "Patchy.java"; private DefaultHttpClient client = null; private EditText user = null; private EditText password = n...

Disable pinch/zoom in Android 2.1 browser on HTC devices

I'm building a mobile site and have the following meta tag set in the header: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> Unfortunately, this isn't working on HTC devices (HTC Hero, etc) with Android 2.1. Any ideas on how I can disable pinch-to-zoom in this browser? Wor...

Customize My Location Overlay Update Times

Hello, I am trying to implement the MyLocationOverlay class from google maps. However, when I try and use my own locationManager -- I cannot get the overlay to acutally draw on the map. I am wondering if I am doing something wrong. I don't want to call the super method(enbaleMyLocation) of the MyLocationOverlay class because that requ...

thread looper handler not being created despite code

Hey guys, so I have been getting this really weird bug in my android app that I have isolated down to the fact that a handler is not being created. The odd part, is that despite the fact 5 threads are being created, under certain circumstances...only 4 handlers are created. And then the rest of the time, 5 handlers are being created. N...

How Do I Pull The Application Version Listed in AndroidManifest.xml From Java?

android:versionName specifically... Thanks! ...

WebView textarea doesn't pop up the keyboard.

Hi, When I display a webview, I don't see the soft keyboard popping up. The hard keyboard also doesn't work! What are the usual shortcomings. The code which I use to access the webview is package com.example.blahblah; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import androi...

Android development : ddms from command line not seeing devices.

=============================== *SOLVED * : see answer below I dont want to use Eclipse. From the command line: An emulator is running. adb server is running. "adb devices" lists correctly and I can see my instance on an avd in the output. However when I manually start DDMS from the command line it just keeps trying to connect. I ca...

How to know device is connected to Wifi or 3G, programatically

Hi all, How i can know device is connected to Wifi or 3G, programmatically Thanks ...

How to get Android project and std Java project to play nice?

I can now get our Android project to talk to our non-Android project. But there's still an issue: I are trying to have an Android class call a non Android Hello World class. I tried compiling our non-Android Hello World class in a separate Eclipse workspace. I then packaged it into a jar. I imported that jar into our Android Hello Worl...

Android Compatible Devices (non phone)

I'm interested in playing around with the Android OS, but I do not need or want a phone. It doesn't look like there are any 'non-phone' Android devices out there, so maybe there's a device that is compatible that I can flash. Any ideas? ...

Android service called periodically by the system?

I have a background service that is active at certain times - such as when a call comes in. While working to optimize battery use I noticed that its onStartCommand() is being called every 10 minutes. I wasn't doing that, so I looked... 08-11 10:54:25.938: VERBOSE/com.dcd.monitor.MonitorService(32194): onStartCommand() on thread Monito...

How to cancel Android notifications?

I am making an app where the user can set an alarm based on GPS location. I only want 1 alarm to be active at any one time. So, when the user sets a 2nd alarm, I want to cancel the notification for the 1st alarm (then set a new notification for the 2nd alarm). Right now, my notifications continue to stack up (as in I can't delete them, ...

LinearLayout filled from Right to Left

I want to create an input box with a submit button to the right. Between them they should span the width of the screen. Currently I have: LinearLayout row= new LinearLayout(context); row.setOrientation(HORIZONTAL); row.setGravity(Gravity.RIGHT); EditText input = new EditText(context); Button submit = new Button(context); submit.setText(...

Install an apk without starting the emulator

When developing on BlackBerry or iOS, you can deploy your application just by dropping the compiled code into a special directory, and when the simulator boots up it will check that directory and install any apps that it finds there. Is this possible for Android? The reason this feature is desirable is because my build system deploys b...

My application freezes EVO 4Gs (and everything else)

When a user presses the back key to my first activity, where I start an AsyncTask duringonCreate() that checks to see if buttons should be enabled based on whether or not websites are down. I use an HttpClient to contact www.downforeveryoneorjustme.com to determine if the site is down. When users return to this Activity the phone becomes...