[android-developers] How does the 3D objects get touch events?

2009-05-31 Thread quill

HI all,
I am writing a game using OPENGL, there are several 3D objects in my
surfaceview.
My question is:
Should each 3D object implement view in order to get touch events?
Or there is other way to do this?

Thank you!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ToggleButton - how to implement iPhone-style ToggleButton?

2009-05-31 Thread zhangxiyuan

Hi,

I think Android does not provide iPhone style toggle button?
Look at the picture below, when I just want to set ON|OFF for some
settings, I think the iPhone style and Android style ToggleButton are
both OK for me, but I have an application, I want to migrate it from
iPhone SDK -> Android Platform?

Can someone give me a hint about how to do that?

P.S:
Because the iPhone style ToggleButton has a slider in it, so it
supports drag&drop, Do I have to implement the TouchEvent listener?

Thanks.

iPhone style ToggleButton:
###OFF
ON
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: OpenGL

2009-05-31 Thread Nightwolf

I have no answer to your question. Just want to add that there are
other differences between emulator and real device - emulator works OK
with non power of two texture dimensions and supports drawing lines
with width more than 1.

On May 30, 12:13 am, Nilz  wrote:
> I have worked this out!
>
> So for anyone who's interested:
>
> When I removed gl.glEnableClientState(GL10.GL_COLOR_ARRAY); from the
> code, it started working on the device, as well as continuing to work
> on the emulator. When I put it back in we only get coloured shapes in
> the emulator, and not on the device.
>
> Does anyone know why there is this inconsistency? Is it a bug in the
> sdk? Or a lack of understanding on my part?
>
> Cheers,
> Nilz.
>
> On 26 May, 22:45, Nilz  wrote:
>
>
>
> > Hi There!
>
> > After spending the better half of this day getting my HTC Magic to
> > work in developer mode, I've now found that some of my frist openGL
> > coding attempts that appeared to work fine in the emulator doesn't
> > work as expected on the device. I've narrowed this down to glColorf(r,
> > g, b, a) not working as expected on the device itself. The provided
> > OpenGL samples do work though.
>
> > So for example, after modifying Cube.java from the samples to the
> > below code I find that I get the expected grey square on the emulator
> > but a blank white screen (background fill colour) on the device.
>
> > class Cube
> > {
> >     public Cube()
> >     {
> >         int one = 0x1;
> >         int vertices[] = {
> >                         -one, -one,
> >                         -one, one,
> >                         one, -one,
> >                         one, one,
> >         };
>
> >         // Buffers to be passed to gl*Pointer() functions
> >         // must be direct, i.e., they must be placed on the
> >         // native heap where the garbage collector cannot
> >         // move them.
> >         //
> >         // Buffers with multi-byte datatypes (e.g., short, int, float)
> >         // must have their byte order set to native order
>
> >         ByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length*4);
> >         vbb.order(ByteOrder.nativeOrder());
> >         mVertexBuffer = vbb.asIntBuffer();
> >         mVertexBuffer.put(vertices);
> >         mVertexBuffer.position(0);
> >     }
>
> >     public void draw(GL10 gl)
> >     {
> >         gl.glFrontFace(GL10.GL_CW);
> >         gl.glVertexPointer(2, gl.GL_FIXED, 0, mVertexBuffer);
> >         gl.glColor4f(0.5f, 0.5f, 0.5f, 0.5f);
> >         gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 4);
> >     }
>
> >     private IntBuffer   mVertexBuffer;
>
> > }
>
> > I'm using the latest 1.5 SDK, and my device is the HTC Magic running
> > firmware version 1.5.
>
> > Can anyone explain to me why when switching from colour buffers and
> > using glDrawElements to glColorf and glDrawArrays, stops shapes from
> > being coloured in?
>
> > Cheers,Nilz.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Accelerometer is cukoo???

2009-05-31 Thread youssef henry
i have the same problem, anyone can help?

On Fri, May 15, 2009 at 5:06 PM, doubleslash  wrote:

>
> This problem occurs only when activity is set explicitly to landscape
> in manifest. Anyway to make it work in landscape?
> Thanks
>
> On May 14, 10:16 pm, doubleslash  wrote:
> > I see an acceleration of -9 in the y-direction ( due to gravity, of
> > course). Now, keeping the phone fixed, not rotating the screen or
> > anything, I interrupt the app my pressing the call button and then
> > coming back, I see an acceleration of +9 in the x-direction. This
> > switching of the coordinates happens without onAccuracyChanged being
> > called, so how on Earth can we consistently use the accelerometer's
> > output?
> >
> > Please shed some light on this. Is this fixed in SDK 1.5?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Conversion to Davik failed with error 1

2009-05-31 Thread Francois

Hello all,

I am answering to myself here.

If I create a new 1.5 project it works. No more errors.
If I create a new 1.1 project it does not work, I get the error.

So I think there is definitively a bug in the 1.1 platform kit.

Hope this can help anyone facing the same problem!

Francois

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Accelerometer is cukoo???

2009-05-31 Thread youssef henry
i found a solution of this problem:
in the onSensorChanged function
public void onSensorChanged(int sensor, float[] values) {
/*
that is the normal code with have the problem
float x=values[0];
float y=values[1];
float z=values[2];
which 0,1,2 is the Accelerometer values based on the orientation and this
give an error some time in the landscape orientation
*/
/*
this is the correct code
*/
float tmpX=values[3];
float tmpY=values[4];
float z=values[5];
 /*
where 3,4,5 is the PORTRAIT screen orientation
so if u want to use it in the land scape orientation swap x and y
*/
float x = -1*tmpY;
float y = x;
}


On Sun, May 31, 2009 at 12:57 PM, youssef henry
wrote:

> i have the same problem, anyone can help?
>
>
> On Fri, May 15, 2009 at 5:06 PM, doubleslash wrote:
>
>>
>> This problem occurs only when activity is set explicitly to landscape
>> in manifest. Anyway to make it work in landscape?
>> Thanks
>>
>> On May 14, 10:16 pm, doubleslash  wrote:
>> > I see an acceleration of -9 in the y-direction ( due to gravity, of
>> > course). Now, keeping the phone fixed, not rotating the screen or
>> > anything, I interrupt the app my pressing the call button and then
>> > coming back, I see an acceleration of +9 in the x-direction. This
>> > switching of the coordinates happens without onAccuracyChanged being
>> > called, so how on Earth can we consistently use the accelerometer's
>> > output?
>> >
>> > Please shed some light on this. Is this fixed in SDK 1.5?
>> >>
>>
>
>
>
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Unable to set sd card parameter

2009-05-31 Thread hanged_man

As the title suggests, im unable to set the sd card parameter in
eclipse 3.4 for the emulator.
Field (Additional Emulator Command Line Options) in Run Configurations
is hidden for some no apparent reason as you can see in the attached
image below:


i've looked everywhere and couldn't find anyone else with the same
problme. Any advice ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Unable to set sd card parameter

2009-05-31 Thread hanged_man

It seems like adding external links is not allowed. Never mind that,
like i said before the field (Additional Emulator Command Line
Options) is hidden and im unable to set "sdcard" argument for the
emulator.

Please help me.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: sub-thread issue.

2009-05-31 Thread Mark Murphy

