Re: [android-developers] How to go to previous page..?

2011-02-10 Thread Abhilash baddam
Hi kostya,

 You are right, i did like as u said. Thanks for the
solution.

On Thu, Feb 10, 2011 at 7:15 PM, Kostya Vasilyev  wrote:

>  I think you are trying to handle the key in your activity - whereas you
> should be handling it in the dialog.
>
>
> http://developer.android.com/reference/android/app/Dialog.html#setOnKeyListener(android.content.DialogInterface.OnKeyListener)
>
> dialog.setOnKeyListener(new DialogInterface.OnKeyListener() {
> @Override
> public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent
> event) {
> handle BACK_KEY here
> }
> });
>
> Just make sure there is way for the user to close the dialog.
>
> Also consider using an Activity instead of the dialog.
>
> -- Kostya
>
> 10.02.2011 16:39, Abhilash baddam пишет:
>
> hi kostya,
>
>  but if i do as u told back button is not working...? Any
> alternate for this ?
>
> On Thu, Feb 10, 2011 at 6:46 PM, Kostya Vasilyev wrote:
>
>>  Um, if you don't want that, call dialog.setCancellable(false) ?
>>
>> 10.02.2011 15:53, Abhilash baddam пишет:
>>
>>  Hi,
>>
>>if i give dialog.setCancellable(true); the the dialog box is
>> dismissing...? what shall i do?
>>
>> On Thu, Feb 10, 2011 at 6:14 PM, Abhilash baddam <
>> abhilash.androiddevelo...@gmail.com> wrote:
>>
>>> Hi Marcin,
>>>
>>> What u have sent the link, is helped me alot in general
>>> webview but here i am displaying the webview in Customized Dialog.
>>> Here i used dialog.setCancellable(false);  and i used back button
>>> functionality like this its not working in dialog..what may be the reason.
>>>
>>>  @Overridepublic boolean onKeyDown(int keyCode, KeyEvent event) {
>>>
>>>
>>> if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
>>>
>>>
>>> mWebView.goBack();
>>>
>>> return true;
>>>
>>>
>>> }
>>> return super.onKeyDown(keyCode, event);
>>>
>>>   }
>>>
>>> On Thu, Feb 10, 2011 at 5:13 PM, Marcin Orlowski <
>>> webnet.andr...@gmail.com> wrote:
>>>
 On 10 February 2011 12:03, Abhilash baddam
  wrote:

 > I have a problem, in my application i am displaying webview in
 customized
 > dialog. suppose if the user browse 5 pages in the webview how can he
 come
 > back to previous page, if i click on back button the dialog is
 dismissing.

  Read here:
 http://developer.android.com/resources/tutorials/views/hello-webview.html
 Point 9 discuss your case

 --
 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
>>
>>
>>
>> --
>> Kostya Vasilyev -- WiFi Manager + pretty widget -- 
>> http://kmansoft.wordpress.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
>>
>
>  --
> 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
>
>
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget -- 
> http://kmansoft.wordpress.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
>

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

Re: [android-developers] How to go to previous page..?

2011-02-10 Thread Kostya Vasilyev
I think you are trying to handle the key in your activity - whereas you 
should be handling it in the dialog.


http://developer.android.com/reference/android/app/Dialog.html#setOnKeyListener(android.content.DialogInterface.OnKeyListener)

dialog.setOnKeyListener(new DialogInterface.OnKeyListener() {
@Override
public boolean onKey(DialogInterface dialog, int keyCode, 
KeyEvent event) {

handle BACK_KEY here
}
});

Just make sure there is way for the user to close the dialog.

Also consider using an Activity instead of the dialog.

-- Kostya

10.02.2011 16:39, Abhilash baddam пишет:

hi kostya,

but if i do as u told back button is not working...? 
Any alternate for this ?


On Thu, Feb 10, 2011 at 6:46 PM, Kostya Vasilyev > wrote:


Um, if you don't want that, call dialog.setCancellable(false) ?

10.02.2011 15:53, Abhilash baddam пишет:

Hi,

  if i give dialog.setCancellable(true); the the dialog
box is dismissing...? what shall i do?

