android

Problem launching android AVM/SDK gui using the tools/android executable in the android SDK. Ubuntu 10.04, i686

Hi I just installed the android SDK along with Eclipse 3.5 on my i686 Thinkpad T60 running Ubuntu 10.04 (Lucid). (Eclipse was installed via synaptic, i.e. a package from the repository.) I installed the eclipse add on and everything on the Eclipse end seems fine. I also put the android-sdk tools directory on my user PATH. Now launchin...

detect where on the screen onTouchevent happened

Hey Guys, I've got an onTouchEvent boolean on a Surfaceview, I've got openGL objects drawn on the view and I'm wondering is there anyway to detect where on the screen the onTouch happened? e.g (x,y) co-ordinates. ...

Is it possible to swap XML layouts during runtime in Android?

Is it possible to load my main.xml layout file in onCreate() and then later in the app, switch to a new XML layout? I've tried placing setContentView() later on in the app but that seems to not actually set the new View because my references to objects in the newly set xml layout file are returning as null. I've tried doing some layout...

How can I animate a view in Android and have it stay in the new position/size?

I currently have a view in my Android app and the view is playing a frame animation. I want to animate the view to increase its size to 150%. When I apply a scale animation to it, and the scale animation is completed, I want the view to stay at that new size for the rest of the activities life cycle. Unfortunately right now when the s...

Localize Android DatePickerDialog

Is it possible to configure android.app.DatePickerDialog so that it is localized for the European format easily (exchange day and month and exchange the english button names with localized ones) ? ...

Android TableRow - How to add View dynamically to certain postion?

Hello, friends! I'm constructing TableLayout dynamically. And I need TableRow has a gap in certain column position. For example, I need row has ImageView on 3 and 5 position, next row has ImageView on 1, 2, 4 position. I try to use: TableRow row1 = new TableRow(this); row1.addView(new ImageView(this), 2); row1.addView(ne...

Uploading Image using InputStreams = Out Of Memory error

I am trying to upload an image but I am getting some out of memory errors if the image file is over ~2 megs on an Android device. File file = new File(<my image file>); FileInputStream fis = new FileInputStream(file); HttpClient client = new HttpClient(); PutMethod method = new PutMethod(myUrl); RequestEntity requestEntity = new Input...

Disabling or hiding controls design guideline?

I have checked the design guidelines from the Android developers recently and found the recommendation to use at least 4 states for interactive ui elements. default, disabled, focused, pressed see http://www.slideshare.net/AndroidDev/android-ui-design-tips, slide 13 On the other hand in slide 10 it is said to make the right things vis...

custom draw android scrollview

i am trying to do a custom view in android. i want to draw a image on top and then down to that rest of the screen a scrollable draw text. thats why i did a xml layout and the custom view inside a scrollview beneath imageview but for some reason the ondraw is not called. if i do setContentlayout(new CustomView(this)), it calls onDraw b...

Getting resized images inside Android buttons

Hi I want to design a TableLayout with some big buttons with icon and text embbeded. I have found some similar question but not the same 1. My simplified XML layout is: <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_pa...

need a specific JS framework to support all mobile os

Hi, I am going to transform my website to mobile phone supported. My website consists of lots of java script and ajax stuffs so looked for a specific JS framework to support all the mobile os (android,ios,windows and blackberry).I googled and found some frame works like phonegap, sencha touch,JQTouch and appcelerator titanium. Can you p...

creating bounding box around openGL objects

Hey Guys, I've created an openGL square like so.. final float array1[] = new float[] { //Front face lx, ly, hz, lx, hy, hz, hx, ly, hz, hx, hy, hz }; I've also got a Ray. I'd now like to put bounding boxes around every square I draw so that I can check if th...

How can I construct the Contact application title bar

In android 2.0 Contact application, under the 'Favorites' tab, there is a 'Frequently contacted' title bar. Can you please tell me how can I construct that myself? I would like what is the font size, font color , back ground color that they use. ...

Stack trace bug aggregation software

I develop mobile applications for a variety of platforms, notably iPhone and Android. Each of these applications has a way to "phone home" with fatal crash stack traces. Up to now, we've been inspecting these by hand as needed. What I'm looking for is a piece of software that can somewhat accurately "aggregate" or "coalesce" all these...

Android : References to a Context and memory leaks

I've read that it is a mistake and a source of memory leaks in Android application to keep a long-lived references to a Context. But I don't understand if it is ok to create an class that looks like this one: public class HelperClass { private Context context; public HelperClass(Context context) { this.context = contex...

Android: ListView fixed height of child view

Hello everybody Please advice how to set fixed heigh (in dip) for the child view of ListView component? I am using relative layout as root layout for the child view when I set backgoround image to relative layout it becomes very height (maybe because backgoround picture is large) and I want to set precisely the height in dp. ...

H2 Database vs SQLite on Android

Because of the lack of Unicode support on the embedded SQLite database in Android I am mostly interested in performance and stability of H2 Database vs Android SQLite Are you guys using it? Should I be aware of any H2 database shortcomings? ...

use an Android GestureOverlayView seperate from the game thread execution?

Hi I have a gesture activity class that listens out for when a gesture is performed on screen, which is connected to a GestureOverlayView which covers the entire screen. I have a main game thread DistractionsThread that is launched from the Distractions menu file. The thread deals with the physics and do draw methods that play the game ...

Android Widget onReceive can't call Service class?

Hi, I have a widgetProvider . I also have a service class that does the calculation for the widget. The widget runs fine when initialized. I'm getting an error when I try to call the service from within the onReceive method after a broadcast event that I want to react on (time change). How can I update the widget from onReceive after ...

Starting with Android: Java or Python (SL4A)

I just ordered an Android smartphone and want to start playing around with creating my own applications. Now the question is which language to use, the native Java or Python using SL4A (former ASE). I tend to Python, as I know it much better than Java, but I'm wondering what I would be missing using a "second class" language on Android....