Gavin wrote:
>  Threre is a main thread A, and then it creats a sub-thread B. I
> want to know:
> 1) If main thread A exits or crashs,  thread B can continue
> running?

If thread A exits, thread B will continue running.

If an exception occurs in thread A, whether thread B continues running
depends on what catches that exception, and whether the process is
terminated as a result. Ideally, you catch your own exceptions, and as
such thread A and thread B will still be running.

> 2) if the upper question's anwser is yes, is there a method that A
> can notify B before A exits? How can B get A's state?

There are many ways to achieve your desired pattern, mostly involving
classes in java.util.concurrent.

For example:

-- You can use an AtomicBoolean to set a flag from thread A that thread
B monitors to know when to shut down

-- You can have thread B pull work off a LinkedBlockingQueue, with a
special "kill" piece of working telling thread B to close up

However, better than all of that is to switch to using Android 1.5's
AsyncTask, if possible, because you get all the benefits of background
threads without having to manage them yourself.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Need help for your Android OSS project? http://wiki.andmob.org/hado

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Dialog (built using AlertDialog.Builder) not complete when showing dialog in runOnUiThread

2009-05-31 Thread TjerkW

I have a game activity in which i have a dialog which is created in
the onCreateDialog method of the activity:

case VICTORY_DIALOG:

String[] items={"Next Level", "Play Again", 
"Exit"};

AlertDialog.Builder builder = new 
AlertDialog.Builder(this);
builder.setMessage("You won!")
.setCancelable(false)
.setItems(items, new 
DialogInterface.OnClickListener() {
public void onClick(DialogInterface 
dialog, int id) {
if(id==0) {

SpaceWarsActivity.this.nextLevel();
} else if(id==1) {

SpaceWarsActivity.this.loadGame();
} else if(id==2) {

SpaceWarsActivity.this.onFinishGame();
}
}
});
dialog=builder.create();
break;


When the game ends i open this dialog from the game thread (not the ui
thread) with the following code:

activity.runOnUiThread(new 
Runnable() {
public void run() {

activity.showDialog(VICTORY_DIALOG);
}
});

However... the dialog is just a small empty rectangle. No title, no
items, nothing!
The buttons (setPositiveButton,setNegativeButton,setNeutralButton) are
working though.

Wat am i doing wrong?

Thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: sub-thread issue.

2009-05-31 Thread TjerkW

I created a game which also requires a gameloop thread.
I communicate with the thread simply by using getters and setters.
But that requires that the other threads has a the new thread as a
member instance.

I use the AsyncTask for loading levels, not for the game loop.

On 31 mei, 06:59, Gavin  wrote:
> Hi,
>
>      I have some questions about threads.
>      Threre is a main thread A, and then it creats a sub-thread B. I
> want to know:
>     1) If main thread A exits or crashs,  thread B can continue
> running?
>     2) if the upper question's anwser is yes, is there a method that A
> can notify B before A exits? How can B get A's state?
>
>     thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Question about SMS processing

2009-05-31 Thread iloveblue

Hello Everyone:

I am doing a basic handling of the SMS, and I have complete the
functions of send and receive the SMS, but I want to do them better.

About receiving the SMS, I have some question, I have one Application
on the Android which I called MyApp, it has a broadcastReceiver
extended class which will handle while the SMS comes, and pickup some
"special" SMS which is used in MyApp, such as "SMSMYAPP:xx", then
I think it is useless to the system SMS receiver. And so I donot want
the system SMS receiver to get this SMS, and show the notification
about this comes. But I cannot find any useful information about donot
give the SMS to the system SMS receiver, I've tried abortBroadcast()
but it shows errors in Logcat.

Can anyone give some suggestion about this? Or just tell me it is
impossible to do this for some security questions? Thanks very much. I
have look for this for days. Any words could be help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Order MENU items

2009-05-31 Thread guruk

Hi, is there a way i can say 3 items in the top row and 1 icon in the
second row?

chris

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Order MENU items

2009-05-31 Thread Mark Murphy

guruk wrote:
> Hi, is there a way i can say 3 items in the top row and 1 icon in the
> second row?

Not that I am aware of.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How does the 3D objects get touch events?

2009-05-31 Thread Anton

Usually this is solved by having ray-object intersection code for
all of your geometry.  If your 3D objects are all polygon meshes then
you need ray-polygon intersection code.  You then generate a ray from
the eye point through the screen point that the user is touching.
This ray is then tested against all of your geometry to find the
closest hit.  That tells you what object was hit as well as where on
the object.  Of coarse, if your scene has many objects with lots of
polygons to test you will want to use some sort of spacial data
structure to speed up the hit testing.  However, since you only need
it to run at "human speeds" you can get away with doing a lot of hit
tests before you have to resort to acceleration structures.  One
simple thing to do is to hit test the objects bounding volumes
(spheres are particularly easy).  That lets you not test the
individual polygons in objects that fail the bounding volume test.  If
you have scripts for your objects that need to receive touch events
you can pass the event along to the object once you've determined
which object is hit.

-Anton

On May 31, 2:24 am, quill  wrote:
> HI all,
> I am writing a game using OPENGL, there are several 3D objects in my
> surfaceview.
> My question is:
> Should each 3D object implement view in order to get touch events?
> Or there is other way to do this?
>
> Thank you!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] problem with maps

2009-05-31 Thread Mike Lanin

Hi, guys!
I want to use MapActivity in my app, but in the line mapView =
(MapView) findViewById(R.id.mapView); the error "cannot cast from View
to mapView" occurs. I also tried to copy "Hello, mapView" example, but
it gives the same.
Does anyone have the same problem?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how convert bitmap to byte array?

2009-05-31 Thread Mike Lanin

thanks, it works

On 29 май, 19:44, Romain Guy  wrote:
> Hi,
>
> Use Bitmap.compress() and store the bitmap in PNG. That's what the
> Home screen does.
>
> On Fri, May 29, 2009 at 5:08 AM, Mike Lanin  wrote:
>
> > Hi, guys!
> > I want to store pictures from the internet in my data base as byte
> > arrays. I get the pictures as bitmaps, but can't find way to convert
> > it to byte array.
> > Thanks in advance.
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: PNG transparency and OpenGL ES

2009-05-31 Thread djp

There some nice tricks that you can do with a separated alpha. For
example, you can draw an object with certain parts opaque and other
parts accumulated without changing blending factors.

There is a similar problem on iPhone, but you can solve it by using a
custom PNG decoder. But so far I was unable to find any solution for
Android. It's not mentioned in the documentation either.

Still, there is a hope that I'm just missing something :) Any clue
from Android devs?

