[android-developers] Re: Text in a circle that rotates on touch

2010-04-12 Thread Farha Ansari
Hi , I have the same requirement, I have to rotate an image of a wheel
as the user moves finger on the wheel on screen. Can u pls tell me how
I can use this code thr? What is cx, cy, mPreviousX, mPreviousY?

Thanks

On Mar 6, 2:56 am, Nathan  wrote:
> On Mar 5, 3:25 am, Bart  wrote:
>
> > Hi, I'd like to display a given String in acircle(so bend the string
> > so that the end of the string touches the beginning of the string).
> > And Then I'd like to let the user rotate thecircleby grabbing and
> > dragging it clockwise or counterclockwise.
> > Do you guys know what would be the best (simplest, smoothest) way to
> > do this? I already saw that using drawOnPath i can drawtextin a
> >circle. Do you have any tips on how to proceed with dragging and
> > rotating the textcircle?
>
> I've done this, and as mentioned, Canvas.translate and canvas.rotate
> are the way to go.
>
> If you are just using a hold and drag, you wouldn't have to worry so
> much about angular velocity. Code like this would work:
>
>         @Override
>         public boolean onTouchEvent(MotionEvent e) {
>         float x = e.getX();
>         float y = e.getY();
>         switch (e.getAction()) {
>         case MotionEvent.ACTION_MOVE:
>             //find an approximate angle between them.
>
>                 float dx = x-cx;
>             float dy = y-cy;
>             double a=Math.atan2(dy,dx);
>
>             float dpx= mPreviousX-cx;
>             float dpy= mPreviousY-cy;
>             double b=Math.atan2(dpy, dpx);
>
>             double diff  = a-b;
>             this.bearing -= Math.toDegrees(diff);
>             this.invalidate();
>         }
>         mPreviousX = x;
>         mPreviousY = y;
>         return true;
>         }
>
> Nathan

-- 
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: Internal links in Webview

2010-04-10 Thread Farha Ansari
I used onPageStarted() as on any link click, it comes here, this is
where we can do any related task.
This is what I have used.

On Apr 8, 9:58 pm, nikhil  wrote:
> Hey Farha,
>
> Did you find out ?
>
> On Mar 24, 1:36 am, Farha Ansari  wrote:
>
>
>
> > How can we find out when we click an internallinkinWebvIew?
>
> > Thanks,
> > Farha- Hide quoted text -
>
> - Show quoted text -

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

To unsubscribe, reply using "remove me" as the subject.


[android-developers] find that GPS provider has failed to get location in android

2010-04-07 Thread Farha Ansari
How can I find out that the GPS provider has failed to get location in
android?
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

To unsubscribe, reply using "remove me" as the subject.



[android-developers] Re: Urgent : GPS timeout in android

2010-04-07 Thread Farha Ansari
i m using background service

On Apr 7, 6:16 pm, Brill Pappin  wrote:
> I'm doing that by using a Timer as a watchdog.
> It wakes periodically and checks to see if we have a fix yet.
> If it doesn't over a specified period of time, it can set a flag or
> generate an event to let the rest of the app know.
>
> - Brill Pappin
>
> On Apr 6, 11:34 pm, Farha Ansari  wrote:
>
>
>
> > Hi,
>
> > In blackberry, we use a timeout to get the location, so that if it
> > doesnt retun location in that much time period, we get to know. But in
> > Android, there is no concept of timeout, can anyone please tell the
> > alternative, that we can find out that after this much time there is
> > no location update from GPS.
>
> > Thanks- Hide quoted text -
>
> - Show quoted text -

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

To unsubscribe, reply using "remove me" as the subject.


[android-developers] Re: Urgent : GPS timeout in android

2010-04-07 Thread Farha Ansari
can anyone please share with me the code for it. i really can't
understand how to go about it.
Thanks.

On Apr 7, 6:16 pm, Brill Pappin  wrote:
> I'm doing that by using a Timer as a watchdog.
> It wakes periodically and checks to see if we have a fix yet.
> If it doesn't over a specified period of time, it can set a flag or
> generate an event to let the rest of the app know.
>
> - Brill Pappin
>
> On Apr 6, 11:34 pm, Farha Ansari  wrote:
>
>
>
> > Hi,
>
> > In blackberry, we use a timeout to get the location, so that if it
> > doesnt retun location in that much time period, we get to know. But in
> > Android, there is no concept of timeout, can anyone please tell the
> > alternative, that we can find out that after this much time there is
> > no location update from GPS.
>
> > Thanks- Hide quoted text -
>
> - Show quoted text -

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

