android

Mutiple listviews with one only scrolls

Hello, I need to put several listviews inner a LinearLayout. The Listviews should be wrap content to adapt the listview to their items. I need have one only scroll with which I can scroll all the listviews. I know that i can't use a scrollview because the listviews have their own scroll (but i don't need the scrolls of the listviews beca...

Android: Add a view to a specific Layout from code

I want to dynamically add some views to a LinearLayout that is already defined in XML. I'm able to add views to the screen but they are not being placed 'inside' the right LinearLayout. How can I get a reference to this specific Layout from code, similar to getting a View by using findViewById()? ...

Remove gestures from RatingBar

Hi, I have an Activity with several RatingBars on it so my users can rate many different things. My problem is that this makes it difficult for my users to scroll up and down the screen. If you attempt to slide your finger vertically on the screen and the first spot you touch is over a RatingBar, the RatingBar tries to capture the ges...

Android - How to send data back and forth between an activity and a service locally.

Hi! I am a bit new to Android. What I need to do is send data back and forth between an activity and a service locally. The information sent is sensitive and must not be able to be picked up by other apps. This excludes using broadcast and the onBind() function if I understand things correctly? So the activity needs to send some string ...

ProgressDialog doesn't show up until it's too late.

I'm writing an Activity which fetches some XML from the web via HTTP and then parses it into a DOM. It then pulls some required data from the DOM. As you can imagine, this takes a few moments, so I put that code into it's own thread and then tried to set up a ProgressDialog to display while the user is waiting for that to complete. Th...

Confused about Bitmap scaling when supporting different resolutions in Android

I'm confused about how to write resolution independent code for an Android game and I'm looking for some concise tips and guidelines as I'm never sure what to do about the multiple versions of Android. Here's what I specifically want to do: I want to load a 100x100 pixel .png file into a Bitmap object. When the bitmap it loaded, I want...

How to: Open the AndroidManifest.xml file and add the following as a child of the <application> element?

how can I do the step above? I'm trying to the the tutorial http://developer.android.com/resources/tutorials/views/hello-mapview.html "HelloMapView" and they reccomend to Open the AndroidManifest.xml file and add the following as a child of the <application> element: <uses-library android:name="com.google.android.maps" />. how does th...

issue with program flow when rotating device with two activities

My first activity is creating a second activity within its onCreate: if (userName == null || password == null) { if (!getUserNameAndPassword() ) { // User is launching this for the first time Intent explicitIntent = new Intent(CreateSessionAlert.this,CreateUserNameAndPassword.class);<br> startActivityForResu...

Developing for Android - Marketshare, Device support.

I'm about to start developing an App for Android and I was wondering what the marketshare of various devices, by OS was. Do a majority of Android phones fall under 2.1+? Or should I look to support 1.5/1.6 too? Also, Blackberry has a really neat list of all the devices under each OS version, with their screen resolutions and other tech ...

Is there a easier way of running an android application using the eclipse emulator?

I am trying to write an android application and my workflow is as follows: Write some code Click run as Android Application Eclipse then starts the android emulator Install the app on the emulator Run it It seems to me that there is no need for it to start an android emulator(3) each time and to kill it. It'd be nice if there was a w...

How to get a response from a https server using android sdk?

I have a problem of ssl exception when i upload data to a https server. It uploaded the data to the server correctly but when i get the response after uploading it throws an exception of ssl certificate is not trusted. I'm using the SAX parser for parsing xml file and i am using httppost method(). ...

How to launch an application from a contact in Android?

I would like to write an application which would be launched from the Contacts list in the phone. That is, you choose a contact using the normal contacts application, and where you can dial to the contact, send an Email or SMS, you can also launch my application with this contact's activity. How can this be done? ...

Get an error excalmation mark every time I create a new android project

Hi all, I’m new to android development and haven’t made much progress. Whenever I create a new android application I get a red exclamation by its file in the package explorer. Also when I go to the open the string.xml file and try to edit anything there I keep getting an error message Java.Lang.NullPointerException. I heard that using t...

ListView equivalent to iPhone table default table cell

Is there an equivalent view structure to the iPhone default table cell? The default table cell formats an image (icon) and text in a nice looking way. Are there suggested equivalents for Android? Is there a sample somewhere? Thanks ...

Dynamic Appending of Views and crashing

Hey everyone, again! Having another issue, and this one is BAFFLING! Here we go. We have a layout... <?xml version="1.0" encoding="utf-8"?> <!-- Template for creating a result in MediaUpload --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_heigh...

getting android source for android.hardware.Camera

I have been trying to find the source for Android's Camera class so that I can examine how it calls the drivers that it is supposed to interface with. The API that android provides is insufficient for my purposes, and I am hoping to be able bypass that API. However, I am having trouble finding any documentation, and am resorting to acces...

How to prevent that the keyboard hides my EditText?

I have a RelativeLayout at the top, then below i have a ListView in the center and finally at the bottom i have another relativeLayout with an EditText and a Button inside. I want the ListView to resize when I click on the EditText and the IME(virtual keyboard) appears. If i put adjustResize in the manifest, the Listview is resized to ...

Handling RunTimeExceptions of a class

I have a class that extends Application which has a lot of methods like: public User getUser(String name); public List<User> getFriends(User user); public List<Game> getGames(User user); which wraps a service class. The catch here is that no method will work if I have no internet on the device. So for instance I am doing: public Use...

ListView opening a Dialog (or alert dialog)

I'm trying to get my list view to open up an alert dialog to display information when a person clicks on a selection. I have been trying several different things on the Google Developers website that have to do with this but have yet to come up with a result. Here is my code. package table.periodic; import android.app.Activity; import...

Android Get list of files in a http (web) folder

In Android, is there a way to get a list of the zip files on a web server which allows file browsing? ...