On May 31, 3:43 am, Anton  wrote:
>     No, I actually haven't been able to.  It threw me for a loop
> because I was expecting non-premultiplied because that's what the PNG
> spec says.  What do you want to do with non-premultiplied that you are
> having trouble doing with premultiplied?
>
>     -Anton
>
> On May 29, 4:40 am, djp  wrote:
>
> > I was wandering if you managed to load a RGBA texture without pre-
> > multiplied alpha.
>
> > I'm working with an assumption that every texture is alpha pre-
> > multiplied, because I was unable to load a RGBA texture without pre-
> > multiplication (on G1). I'd love to know if it's possible or not.
>
> > Thanks,
> > David
>
> > On May 28, 9:56 pm, Anton  wrote:
>
> > >     The ball.png that you reference above is 30x30 pixels.  As MrChaz
> > > said, you must use power of two sized bitmaps.  Otherwise the
> > > texImage2D function will not accept your texture.  It seems likely
> > > that that is what is going on here.  Also, this works in the 16 bits
> > > per pixel modes as well.  You don't need a separate alpha channel in
> > > your frame buffer to do alpha compositing, so a simple RGB454 frame
> > > buffer works, which is what you get if you use a SimpleEGLConfigChooser
> > > (false) to select your pixel format.  16bpp formats are twice as fast
> > > when it comes to rendering as 32bpp formats (if your fill rate
> > > limited, and if you're rendering a 2D game with sprites then you
> > > probably are).
>
> > >     Another word of caution, PNG files are supposed to (if you follow
> > > the spec) have non-premultiplied alpha channels.  But it seems that
> > > not many people actually follow the standard, and so you can find PNG
> > > files that do it either way.  If your PNG files are in fact using non-
> > > premultiplied alpha then the glBlendFunction should be
> > > (GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA).  If they use
> > > premultiplied alpha then it should be as MrChaz said (GL10.GL_ONE,
> > > GL10.GL_ONE_MINUS_SRC_ALPHA).  If you use the first and see dark halos
> > > around all of your sprites then you probably have premultiplied alpha
> > > PNGs.
>
> > >     As a side note, premultiplied alpha is better for a number of
> > > reasons.  It simplifies a number of compositing operations and treats
> > > all of the color and alpha channels in a uniform way.  It also allows
> > > for super-luminous pixels.
>
> > >     -Anton
>
> > > On May 27, 7:00 pm, Nate  wrote:
>
> > > > I am rendering this PNG with no transparency just 
> > > > fine:http://n4te.com/temp/test.png
> > > > However if I try to render this PNG (with transparency) with the exact
> > > > same code, I just get a white box:http://n4te.com/temp/ball.png
>
> > > > I am loading the PNG into a texture like this:
> > > > Bitmap bitmap = BitmapFactory.decodeStream(input);
> > > > int[] temp = new int[1];
> > > > gl.glGenTextures(1, temp, 0);
> > > > textureID = temp[0];
> > > > gl.glBindTexture(GL10.GL_TEXTURE_2D, textureID);
> > > > gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER,
> > > > GL10.GL_NEAREST);
> > > > gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER,
> > > > GL10.GL_NEAREST); // GL_LINEAR for quality.
> > > > gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
> > > > GL10.GL_CLAMP_TO_EDGE);
> > > > gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
> > > > GL10.GL_CLAMP_TO_EDGE);
> > > > GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
> > > > bitmap.recycle();
>
> > > > I am using this blending:
> > > > gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
>
> > > > How is it possible to render a PNG with transparency in OpenGL ES?
>
> > > > Thanks!
> > > > -Nate
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] orientation change handling on widgets

2009-05-31 Thread Michael Bollmann

some of the content in my widget is based on custom drawing routines.
is there any event i can listen for so i redraw and update this custom
area when the orientation changes?
currently my widget looks pretty screwed until the next widget update
is requested
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem with maps

2009-05-31 Thread Mark Murphy

Mike Lanin wrote:
> Hi, guys!
> I want to use MapActivity in my app, but in the line mapView =
> (MapView) findViewById(R.id.mapView); the error "cannot cast from View
> to mapView" occurs. I also tried to copy "Hello, mapView" example, but
> it gives the same.
> Does anyone have the same problem?

Do you have the  element in your manifest?

http://code.google.com/android/add-ons/google-apis/maps-overview.html#useslibrary

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] how make the ListView be above the button

2009-05-31 Thread Mike Lanin

I want to create layout like:
__
|   |
|Here|
|   scrolls  |
| the |
| ListView |
|  |
| |
|here is the   |
|   button  |
| |

But it shows me either only Button or only the List. What should I do
to make them be together?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem with maps

2009-05-31 Thread Mike Lanin

yes, I've added the  line into manifest, but the
error occurs in spite of it.

On 31 май, 18:44, Mark Murphy  wrote:
> Mike Lanin wrote:
> > Hi, guys!
> > I want to use MapActivity in my app, but in the line mapView =
> > (MapView) findViewById(R.id.mapView); the error "cannot cast from View
> > to mapView" occurs. I also tried to copy "Hello, mapView" example, but
> > it gives the same.
> > Does anyone have the same problem?
>
> Do you have the  element in your manifest?
>
> http://code.google.com/android/add-ons/google-apis/maps-overview.html...
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem with maps

2009-05-31 Thread Mark Murphy

Mike Lanin wrote:
> yes, I've added the  android:name="com.google.android.maps"/> line into manifest, but the
> error occurs in spite of it.

Could you post the layout you are trying to use?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how make the ListView be above the button

2009-05-31 Thread Mark Murphy

Mike Lanin wrote:
> I want to create layout like:
> __
> |   |
> |Here|
> |   scrolls  |
> | the |
> | ListView |
> |  |
> | |
> |here is the   |
> |   button  |
> | |
> 
> But it shows me either only Button or only the List. What should I do
> to make them be together?

If you are using LinearLayout, set android:layout_height="0px" and
android:layout_weight="1" on the ListView, and set
android:layout_height="wrap_content" on the Button. That will give the
Button enough space to show itself and give the ListView the rest of the
space.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Can I lock the scrolling of ListView ?

2009-05-31 Thread awwa

I want to lock the scrollBar of ListView.

I have tried to use some ways, but these all are not avairable.
- ListView.setEnable(false)
- implemented return false of areAllItemsEnabled() / isEnabled() of
Adapter.
- set to none attributes android:scrollbars of ListView of layout.xml

Does anyone know the solution for this?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can I lock the scrolling of ListView ?

2009-05-31 Thread Mark Murphy

awwa wrote:
> I want to lock the scrollBar of ListView.

What do you mean by this?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Development Wiki: http://wiki.andmob.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem with maps

2009-05-31 Thread Mike Lanin

I also can't even import com.google.android.maps.MapView.
Layout:

http://schemas.android.com/apk/res/
android"
android:id="@+id/main"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">






On 31 май, 18:58, Mark Murphy  wrote:
> Mike Lanin wrote:
> > yes, I've added the  > android:name="com.google.android.maps"/> line into manifest, but the
> > error occurs in spite of it.
>
> Could you post the layout you are trying to use?
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem with maps

2009-05-31 Thread Mark Murphy

Mike Lanin wrote:
> I also can't even import com.google.android.maps.MapView.
> Layout:
> 
> http://schemas.android.com/apk/res/
> android"
> android:id="@+id/main"
> android:orientation="vertical"
> android:layout_width="fill_parent"
> android:layout_height="fill_parent">
> 
>  android:id="@+id/mapview"
> android:layout_width="fill_parent"
> android:layout_height="fill_parent"
> android:clickable="true"
> android:apiKey="@string/maps_key"/>
> 
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:layout_alignParentBottom="true"
> android:layout_centerHorizontal="true"/>
> 

If you are on Android 1.5, check and make sure your project has the
proper target. If you are using Ant to build, you'll find a
default.properties file that should contain the line:

target=Google Inc.:Google APIs:3

