Re: [android-developers] Control colors in openGL

2012-03-07 Thread Yang Bo
OpenGL is a state machine,when you dont need the texture,try to disable it
before draw other primitives.

Regards!
Bo Yang
--  Sent from my Android!
在 2012-3-8 上午12:07,"Rikki" 写道:

> Hi,
>
> Want to draw bars of different colors. The background(bitmap image)
> for each bar is same but the foreground color needs to be different.
>
> And also the color is to be filled on top of the bar just like a
> progress bar. Here is my code snippet. Progress object share same
> vertex buffer but a little smaller in horizontal direction. This
> leaves some part of the rectangle filled with the color and then also
> fills the background image with that color with a translucent effect.
> can some one suggest what I'm doing wrong here
>
>gl.glTranslatef(0.0f, 0.0f, -5.0f);
>gl.glPushMatrix();
>bar1.draw(gl);  // Draw the bar
>gl.glPopMatrix();
>
>gl.glPushMatrix();
>gl.glColor4f(0.7f, 0.7f, 0.0f, 1.0f);
>progress1.draw(gl); //draw progress
>gl.glPopMatrix();
>
>gl.glTranslatef(0.0f, -0.80f, 0.0f);
>gl.glPushMatrix();
>bar1.draw(gl);  // Draw the bar
>gl.glPopMatrix();
>
>gl.glPushMatrix();
>gl.glColor4f(0.0f, 0.7f, 0.7f, 1.0f);
>progress1.draw(gl); //draw progress
>gl.glPopMatrix();
>
> -Rikki
>
> --
> 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

-- 
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

Re: [android-developers] Advanced Touch Control: passing touch event from one view to another

2012-01-01 Thread Yang Bo
Sorry,I donnot quite get you. Are the views in the same activity?
在 2011-12-30 上午10:31,"Sky" 写道:

> I have one custom made view that I can drag across the screen
> horizontally. Within this view is a ScrollView. I already have it so I
> can decide whether the user is dragging across the screen horizontally
> or vertically, enabling/disabling the onTouchEvent() for the
> appropriate views. However the newly enabled view doesn't regain
> control until the user has released touch and presses down once more.
>
> So I believe the onTouchEvent in the view that has current control
> must pass off the touch event (MotionEvent) to the other view.
>
> I have tried simply calling the onTouchEvent() as well as
> dispatchTouchEvent.
>
> I have tried creating the MotionEvent.ACTION_UP event for the current
> view and then passing the MotionEvent.ACTION_DOWN followed by
> MotionEvent.ACTION_MOVE to the view I want to gain control.
>
> Nothing works.
>
> Can anyone help? I hope my explanation of what I'm doing is sufficient!
>
> --
> 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

-- 
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

Re: [android-developers] Problem in getting Android source code from Google repo

2011-12-26 Thread Yang Bo
Try android.googlesource.com.
在 2011-12-26 下午6:48,"srinivasan shanmugam" 写道:

> Hi,
>
>
> When i was getting android source code by executing the following
> commands:
>
>$ curl http://android.git.kernel.org/repo > ./repo
>
>$ chmod a+x ./repo
>
>$ ./repo init -u git://android.git.kernel.org/platform/manifest.git
> -b gingerbread
>
> I was facing the below errors could any body kindly do the needful in
> reolving the below errors:
>
> Get git://android.git.kernel.org/platform/manifest.git
> android.git.kernel.org[0: 149.20.4.77]: errno=Connection refused
> fatal: unable to connect a socket (Connection refused)
> android.git.kernel.org[0: 149.20.4.77]: errno=Connection refused
> fatal: unable to connect a socket (Connection refused)
> fatal: cannot obtain manifest git://
> android.git.kernel.org/platform/manifest.git
> lucid@ubuntu:~/myandroid$ repo init -u git://
> android.git.kernel.org/platform/manifest.git
> -b gingerbread
> Get git://android.git.kernel.org/platform/manifest.git
> android.git.kernel.org[0: 149.20.4.77]: errno=Connection refused
> fatal: unable to connect a socket (Connection refused)
> android.git.kernel.org[0: 149.20.4.77]: errno=Connection refused
> fatal: unable to connect a socket (Connection refused)
> fatal: cannot obtain manifest git://
> android.git.kernel.org/platform/manifest.git
>
> Kindly do the needful as soon as possible,
>
> Thanks,
> Srinivasan S
>
> --
> 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

-- 
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

Re: [android-developers] Re: The accelerometer reading looks odd

