android

Splitting the homepage screen to two screens

Hi, I'm new to Android. As a learning case, I'd likr to build a software which divide the homepage screen to two screens. The upper screen will displays an updated whether data of a pre selected city, actually, airport. and the lower screen will display the regular homepage screen. How it can be done? Thanks, Eyal. ...

Android Scroll Pagination

Is there something for the Android OS with which you can implement scroll pagination? *Edit With scroll pagination I mean pagination like on the homescreen, you can swipe right and left and go to the next or previous page. ...

Android ListView Headers

How do you make those standard header labels in the ListView Control? An example would be in the contacts application you see the first letter of the grouped contacts for each letter in the alphabet. If possible please provide some code snippets on how to construct the grouped data and the display of the ListView. ...

OnClickListener - x,y location of event?

Hi, I have a custom view derived from View. I'd like to be notified when the view is clicked, and the x,y location of where the click happened. Same for long-clicks. Looks like to do this, I need to override onTouchEvent(). Is there no way to get the x,y location of the event from an OnClickListener instead though? If not, what's a g...

Audio recording NullPointerException

Hello All! I've seen several examples of this but they seem to be for older versions of the SDK. I'm trying to setup basic audio recording and the following code is giving me a NullPointerException when targeting version 2.0 of the SDK. ContentValues values = new ContentValues(2); values.put(MediaStore.MediaColumns.TITLE, "somename"); ...

android: how to resize dialog

Hi, I would like to create a dialog-style form which would fill the bigger screen area (left, right, top, bottom padding 10px). I defined the style "CupCakeDialog" the following way: <style name="CupcakeDialog" parent="android:Theme.Dialog"> <item name="android:windowAnimationStyle">@null</item> </style> and by running the activ...

How to get cell service signal strength in Android?

I am trying to write a very simple Android application that checks the signal strength of the current cell. So far, I have only found something called getNeighboringCellInfo(), but I'm not really sure if that includes the current cell. How do I get the CURRENT cell signal strength in Android? Does getNeighborCellInfo() get the current...

Android - what busy marker for individual rows in ListView

I have android application with ListView, where each row has own "refresh" button. Refreshing content is based on asynchronous http call, so until it completes (or timeout) I'd like to display some kind of graphical "busy" marker in each affected (clicked) row. What is best practice to do it? I see animated gifs - i.e. ones with rotating...

Scroll a Gallery widget?

Hi, I'm using a Gallery widget. I'd like to automate scrolling. Not sure if this is possible? Gallery has a scrollTo() and scrollBy() set of methods, which I can call from a timer etc, but that ends up scrolling the entire gallery widget itself, not its children view content. There must be some way to automate scrolling? Thanks ...

onKeyListener not working with soft keyboard (Android)

I am using onKeyListener to get the onKey events. It works fine with the normal keyboard. But it does not work with soft keyboard. I am only able to get onKey events for numerics and not alphabets. Is there any workaround to solve this? Any kind of help will be greatly appreciated. ...

Refresh ArrayAdapter dynamically

I have an Activity with an AutoComplete box on it. Whenever the text changes, I want to call a web service and populate the ArrayAdapter with the new String[] returned. This part all works great, except the list in the UI isn't being refreshed when there are all new values in String[] schools. The original list populated in my onCreate a...

Is there a simple example of the PopupWindow class using Android v2.0?

I looked online and was not able to find a working example of the PopupWindow class. The code examples I found online either compile but do not work, or are using methods which have since been removed (such as Activity.getViewInflate()). Is there a simple working example that displays a PopupWindow? ...

get text from web page as String

I've got my own implementation of this wrapped up in a function that takes a URL argument but I can't help thinking there must be a nice function that does this already within the Android API. Does such a function exist? EDIT: Oops. I would just like the text - not the HTML. ...

Android 2D opengl line circle

I am new to open gl, and have been trying to do some basic 2d openGL in android. I am able to set up my 2D view, and draw squares and triangles. I am trying to draw a circle and am not exactly sure how to do it. I have found several techniques while searching, one using triangles rotated around the center w/ the given radius, this wil...

Can I tweak my android emulator to make it fast?

Hi, I am using the android emulator to run my programs. But its really slow. It takes around 90 seconds to startup and show the home screen. Can I tweak it so that I can reduce this time considerably? Thanks ...

ListActivity throws NullPointerException

Hey guys i have a ListActivity... a very simple at that... and it keeps throwing NullPointer Exception though i have done it exactly as the Sample List7 except that i have used the Layout inflater... below is the code... Can u plz comment the error i have done here?? import java.util.Vector; import android.app.Activity; import android....

Android removing newline characters

TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter('\n'); splitter.setString(tweetMessage); tweetMessage = ""; for (String s : splitter) { Log.v(getClass().getSimpleName(), "Spliter :: "+ s); tweetMessage +=s; } But this shows up the newline characters as Squares how do I get Rid of that ...

How to do HTTP authentication in android?

I am checking out the class org.apache.http.auth. Any more reference or example if anyone has? ...

Access or Display comments left by users abt the application.

Hi, i am new to android domain . Can u please let me know . is it possible to access or display comments left by users about the application using the api given in the sdk if 'yes' please fwd link where i can study further .. thanks regards Sheik ...

Complete guide to pass credentials to a server via HTTP auth and getting response back.

Hi, So we know how to do http get and post connections. http://exampledepot.com/egs/java.net/pkg.html And we want to pass credentials(uname,passwd) to any web server to access the url or get the response. And we can't pass it as post parameters. So have a look @ this very simple code which does it all. ...