I'm not sure what the equivalent is in Eclipse.

If you are targeting something else (e.g., 2), you won't have the Google
Maps add-on.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Development Wiki: http://wiki.andmob.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Dialog (built using AlertDialog.Builder) not complete when showing dialog in runOnUiThread

2009-05-31 Thread TjerkW
Ok i solved it myself.

I use setMessage together with setItems.. this does not work
One should use setTitle in stead of setMessage.

I think the builder show throw an exception if somebody uses
a illegal combination of parts (in my case: message + items)

Anyway its a small issue, but a nasty bug if you dont see it :-)

On 31 mei, 14:35, TjerkW  wrote:
> I have a game activity in which i have a dialog which is created in
> the onCreateDialog method of the activity:
>
>         case VICTORY_DIALOG:
>
>                                 String[] items={"Next Level", "Play Again", 
> "Exit"};
>
>                                 AlertDialog.Builder builder = new 
> AlertDialog.Builder(this);
>                                 builder.setMessage("You won!")
>                                 .setCancelable(false)
>                                 .setItems(items, new 
> DialogInterface.OnClickListener() {
>                                         public void onClick(DialogInterface 
> dialog, int id) {
>                                                 if(id==0) {
>                                                         
> SpaceWarsActivity.this.nextLevel();
>                                                 } else if(id==1) {
>                                                         
> SpaceWarsActivity.this.loadGame();
>                                                 } else if(id==2) {
>                                                         
> SpaceWarsActivity.this.onFinishGame();
>                                                 }
>                                         }
>                                 });
>                                 dialog=builder.create();
>                                 break;
>
> When the game ends i open this dialog from the game thread (not the ui
> thread) with the following code:
>
>                                                 activity.runOnUiThread(new 
> Runnable() {
>                                                         public void run() {
>                                                                 
> activity.showDialog(VICTORY_DIALOG);
>                                                         }
>                                                 });
>
> However... the dialog is just a small empty rectangle. No title, no
> items, nothing!
> The buttons (setPositiveButton,setNegativeButton,setNeutralButton) are
> working though.
>
> Wat am i doing wrong?
>
> Thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem with maps

2009-05-31 Thread Mike Lanin

I use 1.0 r2 sdk and Eclipse.

On 31 май, 19:16, Mark Murphy  wrote:
> Mike Lanin wrote:
> > I also can't even import com.google.android.maps.MapView.
> > Layout:
> > 
> > http://schemas.android.com/apk/res/
> > android"
> >     android:id="@+id/main"
> >     android:orientation="vertical"
> >     android:layout_width="fill_parent"
> >     android:layout_height="fill_parent">
>
> >      >         android:id="@+id/mapview"
> >         android:layout_width="fill_parent"
> >         android:layout_height="fill_parent"
> >         android:clickable="true"
> >         android:apiKey="@string/maps_key"/>
>
> >      >         android:layout_width="wrap_content"
> >         android:layout_height="wrap_content"
> >         android:layout_alignParentBottom="true"
> >         android:layout_centerHorizontal="true"/>
> > 
>
> If you are on Android 1.5, check and make sure your project has the
> proper target. If you are using Ant to build, you'll find a
> default.properties file that should contain the line:
>
> target=Google Inc.:Google APIs:3
>
> I'm not sure what the equivalent is in Eclipse.
>
> If you are targeting something else (e.g., 2), you won't have the Google
> Maps add-on.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problem with maps

2009-05-31 Thread Mark Murphy

Mike Lanin wrote:
> I use 1.0 r2 sdk and Eclipse.

1.0r2?

That's three SDK releases ago (1.1r1, 1.5r1, 1.5r2), and my memory is
fuzzy on the details of getting maps to work back then, so I'm not going
to be a ton of help.

Sorry!

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Development Wiki: http://wiki.andmob.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView in the 1.5 SDK

2009-05-31 Thread wefi.andr...@gmail.com

No good news here. We see the exact same problem with any link we try.

Opened a bug with google on this one.

Good luck, we are searching for ways around it as well!

On May 11, 6:32 pm, "daniel.benedykt" 
wrote:
> I am having the same problem on1.5
> Does anyone have a solution for this?
>
> Thanks
>
> Daniel
>
> On Apr 28, 2:29 pm, Kenn Min Chong  wrote:
>
> > Hi Richard!
> >    I'm getting this same issue too. Prior to1.5, theWebViewobject
> > will display the page within the same view. Now with1.5, for some
> > sites, the app will open up a new view and basically open the page
> > there instead. Pressing the "back" button will move the view back to
> > the main app view. Is there a way to have it display on the main app
> > view/window everytime?
>
> > Kenn.
>
> > On Apr 22, 12:50 pm, jarkman  wrote:
>
> > > That's a relief - thanks!
>
> > > Do you know anything about changes inwebViewfor1.5which might
> > > explain the non-appearance of the content ?
>
> > > Thanks,
>
> > > Richard
>
> > > On Apr 22, 5:13 pm, Mike Hearn  wrote:
>
> > > > It's not deprecated, it's a bug in the droiddoc tool - deprecating a
> > > > class marks all its subclasses as deprecated too, which doesn't make
> > > > sense. I fixed this bug in the public tree some months ago, but it
> > > > appears the fix did not propagate to Googles internal tree.
>
> > > > Ignore it.WebViewis not deprecated.
>
> > > > On Apr 22, 5:01 pm, jarkman  wrote:
>
> > > > > We're porting our apps to the1.5preview SDK. That has mostly been
> > > > > prettty painless, but we do have aWebViewwhich is not showing any
> > > > > content, for reasons which are currently unknown.
>
> > > > > Looking in the1.5SDK docs, I see thatWebViewis deprecated. The
> > > > > recommendation there is to use a FrameLayout, RelativeLayout, or a
> > > > > custom layout instead.
>
> > > > > I don't understand that recommendation, since FrameLayout and
> > > > > RelativeLayout don't do the thing thatWebViewdoes best - showing a
> > > > > bunch of HTML content pulled down from our server at runtime.
>
> > > > > So, what am I missing ? CanWebViewreally be simulated with a
> > > > > FrameLayout ?
>
> > > > > Thanks,
>
> > > > > Richard
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How does the 3D objects get touch events?

2009-05-31 Thread quill

hi Anton, is there some example code to refer to?

On 5月31日, 下午10时35分, Anton  wrote:
> Usually this is solved by having ray-object intersection code for
> all of your geometry.  If your 3D objects are all polygon meshes then
> you need ray-polygon intersection code.  You then generate a ray from
> the eye point through the screen point that the user is touching.
> This ray is then tested against all of your geometry to find the
> closest hit.  That tells you what object was hit as well as where on
> the object.  Of coarse, if your scene has many objects with lots of
> polygons to test you will want to use some sort of spacial data
> structure to speed up the hit testing.  However, since you only need
> it to run at "human speeds" you can get away with doing a lot of hit
> tests before you have to resort to acceleration structures.  One
> simple thing to do is to hit test the objects bounding volumes
> (spheres are particularly easy).  That lets you not test the
> individual polygons in objects that fail the bounding volume test.  If
> you have scripts for your objects that need to receive touch events
> you can pass the event along to the object once you've determined
> which object is hit.
>
> -Anton
>
> On May 31, 2:24 am, quill  wrote:
>
> > HI all,
> > I am writing a game using OPENGL, there are several 3D objects in my
> > surfaceview.
> > My question is:
> > Should each 3D object implement view in order to get touch events?
> > Or there is other way to do this?
>
> > Thank you!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView in the 1.5 SDK

