[android-beginners] Re: Preventing input

2009-03-17 Thread frizzo
Never mind. Figured it out. EditText txtInput = (EditText) findViewById(R.id.txtInput); txtInput.addTextChangedListener(new TextWatcher() { public void afterTextChanged(Editable edt) { String temp = edt.toString();

[android-beginners] Preventing input

2009-03-17 Thread frizzo
I am trying to allow the user to enter a price (e.g. 3.99), so a number with a max of 2 decimal places. I am not quite sure how to pull this off. I've setup a KeyListener, but the OnKey event that it kicks off allows listeners to get a chance to respond before the target view. As a result, I do

[android-beginners] Re: Question about onSensorChanged Listener

2009-03-17 Thread gganesh
On Mar 18, 10:27 am, ganesh kumar wrote: > hi Frank thanks for your reply > I wrote >  private static final float GRAVITY_EARTH = 9.8f; >  public void onSensorChanged(int sensor, float[] values){ >  if( sensor == SensorManager.SENSOR_ACCELEROMETER){ >            float accel_mag = > (values[0]*v

[android-beginners] Re: Question about onSensorChanged Listener

2009-03-17 Thread ganesh kumar
hi Frank thanks for your reply I wrote private static final float GRAVITY_EARTH = 9.8f; public void onSensorChanged(int sensor, float[] values){ if( sensor == SensorManager.SENSOR_ACCELEROMETER){ float accel_mag = (values[0]*values[0]+values[1]*values[1]+values[2]*values[2]);

[android-beginners] Solution To close Application in G1 or even Emulator

2009-03-17 Thread Ahmed Hammad
1- first of all you should download terminal emulator fro Android market http://www.android.com/market/ 2-run terminal emulator 3-just type ps (show all running process) e.g USER PID PPID VSIZE RSS WCHANPC NAME app_13295 23 119720 30612 afe0c824

[android-beginners] Interested in pinout of a cable that allows the g1 to use serial communication

2009-03-17 Thread xp_prg
Hi All, I am new to android development and the g1. I have received some help in figuring out how to use the serial interface to the g1 via android. My notes are here: https://noisebridge.net/wiki/Autonomous_Flying_Platform#Serial_Hardware_to_Interface_with_G1 Here is the actual cable: https

[android-beginners] eclipse is not talking to android

2009-03-17 Thread kelly
Hi all, I am beginner for andriod and more over I do not have a direct connectivity to Internet from my system, so once I installed android on my system and went to eclipse. Here is the steps that I followed. Eclipse 3.4 (Ganymede) 1. Start Eclipse, then select Help > Software Updates

[android-beginners] Re: No resource found

2009-03-17 Thread wjcs
Hi: You might want to try "string" instead of "strings" with the following line. android:text="@strings/main_title" BR wjcs On Tue, Mar 17, 2009 at 4:12 PM, g10re...@gmail.com wrote: > > i am trying to get my first program to run but it keeps saying no > resource found that matches the given na

[android-beginners] How to replicate android:editable="false" in code?

2009-03-17 Thread frizzo
I want to do this in Java code on a EditText widget. How do I do it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com T

[android-beginners] Re: Update view from thread

2009-03-17 Thread Will
I just learned threads, but running your code the logcat states: "Only the original thread that created a view hierarchy can touch its views." The thread that is changing what you want the TextView to show should pass a message back to your program's main thread (in this case, the one that contai

[android-beginners] Re: how to read specific part in a string

2009-03-17 Thread guruk
hi ralf, thanks for your answer. but also... your demo did not worked for me. You may try it yourself. thanks also for the links, will have a look. here now for all fellows, two routines that work - with regular tags.. if they have innertags or not - and a routine that looks specialy for innertag

[android-beginners] Notepadv1Solution Problem

2009-03-17 Thread MMC2
Thank you to Mike Garcia, Francois Stephany and Kacper86 I found and deleted the three files and the problem is solved. I can proceed again. Thanks again and all the best to everyone in these forums. MMC2 - Original Message - From: "Kacper86" To: "Android Beginners" Sent: Tuesday,

[android-beginners] Re: Activity is required

2009-03-17 Thread Will
Activities are only required for a program that is visible to the user. This page will provide a good overview: http://developer.android.com/guide/topics/fundamentals.html On Mar 17, 2:50 pm, Victor Perticarrari wrote: > Sorry for the empty email :) > > I'm new in Android development. And I wan

[android-beginners] Re: No resource found

2009-03-17 Thread Will
Change @strings to @string (you're referencing a specific type of resource, 'string') On Mar 17, 4:12 pm, "g10re...@gmail.com" wrote: > i am trying to get my first program to run but it keeps saying no > resource found that matches the given name strings/main_title" he is > what i have so far >

[android-beginners] Re: SQLite Exception

2009-03-17 Thread Will
You have a Cursor (not a database) somewhere that you haven't closed or called startManagingCursor on. Every Cursor creation should be followed by a startManagingCursor() or a .close(). Obviously don't close until you are done using it. On Mar 17, 1:40 pm, Joseph Arceneaux wrote: > Hello every

[android-beginners] Re: how to read specific part in a string

2009-03-17 Thread Ralf
I'd suggest to take that opportunity to learn on regexp and try a/ to understand what the one we gave you does and b/ how to modify it with your new requirement. Franky, regex are not that hard to come up with -- it is harder to read an existing one than to write one :-) I suggest the following

[android-beginners] Re: Android beginners

2009-03-17 Thread Rishi
I am new to this. I have just tried twice to post a question but it does not appear anywhere that I can find it. I have done the Hiullo World tutorial. Then I did the Notepadv1 tutorial but it came up with an error, and I can't work out what it is. When I load the Notepadv1Solution app, which is su

[android-beginners] real problem

2009-03-17 Thread willdeans
I believe that there may be a real problem here because I tried the URL several times and eventually it worked. If there was not a real problem it seems that it would always work or never work. I am moving on but hopefully someone will have time to resolve the underlying issue for others. --~--

[android-beginners] No resource found

2009-03-17 Thread g10re...@gmail.com
i am trying to get my first program to run but it keeps saying no resource found that matches the given name strings/main_title" he is what i have so far the strings folder looks like this Sudoku Android Sudoku Continue New Game About Exit please

[android-beginners] Re: Android beginners

2009-03-17 Thread Kacper86
it's a common problem. you have to delete these 3 files (on linux they are hidden) that are causing the problem and refresh your project. On 17 Mar, 23:42, "MMC2" wrote: > NOTEPADV1 > > To Mike Garcia or anyone else who can shed light onto my problem. > > I want to run the tutorial app Notepadv1

[android-beginners] Re: Android beginners

2009-03-17 Thread Francois Stephany
Hi, I had the same problem. Just delete the files that starts with ._**. in all the directories of the project, they are useless. On 17 mar, 23:42, "MMC2" wrote: > NOTEPADV1 > > To Mike Garcia or anyone else who can shed light onto my problem. > > I want to run the tutorial app Notepadv1Solut

[android-beginners] Re: Activity is required

2009-03-17 Thread Victor Perticarrari
Sorry for the empty email :) I'm new in Android development. And I want to know if for creating an application the Activity is required? Or we can create an application that is build only using services? Thanks in advance... Victor Emanuel 2009/3/17 Victor Perticarrari > Hi, > > -- > Victor E

[android-beginners] Run Android 1.5 VM in eclipse

2009-03-17 Thread Ming-Hsiu
Hi, there, I checked out the Android source codes and did "make sdk". I installed ADT 0.9.0, created the VM, and ran the emulator in Eclipse. The log is: ... ... [2009-03-17 17:25:16 - HelloAndroid] -- [2009-03-17 17:25:16 - HelloAndroid] Android Launch! [2009-03-17

[android-beginners] Update view from thread

2009-03-17 Thread Azarumga Zarumge
Hello I want to create a timer, which will show time left for the end of timer. There are several attempts, but every time I have different errors. Please, help me. Here is one of my attempts: import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.widg

[android-beginners] How to install made SDK into Eclipse

2009-03-17 Thread Ming-Hsiu
Hi, there, I followed the steps in "http://source.android.com/download"; to "make sdk". I want to install the made SDK into Eclipse but meet issues. I have to copy "android.jar" to SDK root directory; I have to copy "kernel-qemu" to .../images directory; I have to create a new VM; I have to build

[android-beginners] Activity is required

2009-03-17 Thread Victor Perticarrari
Hi, -- Victor Emanuel "God gave rock and roll to you Put it in the soul of everyone" --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@g

[android-beginners] MapView - findViewById returns null

2009-03-17 Thread Francois Stephany
Hi there, I'm new to Android development and encounter a small problem. I try to retrieve a MapView object in the onCreate method but findViewById always returns null. Here's the code: public class MySuperNiceActivity extends MapActivity { protected MapView mapView; /** Called when

[android-beginners] Re: how to read specific part in a string

2009-03-17 Thread guruk
I will try it... looks good :) i love this regex stuff, but still have no clue about.. haha but if it works.. respect.. can you also do something like sm1 (serge) that includes also attributes like: So i guess we need something like. takeit (OrgString, Tagstring, AltTag) like: takeit (myString,

[android-beginners] Re: Test on real phone

2009-03-17 Thread Mike Garcia
Glad we could point you in the right direction. On Tue, Mar 17, 2009 at 9:01 AM, BeWillDir wrote: > > Bingo. That's what I was missing. adb finds it now. Not using > eclipse. Thank you very much. > > On Mar 16, 8:50 pm, Mike Garcia wrote: > > >1. Login as root and create this file: > /e

[android-beginners] Re: Style Attributes

2009-03-17 Thread tinyang
Great, thanks! :)) _ From: android-beginners@googlegroups.com [mailto:android-beginn...@googlegroups.com] On Behalf Of ??? Sent: Monday, March 16, 2009 6:49 PM To: android-beginners@googlegroups.com Subject: [android-beginners] Re: Style Attributes in this case , MyView method is a co

[android-beginners] SQLite Exception

2009-03-17 Thread Joseph Arceneaux
Hello everyone, my application keeps throwing an Illegal State Exception at SQLiteCursor.finalize() line: 448. This is after I have finished my DB operations and called db.close(). It seems to happen very randomly, but frequently. Has anyone else seen this? I suspect it's an Android bug, but ti

[android-beginners] Re: Test on real phone

2009-03-17 Thread BeWillDir
Bingo. That's what I was missing. adb finds it now. Not using eclipse. Thank you very much. On Mar 16, 8:50 pm, Mike Garcia wrote: >    1. Login as root and create this file: /etc/udev/rules.d/50-android.rules. > >    For Gusty/Hardy, edit the file to read: >    SUBSYSTEM=="usb", SYSFS{idVe

[android-beginners] Re: Question about onSensorChanged Listener

2009-03-17 Thread Jordan Frank
Hi, I can only speak to question 2, but it seems like you'd want to also listen for the SENSOR_ACCELEROMETER data, and then look for values that are above a certain threshold, maybe something like: if (sensor == SensorManager.SENSOR_ACCELEROMETER) { float accel_mag = (values[0]*values[0]+valu

[android-beginners] Re: adb install vs. adb push

2009-03-17 Thread David Turner
they are not the same: - "adb push" just copies a file - "adb install" copies the file then launches the installer that will register your new package in the system (including checking permissions, registering supported intent filters, etc...) On Wed, Mar 4, 2009 at 9:53 PM, Kriston wrote: > >

[android-beginners] Re: Reactions of: public boolean onTrackballEvent(MotionEvent event)

2009-03-17 Thread cruiseru...@gmail.com
Does have anybody experience with using trackball? I try use trackball because DPAD emulation is not so good. But i have no actions_up from trackball. Thx for answers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "