Re: [android-developers] Re: how to create a custom gauge in android

2013-04-19 Thread abdallah mouhamed amine
hi bob, am working actuallly on an application like the ADK2011 so mainly my app communicates with a board (like arduino ADK) and get the temperature value via USB to be displayed in mu custom gauge thank you :) 2013/4/18 bob > Apparently, the Nexus 7 has no temperature sensor according to

Re: [android-developers] Re: how to create a custom gauge in android

2013-04-18 Thread bob
Apparently, the Nexus 7 has no temperature sensor according to this method: private void attachToSensor() { SensorManager sensorManager = getSensorManager(); List sensors = sensorManager.getSensorList(Sensor.TYPE_TEMPERATURE); if (sensors.size() > 0) { Sensor sensor = sensors.get(0); sensorManag

Re: [android-developers] Re: how to create a custom gauge in android

2013-04-18 Thread abdallah mouhamed amine
am sure that the method that shows the needle is not called !! check your ondraw method 2013/4/18 bob > For some reason, that thermometer example doesn't seem to work right: > > > > > > > > Than

Re: [android-developers] Re: how to create a custom gauge in android

2013-04-18 Thread abdallah mouhamed amine
thank you Bilthon, i build the custom view i want , i just used 3 drawable ( needle, centerwheel and a background gauge) with ondraw and rotate method I tested it with my emulator and it's working correctly thank you all for your help :D 2013/4/18 Bilthon > I found this nice tutorial about the

Re: [android-developers] Re: how to create a custom gauge in android

2013-04-18 Thread abdallah mouhamed amine
thank you bob that's helping me a lot :) let's code \m/ big up 2013/4/17 bob > If you don't use *save*() and *restore*() and something gets drawn after > your needle, it will also be rotated just as the needle was rotated. > > > So you would probably use something like this: > > > *canvas.sa

Re: [android-developers] Re: how to create a custom gauge in android

2013-04-17 Thread bob
If you don't use *save*() and *restore*() and something gets drawn after your needle, it will also be rotated just as the needle was rotated. So you would probably use something like this: *canvas.save();* canvas.rotate(45, 100, 100); canvas.drawBitmap(…); *canvas.restore();* Thanks.

Re: [android-developers] Re: how to create a custom gauge in android

2013-04-17 Thread abdallah mouhamed amine
thank you BOB that helps me a lot :) i used draw method to draw the needle (initial position) then i used rotate like you said to rotate it and it works correctly did i need to use save and restore methods? 2013/4/17 bob > Break the needle off of that image and put it in it's own image. > > The