To unsubscribe, reply using "remove me" as the subject.


[android-developers] Re: Urgent : GPS timeout in android

2010-04-07 Thread Farha Ansari
but i am getting location in method onLocationChanged() and this is
where i want to check that if i dont get update say within 1 minute,
thn is hould end handler. So, how can i do it here?
Thanks

On Apr 7, 9:32 am, "Maps.Huge.Info (Maps API Guru)" 
wrote:
> One method you could use is to setup a progress handler to monitor the
> location fix. If after x seconds you have nothing then you can end the
> handler, shutdown the listeners and inform your users. Pretty straight
> forward, I'm sure there are better ways to do this as well. Basically,
> you have to construct your own location timeout.
>
> -John Coryat
>
> On Apr 6, 10:34 pm, Farha Ansari  wrote:
>
>
>
> > Hi,
>
> > In blackberry, we use a timeout to get the location, so that if it
> > doesnt retun location in that much time period, we get to know. But in
> > Android, there is no concept of timeout, can anyone please tell the
> > alternative, that we can find out that after this much time there is
> > no location update from GPS.
>
> > Thanks- Hide quoted text -
>
> - Show quoted text -

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

To unsubscribe, reply using "remove me" as the subject.


[android-developers] Urgent : GPS timeout in android

2010-04-06 Thread Farha Ansari
Hi,

In blackberry, we use a timeout to get the location, so that if it
doesnt retun location in that much time period, we get to know. But in
Android, there is no concept of timeout, can anyone please tell the
alternative, that we can find out that after this much time there is
no location update from GPS.

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

To unsubscribe, reply using "remove me" as the subject.


[android-developers] Urgent: Getting error when uploading apk file on android market

2010-03-30 Thread Farha Ansari
Hi, i m uploading my apk for 1st time on market and getting Error:The
server could not process your apk. Try .
My manifest file is:-

`http://schemas.android.com/apk/res/android";
  package="packagename"
  android:versionCode="1"
  android:versionName="1.0">
  
  
  
  














`

Please help.
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

To unsubscribe, reply using "remove me" as the subject.


[android-developers] Internal links in Webview

2010-03-23 Thread Farha Ansari
How can we find out when we click an internal link in WebvIew?

Thanks,
Farha

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


[android-developers] Re: virtual keyboard input focus with webviews

2010-03-16 Thread Farha Ansari
Yes, I had the same issue, and it has not been solved till now. I had
also posted the question but didnt get any reply.
I hope, someone would reply this time to your post.

Farha

On Mar 16, 5:30 am, mike  wrote:
> Hi all,
>
> I'm having a very very strange problem with input and textarea html
> tags in a WebView. Basically they never seem to gain input focus with the
> virtual keybaord. The code for this is trivial:
>
> WebView w = new WebView (this);
> w.loadData("fooz ", "text/html", "utf8");
> setContentView (w);
>
> which shows a single input box. There is now way just tapping around the
> screen to get it to accept input.
>
> Strangely, if I use my trackball on my G1 to select the field, I can
> eventually
> get focus and type in it. For trackball-less things like the N1, that
> doesn't
> help though.
>
> I've seen some posts about this, but it doesn't seem that there were any
> solutions or feedback.
>
> Mike

-- 
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] ViewFlipper caching issue

2010-03-11 Thread Farha Ansari
The views are not cached in a ViewFlipper. Is there a way wherein we
can get an image of the view and show it to user so that he sees the
Ui as we see on Home scrren(when we swipe the previous view also moves
along and when we lift our finger, only then the next view is shown
completely.)

What I want to do is that when the user starts moving his finegr on
screen, the view should also move along(create an image of view).

I am not getting to do this, as when we swipe the present view goes
and next view comes, we do not get both visible when we r moving our
finger on screen.

Please if anyone gets what I am trying to do, do help me.

Thanks,
Farha

-- 
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 textbox and keypad

2010-03-10 Thread Farha Ansari
try using :-

