android

Can you provide a hint to a mobile device that an HTML input field is numeric-only?

I've been doing some usability testing on a website I'm developing, using an Android phone and an iPod touch. In both cases, when entering a numeric field (time, distance in metres, etc) I have to take a manual step to change the keyboard layout to show digits. As the app will only accept numeric values in the textbox, I'd like to save...

WebView as a Live Wallpaper?

Is there a way to set a WebView as a Live Wallpaper? Any links/hints greatly appreciated! Thanks! ...

Captivate - framework issue

Hi All, I am a Android developer need quick help on a strange issue with Samsung Captivate. I use android:windowSoftInputMode="adjustPan" for an activity which has a list of EditText in it. The page can expand by adding more EditText views, when it grows long and onFocus of last field soft keyboard pops up and the activity doesn't comple...

Repeated calls to glVertexPointer and glDraw

I'm using OpenGL ES on Android to draw some shapes, so I have some Model classes to load the vertices etc from an .obj file. Each model then has a onDrawFrame() method which is called by the Renderer to place it in the scene. public void onDrawFrame(GL10 gl) { gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glEnable(GL10.GL_CU...

Hello Gallery taking all of the screen ?

I have a working Android Hello Gallery from the Dev tutorial but yet it is the only thing that is displayed on my screen, looking at my XML below, the imageview wont show up, it must be offscreen. The only thing I changed in the original java code was these sizes.. i.setLayoutParams(new Gallery.LayoutParams(250, 200)); ...

Columns in ListView Android

How can I make columns in Android ListView? I have this list item layout xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal"> <TextView android:layout_weight...

Where should I store my widget's preferences on the Configuration page on Android?

Hi all, ^Question^ I think that it would be too complex to open a database. Does using shared preferences make my app's data size become big. Is there a temporary storage place for my data or should I delete the data in the shared preferences for that widget. Short code samples are very appreciated :) Thank you ...

Show version info only once on application start in Android App

I´d like to show a simple information dialog with an Ok-Button, about whats new in this version, but it should show only at the first start. Whats the best way to implement this ? ...

Find the place where application crashed

How to find out line of code where application failed in Android? (without debugging just to see crash dump) ...

Twitter4J exception on verifyCredentials

Hello All, I am creating an Android app that uses Twitter4J to read some user info. This was all working fine, but this evening when I start the app and the user logs on to Twitter I get an exception: Twitter twitter = new TwitterFactory().getInstance(twitterID,twitterPassword); u = twitter.verifyCredentials(); This throws t...

AutocompleteTextview and CompletionHintView

Hi, i'm currently implementing an autocomplete field by using the AutocompleteTextView component. I'm trying to add a completion hint with the number of result, and just want to style it differently from the dropdown list element. There is an attribute named "completionHintView" on the component, but everytime i give it a layout i previo...

ViewText in Android

Do I need to create a new activity to view text written in a text box? For example, I want to see - "Hello"+ text written in a text box. Thanks. ...

Updating CursorAdapters

When my Activity resumes, I query for a Cursor (by calling managedQuery to retrieve a Cursor pointing at my database using a ContentProvider), call startManagingCursor, instantiate a new CursorAdapter, and setListAdapter to my new CursorAdapter. Suppose, at some later point, I launch some thread that hits a web service to query for new ...

Android Voice Recognition API Question

I am developing an app that requires the voice recognition to stay active for an entire minute. Upon reviewing the docs, I discovered "SPEECH_INPUT_MINIMUM_LENGTH_MILLIS" added to 2.2. However Google's default voice recognition service doesn't seem to support it. Does anybody know a way that I could force voice recognition to last a ...

How to create a photo sharing activity?

How can I create a custom activity that can be chosen by the user via the share option when viewing the photo gallery? I have options like "Share with Facebook, Twitter, FlickR" etc. But I want to add my own option in there. i.e. Go to "Photos", then click the "Share" button. You will be presented with a bunch of share providers. What d...

Nested Android Views, static header view

To make my explanation shorter, I've made this "mockup" of what I'm trying to achieve. I'd like to create a reusable header, footer and a generic viewgroup that I can fill with whatever content is required. A ListActivity, GridView... etc. I've tried a few different approaches thus far with out any luck whatsoever. My first attempt wa...

Simple code I can add to onStop, to stop GPS activity?

Just like the title says, Is there a simple line of code I could add to onStop()that will simply stop any gps activity currently going on with my application? ...

Can one combine android resource strings into new strings?

Android allows to create aliases of resource strings like: <resources> <string name="foo">somestring</string> <string name="bar">@string/foo</string> </resources> by which the resource "bar" becomes an alias for the resource named "foo". What I would for my app is a possibility to combine an existing resource prefix with different ...

When i pressed the bt2 the system freez

When i press bt on the Player plays the song in a loop like normal. But when i pressed bt2 (Stop Button) the System Freez! Main Class: final Alarm alarm = new Alarm(); bt.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Alarm alarm = new Alarm(); ...

Removing items from a ListAdapter not working

@Override public boolean onContextItemSelected(MenuItem item) { if(item.getTitle()=="Remove"){ AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo(); quotesAdapter.remove(quotes.get((int)info.id)); quotesAdapter.notifyDataSetChanged(); listView.setAdapter(quotesAdapter); serializeQuotes(); } ...