On Thu, Feb 10, 2011 at 6:14 PM, Abhilash baddam
mailto:abhilash.androiddevelo...@gmail.com>> wrote:

Hi Marcin,

   What u have sent the link, is helped me alot
in general webview but here i am displaying the webview in
Customized Dialog.
Here i used dialog.setCancellable(false);  and i used back
button functionality like this its not working in
dialog..what may be the reason.

@Override
public  boolean  onKeyDown(int  keyCode,  KeyEvent  event)  {


 if  ((keyCode==  KeyEvent.KEYCODE_BACK)  &&  mWebView.canGoBack()) 
 {


 mWebView.goBack();

 return  true;


 }
 return  super.onKeyDown(keyCode,  event);


}

On Thu, Feb 10, 2011 at 5:13 PM, Marcin Orlowski
mailto:webnet.andr...@gmail.com>>
wrote:

On 10 February 2011 12:03, Abhilash baddam
mailto:abhilash.androiddevelo...@gmail.com>> wrote:

> I have a problem, in my application i am displaying
webview in customized
> dialog. suppose if the user browse 5 pages in the
webview how can he come
> back to previous page, if i click on back button the
dialog is dismissing.

Read here:

http://developer.android.com/resources/tutorials/views/hello-webview.html
Point 9 discuss your case

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



-- 
Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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


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



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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 mor

Re: [android-developers] How to go to previous page..?

2011-02-10 Thread Abhilash baddam
hi kostya,

but if i do as u told back button is not working...? Any
alternate for this ?

On Thu, Feb 10, 2011 at 6:46 PM, Kostya Vasilyev  wrote:

>  Um, if you don't want that, call dialog.setCancellable(false) ?
>
> 10.02.2011 15:53, Abhilash baddam пишет:
>
> Hi,
>
>if i give dialog.setCancellable(true); the the dialog box is
> dismissing...? what shall i do?
>
> On Thu, Feb 10, 2011 at 6:14 PM, Abhilash baddam <
> abhilash.androiddevelo...@gmail.com> wrote:
>
>> Hi Marcin,
>>
>> What u have sent the link, is helped me alot in general
>> webview but here i am displaying the webview in Customized Dialog.
>> Here i used dialog.setCancellable(false);  and i used back button
>> functionality like this its not working in dialog..what may be the reason.
>>
>>  @Overridepublic boolean onKeyDown(int keyCode, KeyEvent event) {
>>
>>
>> if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
>>
>>
>> mWebView.goBack();
>>
>> return true;
>>
>>
>> }
>> return super.onKeyDown(keyCode, event);
>>
>>   }
>>
>> On Thu, Feb 10, 2011 at 5:13 PM, Marcin Orlowski <
>> webnet.andr...@gmail.com> wrote:
>>
>>> On 10 February 2011 12:03, Abhilash baddam
>>>  wrote:
>>>
>>> > I have a problem, in my application i am displaying webview in
>>> customized
>>> > dialog. suppose if the user browse 5 pages in the webview how can he
>>> come
>>> > back to previous page, if i click on back button the dialog is
>>> dismissing.
>>>
>>>  Read here:
>>> http://developer.android.com/resources/tutorials/views/hello-webview.html
>>> Point 9 discuss your case
>>>
>>> --
>>> 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
>
>
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget -- 
> http://kmansoft.wordpress.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
>

-- 
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 go to previous page..?

2011-02-10 Thread Kostya Vasilyev

Um, if you don't want that, call dialog.setCancellable(false) ?

10.02.2011 15:53, Abhilash baddam ?:

Hi,

  if i give dialog.setCancellable(true); the the dialog box is 
dismissing...? what shall i do?


On Thu, Feb 10, 2011 at 6:14 PM, Abhilash baddam 
> wrote:


Hi Marcin,

   What u have sent the link, is helped me alot in
general webview but here i am displaying the webview in Customized
Dialog.
Here i used dialog.setCancellable(false);  and i used back button
functionality like this its not working in dialog..what may be the
reason.

@Override
public  boolean  onKeyDown(int  keyCode,  KeyEvent  event)  {


 if  ((keyCode==  KeyEvent.KEYCODE_BACK)  &&  mWebView.canGoBack())  {


 mWebView.goBack();

 return  true;


 }
 return  super.onKeyDown(keyCode,  event);


}