android:windowSoftInputMode="adjustPan"

this is what i am using.

Thanks,
Farha

On Mar 11, 1:57 am, nikhil  wrote:
> Worst part is the manual scroll...if I move it up and then touch the
> keypad ...it rolls back down ..
>
> On Mar 8, 2:49 pm, nikhil  wrote:
>
>
>
> > Thank you for your reply, Farha. I tried setting the
> > android:windowSoftInputMode="stateVisible|adjustResize" value. The
> > view does move upwards but the textbox still hides behind the keypad.
> > I am using the webview without scrollview because I have read the
> > webview has a scroll view and it handles scrolling by itself.
>
> > On Mar 7, 9:59 pm, Farha Ansari  wrote:
>
> > > Is your WebView in a ScrollView? It is due to the keypad. Check out
> > > this link, this might give you an idea about what is happening 
> > > :-http://developer.android.com/resources/articles/on-screen-inputs.html
>
> > > Hope it helps.
>
> > > On Mar 5, 11:10 pm, nikhil  wrote:
>
> > > > Any idea people?
>
> > > > On Mar 4, 2:20 pm, nikhil  wrote:> To add to this if 
> > > > I manually scroll the webview so that I can see the
> > > > > textbox while typing, the moment I touch the keypad the webview
> > > > > scrolls back to its old position.
>
> > > > > On Mar 4, 12:46 pm, nikhil  wrote:
>
> > > > > > I have this webview on which I have a textbox at the bottom. The
> > > > > > problem is when I click on this textbox the keypad pops up and 
> > > > > > covers
> > > > > > it. How can I scroll the webview so that the textbox remain above 
> > > > > > the
> > > > > > keypad. In iphone it is handled automatically.- Hide quoted text -
>
> - Show quoted text -

-- 
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 convert Bitmap image to Drawable in Android

2010-03-10 Thread Farha Ansari
how can i convert a Bitmap to Drawable.

Thanks,
Farha

-- 
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] Switching views in ViewFlipper

2010-03-08 Thread Farha Ansari
Hi,

Is there a way to switch views in a ViewFlipper just like on Home
screen, where we have small dots at the bottom of the screen and on
clicking on them we can switch views.

Thanks,
Farha

-- 
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: Rotation event handling

2010-03-07 Thread Farha Ansari
Hi, you can add these lines in AndroidManifest.xml,



and then in your activity, override this method:-

@Override
public void onConfigurationChanged(Configuration newConfig)
{
if (getResources().getConfiguration().orientation ==
Configuration.ORIENTATION_LANDSCAPE)
{
   //do your task
}
else if (getResources().getConfiguration().orientation ==
Configuration.ORIENTATION_PORTRAIT)
{
  //do your task
}
super.onConfigurationChanged(newConfig);
}

This worked perfectly for me, hope it does for u too...

On Mar 7, 8:32 am, Dilip Dilip  wrote:
> Dear All,
>   I am a new bee to android. I wanted to know how to recieve a rotation
> event ( change in orientation, vertical to horizontal ) in my Activity or my
> service.
> Please anyone answer me.
>
> Thanks and Regards,
>   Dileep

-- 
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 textbox and keypad

2010-03-07 Thread Farha Ansari
Is your WebView in a ScrollView? It is due to the keypad. Check out
this link, this might give you an idea about what is happening :-
http://developer.android.com/resources/articles/on-screen-inputs.html

Hope it helps.

On Mar 5, 11:10 pm, nikhil  wrote:
> Any idea people?
>
> On Mar 4, 2:20 pm, nikhil  wrote:> To add to this if I 
> manually scroll the webview so that I can see the
> > textbox while typing, the moment I touch the keypad the webview
> > scrolls back to its old position.
>
> > On Mar 4, 12:46 pm, nikhil  wrote:
>
> > > I have this webview on which I have a textbox at the bottom. The
> > > problem is when I click on this textbox the keypad pops up and covers
> > > it. How can I scroll the webview so that the textbox remain above the
> > > keypad. In iphone it is handled automatically.

-- 
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] Application not taking input from physical keyboard in Droid A855

2010-03-02 Thread Farha Ansari
The application will not take input from the key board and it gives an
error message that the function is not supported.This is happening
with Motorola Droid A855.

Any ideas.

Thank,
Farha

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