android

Home screen widget size for large screen or hdpi?

From Android widget screen guidelines, http://developer.android.com/guide/practices/ui_guidelines/widget_design.html, we know that, home screen has 4*4 cells, and in portrait orientation, each cell is 80 pixels wide by 100 pixels tall. I think these are for baseline HVGA screen. How about for large screens and hdpi screens, do they sti...

Randomly view Image and sound

I am new in android and using eclipse. How can I Randomly view an image (images are saved in res/drawable) and the sound that belong that image (sounds are saved in res/raw). Thank you. ...

Android unit testing & using a different database file

I'm trying to start unit testing on my application (should have done so from the beginning). I've got an Eclipse project structure set up and everything seems to work well, but... I'm subclassing SQLiteOpenHelper to access the application database. This works well for the application, but when using the same class in the unit tests, it ...

Why is my launcher icon smaller when placed on the Android desktop?

I have an application built for 1.5 and I am adding higher resolution drawables to support hdpi devices in 1.6 and above. My original application icon is 48x48. I created a second launcher icon that is 72x72 and placed it in a res/drawable-hdpi/ directory. When I install the application on my Nexus One the icon looks good when I vie...

Android - hilight text and copy

Hi, Is it possible to hilight part of a text and copy in Android? It's kinda like how in iPhone, when you hold a text for sometime, the box will show up and you can copy then paste that somewhere? Thanks, Tee ...

Do all widgets in an Android layout file require layout_width and layout_height ?

I have a ListView composed of LinearLayouts. Inside each is an ImageView, TextView and another ImageView laid out horizontally: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_hei...

Profiling Android Native Code: "undefined reference to `mcount'" and "warning: -ffunction-sections disabled; it makes profiling impossible"

I was able to get profiling information for native code. 67.5%-75% of my time is spent in one (unknown) block, so to get more information, I went back to recompile the native libraries. I added -ggdb and -pg to my flags, then attempted recompilation. This gave me a "warning: -ffunction-sections disabled; it makes profiling impossible"...

My ListView backgrounds go black during scrolling - how to fix?

Ive specified white backgrounds for pretty much all widgets and it works, except when scrolling. The background container goes black during scrolling resulting in annoying flickering. ...

How do I create a pull-down/up window in Android GUI?

For Android GUI: I would like to create a window that I can pull up from the bottom of another window, kind of like the Notification bar or the tab in the bottom on Spotify for Android. I want to be able to grab a small piece of the window and pull it up. Or just click it and it will "pop up". And afterwards be able to pull or click it ...

android: which view should I use for showing text and image?

My app shows a list of items, where each line is an item title with its image asides, the line reserves 70% of space for text and 30% for image. Imagine what iphone app store looks like. Which view/layout combo is recommended for this purpose? I googled and find this article: http://www.curious-creature.org/2009/02/22/android-layout-tr...

android java, is it possible to add admob to a preferencesActivity? if so can someone plz give an example? thanks

android java, is it possible to add admob to a preferencesActivity? if so can someone plz give an example? thanks ...

How to use ColorDrawable with ImageView?

Hi, I have a layout with an ImageView defined like: <ImageView android:layout_width="45dip" android:layout_height="45dip" android:scaleType="fitXY" /> now I just want to set the imageview to be a static color, like red or green. I'm trying: ColorDrawable cd = new ColorDrawable("FF0000"); cd.setAlpha(255); ImageView iv = ...; i...

Create a listing of changed files/directories/etc. using git between two tags

I need to generate a changelog of sorts between two Tags within a project controlled using git. Specifically the android source code. This list should include any files/directories/etc which have been edited, moved, renamed, deleted, created. Any help would be great. and if you have a way to do this over the entire android source at once...

Get information about AutocompleteTextView from resulting AutoCompleteTextView$DropDownListView

I'm using 3 AutocompleteTextViews to suggest entries from a database. I subclassed AutocompleteTextView to handle setting the default text to null when clicked and setting back to the default instructions if moved away and nothing is entered. I was using a SimpleCursorAdapter to bind to the view, but I discovered that there was no way I...

Show elapsed time since pressing a button in Android

Hi, I want to be able to show the elapsed time in a textview or Chronometer held in a "Statistics" class since pressing a button located in another class. What would be the easiest way to implement this?. Thanks ...

File Translator to Export Animated 3D Character from Autodesk Maya as Quake MD2

I'm wondering if anyone knows of a way to export geometry/textures for a rigged, animated character as Quake MD2? I’m developing an app for mobile devices, and I’ve found that MD2 works great for lightweight OpenGL rendering. I have several animated characters, and I’d like to export them as MD2 from Maya. Here are some of the things I h...

Could be conflict due to two service intents to the same service?

I just wonder whether there will be any conflict if two service intents are sent to the same service at the same time. My code is as below: public static class UpdateService extends Service { @Override public void onStart(Intent intent, int startId) { int widgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID...

ActivityGroup start 3rd party Activity.

Hi guys, I'm trying to make an ActivityGroup which has it's own interface, which should be persistent between Activities. I have it working for my own Activities. But when I try to launch a 3rd party activity (from it's Intent{action="ACTION_HOME", category="CATEGORY_LAUNCHER"}) I get a java.lang.SecurityException because the Activit...

Using Android SAXParser, one my my XML Elements is mysteriously breaking in half.

And its not '&' Im using the SAXParser object do parse the actual XML. This is normally done by passing a URL to the XMLReader.Parse method. Because my XML is coming from a POST request to a webservice, I am saving that result as a String and then employing StringReader / InputSource to feed this string back to the XMLReader.Parse meth...

How to implement profiles in an Android application?

I'm coding an app that uses configurable profiles for different user preferences: many different users will use the same app on the same device. The problem is that I can't use Android's PreferenceActivity because it just support one user per application. Is there an easy way to generate the user interface for configuration, or I hav...