On Thu, Feb 10, 2011 at 5:13 PM, Marcin Orlowski
mailto:webnet.andr...@gmail.com>> wrote:

On 10 February 2011 12:03, Abhilash baddam
mailto:abhilash.androiddevelo...@gmail.com>> wrote:

> I have a problem, in my application i am displaying webview
in customized
> dialog. suppose if the user browse 5 pages in the webview
how can he come
> back to previous page, if i click on back button the dialog
is dismissing.

Read here:

http://developer.android.com/resources/tutorials/views/hello-webview.html
Point 9 discuss your case

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



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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

Re: [android-developers] How to go to previous page..?

2011-02-10 Thread Abhilash baddam
Hi,

  if i give dialog.setCancellable(true); the the dialog box is
dismissing...? what shall i do?

On Thu, Feb 10, 2011 at 6:14 PM, Abhilash baddam <
abhilash.androiddevelo...@gmail.com> wrote:

> Hi Marcin,
>
>What u have sent the link, is helped me alot in general
> webview but here i am displaying the webview in Customized Dialog.
> Here i used dialog.setCancellable(false);  and i used back button
> functionality like this its not working in dialog..what may be the reason.
>
> @Override
> public boolean onKeyDown(int keyCode, KeyEvent event) {
>
> if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
>
> mWebView.goBack();
>
> return true;
>
> }
> return super.onKeyDown(keyCode, event);
>
> }
>
> On Thu, Feb 10, 2011 at 5:13 PM, Marcin Orlowski  > wrote:
>
>> On 10 February 2011 12:03, Abhilash baddam
>>  wrote:
>>
>> > I have a problem, in my application i am displaying webview in
>> customized
>> > dialog. suppose if the user browse 5 pages in the webview how can he
>> come
>> > back to previous page, if i click on back button the dialog is
>> dismissing.
>>
>> Read here:
>> http://developer.android.com/resources/tutorials/views/hello-webview.html
>> Point 9 discuss your case
>>
>> --
>> 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 go to previous page..?

2011-02-10 Thread Abhilash baddam
Hi Marcin,

   What u have sent the link, is helped me alot in general
webview but here i am displaying the webview in Customized Dialog.
Here i used dialog.setCancellable(false);  and i used back button
functionality like this its not working in dialog..what may be the reason.

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
mWebView.goBack();
return true;
}
return super.onKeyDown(keyCode, event);

}

On Thu, Feb 10, 2011 at 5:13 PM, Marcin Orlowski
wrote:

> On 10 February 2011 12:03, Abhilash baddam
>  wrote:
>
> > I have a problem, in my application i am displaying webview in customized
> > dialog. suppose if the user browse 5 pages in the webview how can he come
> > back to previous page, if i click on back button the dialog is
> dismissing.
>
> Read here:
> http://developer.android.com/resources/tutorials/views/hello-webview.html
> Point 9 discuss your case
>
> --
> 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 go to previous page..?

2011-02-10 Thread Marcin Orlowski
On 10 February 2011 12:03, Abhilash baddam
 wrote:

> I have a problem, in my application i am displaying webview in customized
> dialog. suppose if the user browse 5 pages in the webview how can he come
> back to previous page, if i click on back button the dialog is dismissing.

Read here: 
http://developer.android.com/resources/tutorials/views/hello-webview.html
Point 9 discuss your case

-- 
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 go to previous page..?

2011-02-10 Thread Kostya Vasilyev
Try this: add a key-down handler, pass the key to the web view. Make 
sure the user can eventually close the dialog somehow.


-- Kostya

10.02.2011 14:03, Abhilash baddam ?:

Hi,

I have a problem, in my application i am displaying webview in 
customized dialog. suppose if the user browse 5 pages in the webview 
how can he come back to previous page, if i click on back button the 
dialog is dismissing. So i thought i want to put a button also in 
dialog to achieve the functionality of back, means if the user clicks 
on back buttton he will come into previous page in dialog box...? How 
can i solve this issue..? --

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 



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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