2009-05-31 Thread Mark Murphy

wefi.andr...@gmail.com wrote:
> No good news here. We see the exact same problem with any link we try.

If I understand the issue correctly, Android has always behaved this way.

Links in WebView, by default, open up the Browser application (more
accurately, they call startActivity() on an Intent with an http://
scheme, which usually results in the Browser opening on the URL). If you
want to prevent that, you need to use WebViewClient and
shouldOverrideUrlLoading(). That behavior has existed since at least
Android M5 (last summer).

If I am misunderstanding the issue, I apologize.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Development Wiki: http://wiki.andmob.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Network Connection Status Handling!

2009-05-31 Thread biAji

On May 27, 12:49 pm, Prince  wrote:
>          
>                  android:name="android.net.conn.CONNECTIVITY_CHANGE" />
>             
>             

It seemed there is no such a thing
"android.net.conn.CONNECTIVITY_CHANGE", only
"android.net.conn.BACKGROUND_DATA_SETTING_CHANGED" aviliable in SDK
1.5 .

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how make the ListView be above the button

2009-05-31 Thread Mike Lanin

It shows me only button on top and no ListView

On 31 май, 19:00, Mark Murphy  wrote:
> Mike Lanin wrote:
> > I want to create layout like:
> > __
> > |                       |
> > |        Here        |
> > |       scrolls      |
> > |         the         |
> > |     ListView     |
> > |                      |
> > | |
> > |    here is the   |
> > |       button      |
> > | |
>
> > But it shows me either only Button or only the List. What should I do
> > to make them be together?
>
> If you are using LinearLayout, set android:layout_height="0px" and
> android:layout_weight="1" on the ListView, and set
> android:layout_height="wrap_content" on the Button. That will give the
> Button enough space to show itself and give the ListView the rest of the
> space.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, $35/Year
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how make the ListView be above the button

2009-05-31 Thread Mark Murphy

Mike Lanin wrote:
> It shows me only button on top and no ListView

Without seeing your layout, it is difficult to assist you further.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how make the ListView be above the button

2009-05-31 Thread Al

I used a RelativeLayout for something similar. Specify the listview in
xml using @android:id/list as the id, and then define the button with
the correct layout settings to position it below the listview (and
align it to the bottom of the screen). Giving the button the following
property: android:layout_below="@android:id/list", should help get it
into place.

Then in code, use a class which extends ListActivity, call
setContentView(R.layout.my_layout), use findViewById to find the
listView and set an adapter or something to populate it.

On May 31, 3:48 pm, Mike Lanin  wrote:
> I want to create layout like:
> __
> |                       |
> |        Here        |
> |       scrolls      |
> |         the         |
> |     ListView     |
> |                      |
> | |
> |    here is the   |
> |       button      |
> | |
>
> But it shows me either only Button or only the List. What should I do
> to make them be together?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Open-Source Opertunity

2009-05-31 Thread Alex Jurgensen
Hi,

There is none yet. That is why we posted the job, to try and get a  
developer who can write the code.

Regards,
Alex,


On 30-May-09, at 11:36 PM, Marco Nelissen wrote:

> On Sat, May 30, 2009 at 7:46 PM, Alex Jurgensen  
>  wrote:
>
> Hi,
> All,
>
> I was wondering if some developers would like to work on Android
> Accessibility. It is Open-Source and hosted on Google code.
>
> The URL is:
>
> http://slimvoice.googlecode.com/ .
>
> I don't see any source code there. Is it still "open source" when  
> there's no source?
>
>
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Open-Source Opertunity

2009-05-31 Thread Disconnect

According to google it is. (Witness adc2, for example. Or the android
dev cycle in general.)

On Sun, May 31, 2009 at 2:36 AM, Marco Nelissen  wrote:
> On Sat, May 30, 2009 at 7:46 PM, Alex Jurgensen 
> wrote:
>>
>> Hi,
>> All,
>>
>> I was wondering if some developers would like to work on Android
>> Accessibility. It is Open-Source and hosted on Google code.
>>
>> The URL is:
>>
>> http://slimvoice.googlecode.com/ .
>
> I don't see any source code there. Is it still "open source" when there's no
> source?
>
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] can anybody please tell about DirectFBGL...

2009-05-31 Thread Shrinivas

Hi All,

- Can anyboy highlight on DirectFBGL.
- What is the relation between OpenGL ES & DirectFBGL?
- Do we need DirectFBGL while porting on OpenGL ES on Graphical
hardware accelerator. If yes please give me some tutor links to
implement for the same.

Thanks...


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to type in different language on emulator 1.1 and 1.5?

2009-05-31 Thread havexz

I want test my app in different language. Currently I am able to
change the language of the emulator 1.5 and my app starts showing
strings for that language but when i type in the edit box it still
shows english. Do I have to change some code so that my edit box n
everything else supports multiple language? Or do i have to tweak the
emulator so that it starts typing in language other than enlish?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Discussion on localizing-android-apps-draft

2009-05-31 Thread havexz

I want test my app in different language. Currently I am able to
change the language of the emulator 1.5 and my app starts showing
strings for that language but when i type in the edit box it still
shows english. Do I have to change some code so that my edit box n
everything else supports multiple language? Or do i have to tweak the
emulator so that it starts typing in language other than enlish?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Unable to set sd card parameter

2009-05-31 Thread Roman

Which platform version are you using right now? In case of version 1.5
you should be able to select in the target tab the AVD which has a
sdcard. If you don't have such an AVD you might want to create it
manually.

When you select "run configuration", switch to tab "target" and select
AVD Manager you can create an AVD with SD-Card. Use this AVD later
when you use "run configuration".

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On May 31, 3:53 am, hanged_man  wrote:
> It seems like adding external links is not allowed. Never mind that,
> like i said before the field (Additional Emulator Command Line
> Options) is hidden and im unable to set "sdcard" argument for the
> emulator.
>
> Please help me.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Resources causing IndexOutOfBoundsException

2009-05-31 Thread Carter

*bump*

I'm also seeing this on build 148830.

Anyone have an explanation?


Thanks,
Carter