2011-12-23 Thread Yang Bo
May not possible,there are several games using it in my phone...
在 2011-12-23 下午1:53,"Christopher Van Kirk" 写道:

>  Seems like your device is broken.
>
> On 12/23/2011 11:26 AM, Yang Bo wrote:
>
> Could anyone help on this ? Thanks
> 在 2011-12-22 下午5:02,"Yang Bo"  写道:
>
> Hi,
> I am trying to read the device accelerometer when the phone is placed
> on a desk with screen up,I expect 0 on the x-axis and y-axis,-9.8 at
> z-axis.  But I get
> x:11,y:-37,z:-24(decimal part ignore)  What is this?  I read the doc
> of accelerometer,  does not make it clear.  Could you please help :
> 1. Why x and y are non-zero?
> 2. Why the value is so large?
>
> 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
>
>
>  --
> 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

-- 
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: The accelerometer reading looks odd

2011-12-22 Thread Yang Bo
Could anyone help on this ? Thanks
在 2011-12-22 下午5:02,"Yang Bo" 写道:

> Hi,
> I am trying to read the device accelerometer when the phone is placed
> on a desk with screen up,I expect 0 on the x-axis and y-axis,-9.8 at
> z-axis.  But I get
> x:11,y:-37,z:-24(decimal part ignore)  What is this?  I read the doc
> of accelerometer,  does not make it clear.  Could you please help :
> 1. Why x and y are non-zero?
> 2. Why the value is so large?
>
> 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] The accelerometer reading looks odd

2011-12-22 Thread Yang Bo
Hi,
I am trying to read the device accelerometer when the phone is placed
on a desk with screen up,I expect 0 on the x-axis and y-axis,-9.8 at
z-axis.  But I get
x:11,y:-37,z:-24(decimal part ignore)  What is this?  I read the doc of
accelerometer,  does not make it clear.  Could you please help :
1. Why x and y are non-zero?
2. Why the value is so large?

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

Re: [android-developers] Emulator takes 15 minutes to start an app, something wrong ?

2011-12-13 Thread Yang Bo
I think it is normal,it start very slow in my laptop (2G cpu,3G RAM)
either...
 在 2011-12-14 上午10:35,"SL@maxis" 写道:

>
> I am just playing with some sample applications, eg LunarLander.
>
> It takes about 10-15 minutes to start when run the application. Have I
> missed something ?
>
> My machine: XP SP2, 1GB RAM, 10GB free space.
>
> Thanks.
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
> --
> 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

-- 
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

Re: [android-developers] Android web development guide..(beginner question..)

2011-12-13 Thread Yang Bo
If you are developing web app,it will run in browser installed in user
phone. Why do you care Android SDK api ?
在 2011-12-13 下午7:43,"sathyashrayan" 写道:

> Developers,
>  I have been in web developments with php/mysql.. Now a days learning
> the basics of android developments. My requirements is to develop
> android web apps.. I got a book called pro android 3 and pro android
> web apps.. I have run all those examples from the two books. I also
> have samples from android sdk. My doubt is, where these two types
> development gets integrated? I mean when are these  android sdk
> functions and classes used in android web development?
>
> --
> 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

-- 
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

Re: [android-developers] How to monitor screen touch event in service

2011-12-08 Thread Yang Bo
Ok,I know this may sound malicious,maybe Android never want developer to do
this...
在 2011-12-8 下午5:52,"Miguel Morales" 写道:

> Or steal any phone numbers I dial?
>
> On Thu, Dec 8, 2011 at 1:48 AM, Yang Bo  wrote:
>
>> Because that may be very useful,if you want implement a system wide
>> gesture, or do something interesting accounting like how many times you hit
>> the phone screen every day 
>> 在 2011-12-8 下午5:29,"Oli Wright" 写道:
>>
>> The first question you're likely to get from anyone is "why". Smells of
>>> malice.
>>>
>>> --
>>> 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
>>
>>  --
>> 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
>>
>
>
>
> --
> ~ Jeremiah:9:23-24
> Android 2D MMORPG: http://solrpg.com/,
> http://www.youtube.com/user/revoltingx
>
> --
> 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

-- 
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

Re: [android-developers] How to monitor screen touch event in service

2011-12-08 Thread Yang Bo
Because that may be very useful,if you want implement a system wide
gesture, or do something interesting accounting like how many times you hit
the phone screen every day 
在 2011-12-8 下午5:29,"Oli Wright" 写道:

> The first question you're likely to get from anyone is "why". Smells of
> malice.
>
> --
> 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

-- 
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