On May 21, 8:42 am, Carter  wrote:
> Hi,
>
> I've started seeing a lot of weird crashes from users' phones
> regarding an IndexOutOfBoundsException around loading String
> resources.  One example is reproduced below.  This began with Android
> 1.5, build 147201.
>
> Any ideas what is going on?
>
> Thanks,
> Carter
>
> java.lang.IndexOutOfBoundsException: setSpan (10 ... 16) ends beyond
> length 13
>         at android.text.SpannableStringInternal.checkRange
> (SpannableStringInternal.java:349)
>         at android.text.SpannableStringInternal.setSpan
> (SpannableStringInternal.java:77)
>         at android.text.SpannableString.setSpan(SpannableString.java:46)
>         at android.content.res.StringBlock.applyStyles(StringBlock.java:151)
>         at android.content.res.StringBlock.get(StringBlock.java:106)
>         at android.content.res.AssetManager.getResourceText(AssetManager.java:
> 142)
>         at android.content.res.Resources.getText(Resources.java:151)
>         at android.content.Context.getText(Context.java:138)
>         at edu.mit.locale.ui.activities.Locale$6.onMenuItemClick(Locale.java:
> 336)
>         at com.android.internal.view.menu.MenuItemImpl.invoke
> (MenuItemImpl.java:133)
>         at com.android.internal.view.menu.MenuBuilder.performItemAction
> (MenuBuilder.java:813)
>         at com.android.internal.view.menu.IconMenuView.invokeItem
> (IconMenuView.java:519)
>         at com.android.internal.view.menu.IconMenuItemView.performClick
> (IconMenuItemView.java:122)
>         at android.view.View.onTouchEvent(View.java:3828)
>         at android.widget.TextView.onTouchEvent(TextView.java:6291)
>         at android.view.View.dispatchTouchEvent(View.java:3368)
>         at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
>         at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
>         at com.android.internal.policy.impl.PhoneWindow
> $DecorView.dispatchTouchEvent(PhoneWindow.java:1691)
>         at android.view.ViewRoot.handleMessage(ViewRoot.java:1525)
>         at android.os.Handler.dispatchMessage(Handler.java:99)
>         at android.os.Looper.loop(Looper.java:123)
>         at android.app.ActivityThread.main(ActivityThread.java:3948)
>         at java.lang.reflect.Method.invokeNative(Native Method)
>         at java.lang.reflect.Method.invoke(Method.java:521)
>         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> (ZygoteInit.java:782)
>         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
>         at dalvik.system.NativeStart.main(Native Method)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Music EQ

2009-05-31 Thread Colin

i was wondering if you guys had any plan on implementing an equalizer
for the android music player. if not, would you guys take it as an
open source submission ? i understand what kind of work it would take,
but it should be very doable.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how make the ListView be above the button

2009-05-31 Thread Mike Lanin

Al, when I'm trying to use RelativeLayout it shows me ListView only. I
think I've tried all the combinations of properties. Can you give any
example whele ListView and something else are shown on the screen
together?

On 31 май, 20:33, Al  wrote:
> I used a RelativeLayout for something similar. Specify the listview in
> xml using @android:id/list as the id, and then define the button with
> the correct layout settings to position it below the listview (and
> align it to the bottom of the screen). Giving the button the following
> property: android:layout_below="@android:id/list", should help get it
> into place.
>
> Then in code, use a class which extends ListActivity, call
> setContentView(R.layout.my_layout), use findViewById to find the
> listView and set an adapter or something to populate it.
>
> On May 31, 3:48 pm, Mike Lanin  wrote:
>
> > I want to create layout like:
> > __
> > |                       |
> > |        Here        |
> > |       scrolls      |
> > |         the         |
> > |     ListView     |
> > |                      |
> > | |
> > |    here is the   |
> > |       button      |
> > | |
>
> > But it shows me either only Button or only the List. What should I do
> > to make them be together?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: how make the ListView be above the button

2009-05-31 Thread Mark Murphy

Mike Lanin wrote:
> Can you give any
> example whele ListView and something else are shown on the screen
> together?


http://schemas.android.com/apk/res/android";
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >





-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, $35/Year

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] AutoCompleteTextView and AdapterView.onItemClickListener with onscreen keyboard not working

2009-05-31 Thread Ty

I have an app that has been working great until I changed the app to
use sensor and tested in 1.5.  When turning the phone sideways with
keyboard closed, I click on the autoCompleteTextView EditText I have
setup.  This brings up the on screen keyboard.  Great.  I start typing
a name and get a dropdown list of say 5 names to select from.  Great.
This dropdown is sideways not vertical.  This is new and I am assuming
this has to do with the onscreen keyboard.  I select one of those
names and it does a callback to my onItemClickListener.  Great.  So
far so good.

Problem is that the View returned is always null.  Always.

If I change the phone back to portrait and do the same all is good and
I can safely rely on the view returned to the listener.

If I leave the phone in landscape but open the physical keyboard then
it works just fine.

Why would the view be null with this new horizontal drop-down?  Is
there a different type of listener I should use.  Should I be setting
something differently in my CursorAdapter?  Any help is much
appreciated.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] SubMenu, Dialogs and ActivityGroup

2009-05-31 Thread skyman

Hello,

I have 6 options to put in options Menu, but 3 of them are not so
important and i want to hide them in submenu.
All of my Activities are started from one ActivityGroup which creates
Menu on MENU button press.
Problem is that when I open SubMenu or Dialog (which is created and
displayed by ActivityGroup) my current foreground activity makes
onPause, onStop and onDestroy, and when I close this submenu (using
"back" key) or dialog (by "ok" button for ex.) I don't have any
response (onCreate, onResume) from any of my activities registered in
LocalActivityManager.

Is it a bug?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Are you localizing an app? Do you want to be?

2009-05-31 Thread havexz

I want test my app in different language. Currently I am able to
change the language of the emulator 1.5 and my app starts showing
strings for that language but when i type in the edit box it still
shows english. Do I have to change some code so that my edit box n
everything else supports multiple language? Or do i have to tweak the
emulator so that it starts typing in language other than enlish?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: orientation change handling on widgets

2009-05-31 Thread Jeff Sharkey

For AppWidgets, you can use a separate layout for portrait versus
landscape.  If you're doing custom rendering, you could send both
bitmaps across the RemoteViews if they aren't too heavy.  (With
separate id's for each orientation, that would be GONE as needed.)

j


On Sun, May 31, 2009 at 8:44 AM, Michael Bollmann
 wrote:
>
> some of the content in my widget is based on custom drawing routines.
> is there any event i can listen for so i redraw and update this custom
> area when the orientation changes?
> currently my widget looks pretty screwed until the next widget update
> is requested
> >
>



-- 
Jeff Sharkey
jshar...@android.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Adding items to a ListView

2009-05-31 Thread SizzlingSkizzorsProgrammer

After the listview is already initialized, is it possible to add items
to it during runtime?

Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AutoCompleteTextView and AdapterView.onItemClickListener with onscreen keyboard not working

2009-05-31 Thread Ty

I am pretty sure this is a bug and have reported it under issue #2815

Ty

On May 31, 5:05 pm, Ty  wrote:
> I have an app that has been working great until I changed the app to
> use sensor and tested in 1.5.  When turning the phone sideways with
> keyboard closed, I click on the autoCompleteTextView EditText I have
> setup.  This brings up the on screen keyboard.  Great.  I start typing
> a name and get a dropdown list of say 5 names to select from.  Great.
> This dropdown is sideways not vertical.  This is new and I am assuming
> this has to do with the onscreen keyboard.  I select one of those
> names and it does a callback to my onItemClickListener.  Great.  So
> far so good.
>
> Problem is that the View returned is always null.  Always.
>
> If I change the phone back to portrait and do the same all is good and
> I can safely rely on the view returned to the listener.
>
> If I leave the phone in landscape but open the physical keyboard then
> it works just fine.
>
> Why would the view be null with this new horizontal drop-down?  Is
> there a different type of listener I should use.  Should I be setting
> something differently in my CursorAdapter?  Any help is much
> appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to let Android create my activity within the process which the launcher activity lies in?

2009-05-31 Thread codethief

Hello Oceanedge,
I'd like to get back to one of your former questions:

> Thanks, but I think singleton is a general pattern used generally. Why
> should we stop using it in Android? :(

http://misko.hevery.com/2008/08/17/singletons-are-pathological-liars/
http://misko.hevery.com/2008/08/25/root-cause-of-singletons/

That is why. :)
(Sorry, I don't feel like repeating the things Miško Hevery explains
all over again, so I put it that short. :) I just recommend to you to
spend some minutes reading it. It's definitely worth it.)


Regards,
Simon




> On May 26, 12:12 pm, Romain Guy  wrote:
>
>
>
> > Hi,
>
> > You cannot do this, if only for security reasons. Running arbitrary
> > code in the Home process would be very bad :)
>
> > Instead of creating two processes (which is really heavy and requires
> > a lot more memory), why don't you stop using a singleton?
>
> > On Mon, May 25, 2009 at 9:06 PM, Oceanedge  wrote:
>
> > > I'm developing a photo editor application. It will launched by
> > > android.intent.action.EDIT intent. I made two application to emit that
> > > intent. I found that two instance of my photo editor activity is
> > > created within the same process which is named as my activity. But
> > > there is a singleton class used in my  photo editor activity and that
> > > two activities use the same singleton class instance which break my
> > > application logic.
> > > I wonder if there is any way to let Android create my activity within
> > > the process which the launcher activity lies in? So that the two
> > > instance of my photo editor activity can be separated into two
> > > different process. And so they can reference to different instance of
> > > that  singleton class.
> > > Thanks!
>
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
>
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support.  All such questions should be posted on
> > public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Adding items to a ListView

2009-05-31 Thread Ernest

Hi,
If you want to add a new item in the listview,you could dynamic create
a new adapter and load it in the listview.

On Jun 1, 8:11 am, SizzlingSkizzorsProgrammer 
wrote:
> After the listview is already initialized, is it possible to add items
> to it during runtime?
>
> Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Adding items to a ListView

2009-05-31 Thread Mark Murphy

SizzlingSkizzorsProgrammer wrote:
> After the listview is already initialized, is it possible to add items
> to it during runtime?

Just add the new items to the adapter, or the data source that backs up
the adapter (if it's a CursorAdapter).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 0.95 Available!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Testing among peers - A new group proposed

2009-05-31 Thread Eric Wong (hdmp4.com)

On May 31, 3:58 pm, JP  wrote:
> On May 30, 6:44 am, Ravi  wrote:
>
> > Please advice.
>
> http://groups.google.com/group/android-app-distribution

mminteresting group that I didn't know...

Eric
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Where do i put 45 MB Audio Files.

2009-05-31 Thread Freshman

Hi Robert,

thanks for reply.
yes , i need 45MB of audio files.
I am trying to make a kind of english to thai dictionary.
and i have a list view which displays some words and sentences.
i need to play audio of that words and sentences.
i want to play that files in .wav formate.

is there any other way i can implement this ?
any suggestions/help would be greatly appreciated.

Thanks in avance,
Freshman


On May 29, 9:13 pm, Robert Green  wrote:
> Perhaps you need to think hard about whether you actually need 45MB of
> audio files?
>
> What format are you using?  What bitrate?  Are these full songs?  What
> does your application do?
>
> There are usually more efficient ways to do most everything.
> Sometimes it requires a totally new approach to the problem.
>
> On May 28, 11:51 pm, Freshman  wrote:
>
> > Hi guys,
>
> > I am new to android and i need to play list of audio files in my
> > application.
> > but iwhere can i put all the audio files as its large in size arround
> > 45 MB ?
> > and how can i access it ?
>
> > any help/info regarding this greatly appreciated.
>
> > many thaks,
> > Freshman
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Where do i put 45 MB Audio Files.

2009-05-31 Thread Mark Murphy

Freshman wrote:
> yes , i need 45MB of audio files.

Perhaps not.

> I am trying to make a kind of english to thai dictionary.

Great!

> and i have a list view which displays some words and sentences.

Great!

> i need to play audio of that words and sentences.

Great!

> i want to play that files in .wav formate.

U...

1. Experiment with MP3 or Ogg Vorbis, to see if you can get your audio
clips to be much smaller, while still retaining acceptable quality. I
suspect either of those formats will work much better than .WAV.

2. Give the users options of downloading the whole set of audio clips at
once (to their SD card) or downloading them on the fly as needed
(requires Internet connection).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 0.95 Available!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Can't figure out how to use SurfaceView properly, nothing is drawn

2009-05-31 Thread klirr

I had it working with a normal View but that is to slow. I was told to
use SurfaceView but can't figure out how to use OnKey with it and if I
should use onDraw or draw?
And how do I pass stuff to draw? does it happen automatically?


package com.android.WWS;

import android.app.Activity;
import android.content.Context;
import android.graphics.*;
import android.os.Bundle;
import android.view.SurfaceView;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnKeyListener;

public class WWS extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new GameView(this));
}

private static class GameView extends SurfaceView implements
OnKeyListener {
private Paint mPaint = new Paint();
private int x;
private int y;

public GameView(Context context) {
super(context);
x = 135;
y = 303;
setFocusable(true);
requestFocus();
}

@Override
public void onDraw(Canvas canvas) {
Paint paint = mPaint;
canvas.translate(10, 10);
canvas.drawColor(Color.rgb(184,134,11));
paint.setColor(Color.rgb(107,142,35));
paint.setStrokeWidth(1);
canvas.drawRect(x, y, x+30, y+7, paint);
canvas.drawRect(x+10, y+7, x+20, y+27, paint);
canvas.drawRect(x+5, y+27, x+25, y+32, paint);
}

public boolean onKey(View v, int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_DPAD_UP) {
y -= 3;
} else if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) {
x -= 3;
} else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) {
y += 3;
} else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) {
x += 3;
}
return true;
}

}

}


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to set data roaming and GSM/AUTO Mode

2009-05-31 Thread Augustin.CL

Dear All,

   I want to adjust some settings to disable/enable data
roaming and switch GSM/AUTO mode as the functions provided by
Settings.apk(Settings -> Wireless controls -> Mobile networks -> "Data
roaming"/"Use only 2G networks").
   I know there is a way to get the current setting of data
roaming through the api android.provider.Settings.Secure.DATA_ROAMING.
But I don't know if I could change here to control the usage of Data
roaming. If it is nothing but the status of data roaming. Changing
here will cause the state of the system inconsistent.
   Although I could find the api related to Data roaming, I
can't find any thing about switching GSM/AUTO mode except for some
internal api.
   Is there anyone having some related ideas or experiences?
Please give me some suggestions.

BTW, before this discussion I has posted an old related discussion,
but I can't find it from the groups. Does this mean the system miss
the discussion I posted?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] how to change a typeFace on a textView from remoteView

2009-05-31 Thread RTX

im trying to show font from my assets on a widget
but i dont know how to set the typeface from a remoteView

here is what i do now right now


RemoteViews updateViews = new RemoteViews(context.getPackageName(),
R.layout.Test);
updateViews.setTextViewText(R.id.TextView01, "test");
ComponentName thisWidget = new ComponentName(this, RSSWidget.class);
AppWidgetManager manager = AppWidgetManager.getInstance(this);
manager.updateAppWidget(thisWidget, updateViews);

how do i change the view font

thanks in advanced

RTX
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to type in different language on emulator 1.1 and 1.5?

2009-05-31 Thread havexz

got the solution

On May 31, 2:31 pm, havexz  wrote:
> I want test my app in different language. Currently I am able to
> change the language of the emulator 1.5 and my app starts showing
> strings for that language but when i type in the edit box it still
> shows english. Do I have to change some code so that my edit box n
> everything else supports multiple language? Or do i have to tweak the
> emulator so that it starts typing in language other than enlish?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Discussion on localizing-android-apps-draft

2009-05-31 Thread havexz

got the solutoin

On May 31, 2:37 pm, havexz  wrote:
> I want test my app in different language. Currently I am able to
> change the language of the emulator 1.5 and my app starts showing
> strings for that language but when i type in the edit box it still
> shows english. Do I have to change some code so that my edit box n
> everything else supports multiple language? Or do i have to tweak the
> emulator so that it starts typing in language other than enlish?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How does the 3D objects get touch events?

2009-05-31 Thread Anton

A google search for "Ray Intersection Tests" gives a number of
good links on how to do this.  Also, Peter Shirley's book "Realistic
Ray Tracing" is a fantastic introduction to the subject.  But I have
no example code on hand that could be used on Android.

-Anton

On May 31, 8:47 am, quill  wrote:
> hi Anton, is there some example code to refer to?
>
> On 5月31日, 下午10时35分, Anton  wrote:
>
> > Usually this is solved by having ray-object intersection code for
> > all of your geometry.  If your 3D objects are all polygon meshes then
> > you need ray-polygon intersection code.  You then generate a ray from
> > the eye point through the screen point that the user is touching.
> > This ray is then tested against all of your geometry to find the
> > closest hit.  That tells you what object was hit as well as where on
> > the object.  Of coarse, if your scene has many objects with lots of
> > polygons to test you will want to use some sort of spacial data
> > structure to speed up the hit testing.  However, since you only need
> > it to run at "human speeds" you can get away with doing a lot of hit
> > tests before you have to resort to acceleration structures.  One
> > simple thing to do is to hit test the objects bounding volumes
> > (spheres are particularly easy).  That lets you not test the
> > individual polygons in objects that fail the bounding volume test.  If
> > you have scripts for your objects that need to receive touch events
> > you can pass the event along to the object once you've determined
> > which object is hit.
>
> > -Anton
>
> > On May 31, 2:24 am, quill  wrote:
>
> > > HI all,
> > > I am writing a game using OPENGL, there are several 3D objects in my
> > > surfaceview.
> > > My question is:
> > > Should each 3D object implement view in order to get touch events?
> > > Or there is other way to do this?
>
> > > Thank you!
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] HTC Ion Problem

2009-05-31 Thread Bobbie

I got back from Google I/O 2009 with the "HTC Ion" phone that they
gave out to everyone.  The phone was given to us fully unlocked, so I
am using it on Centennial Wireless' network.  In the system settings
though it says my phone number is "unknown" but I can make and receive
calls without any problems.  The issue I'm running into is that I
can't get the user's phone number without this data.  Anyone have any
suggestions on how to remedy this problem?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Video player

2009-05-31 Thread Priya

Hi,

I have coded a vodeoplayer app both via sd card & stream.It plays
correctly.
But i have a problem, sometimes the .wmv file runs perfectly but
sometime i can only listen to the sound with blank screen.

can anybody help in resolving this.

Thanks in advance...

Priya

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: android alarm manager alarm

2009-05-31 Thread Viresh

doesn't anyone know..
or is the question too stupid...



On May 29, 1:09 am, Viresh  wrote:
> do we hear a ringing sound when the alarm manager sets off an alarm.
> I know its start a intent and that broadcasts to the receiver..
> but does there occur a ringing or something similar sound when the
> alarm goes off..
> am developing using and emulator...so not sure..
> also i have come to know that vibrator service is not available in the
> emulatoris there an alternate way to ensure that the vibrator did
> go off as programmed...am using the vibrator servcie and also setting
> the vibrator in the notification.
>
> any help appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] help with google accounts

2009-05-31 Thread Sujay Krishna Suresh
hi,
i want to get the google account which has been registered in the
phone...
the one that all the google apps use... is their any means to get hold of
the username of the google account???

-- 
Regards,
Sujay
W. C. Fields 
- "I am free of all prejudices. I hate every one equally."

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: help with google accounts

2009-05-31 Thread Sujay Krishna Suresh
Plz respond... i need it asap... I dont want my app users to be entering
their G acc info in my app again...
when i add

to my manifest file i get an extra app permission sayin
Your Google Accounts
 discover known accounts
does anyone no how i can use this permission to actually get the acc
details???
On Mon, Jun 1, 2009 at 10:25 AM, Sujay Krishna Suresh <
sujay.coold...@gmail.com> wrote:

> hi,
> i want to get the google account which has been registered in the
> phone...
> the one that all the google apps use... is their any means to get hold of
> the username of the google account???
>
> --
> Regards,
> Sujay
> W. C. Fields  - 
> "I am free of all prejudices. I hate every one equally."




-- 
Regards,
Sujay

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Writing Lat/Long to Camera EXIF

2009-05-31 Thread TrojanSnake12

Hello everyone.  I'm trying to write an application that places a
latitude and longitude stamp on all pictures.  I can see in the LogCat
output that there is someway of altering the EXIF headers in this
way.  How exactly can this be done?  Thanks in advance.


06-01 01:07:04.877: VERBOSE/QualcommCameraHardware(35):
receiveRawPicture: GPS PARM gps-timestamp --> [(null)]
06-01 01:07:04.877: WARN/QualcommCameraHardware(35):
receiveRawPicture: GPS timestamp not specified: defaulting to zero in
EXIF header.
06-01 01:07:04.877: VERBOSE/QualcommCameraHardware(35):
receiveRawPicture: GPS PARM gps-altitude --> [(null)]
06-01 01:07:04.877: WARN/QualcommCameraHardware(35):
receiveRawPicture: GPS altitude not specified: defaulting to zero in
EXIF header.
06-01 01:07:04.877: VERBOSE/QualcommCameraHardware(35):
receiveRawPicture: GPS PARM gps-latitude --> [(null)]
06-01 01:07:04.877: WARN/QualcommCameraHardware(35):
receiveRawPicture: GPS latitude not specified: defaulting to zero in
EXIF header.
06-01 01:07:04.877: VERBOSE/QualcommCameraHardware(35):
receiveRawPicture: GPS PARM gps-longitude --> [(null)]
06-01 01:07:04.877: WARN/QualcommCameraHardware(35):
receiveRawPicture: GPS longitude not specified: defaulting to zero in
EXIF header.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] images render very differently

2009-05-31 Thread Nate

I am using OpenGL ES and drawing a triangle strip with 4 vertices. The
texture I'm drawing was loaded from a PNG using
BitmapFactory.decodeStream. I'm confused as to why my images look so
bad. I took a screenshot and made the following image, which shows the
on-device rendering on top and the actual image on bottom:

http://n4te.com/temp/imgDiff.png

Any idea why there is a difference? I have tried a bunch of different
settings but I can't keep it from looking bad.

Thanks!
-Nate
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---