[android-developers] Re: How to call Android Native functions from html page

2012-05-03 Thread arun kumar

 Hello all,
 i created one html page with two buttons. then i stored that html page in
 assets folder. then i load that html page to web view. my question is if i
 click that html button i want to show android native layout like linear
 layout with buttons? is it possible?

 --
 WITH REGARDS
 ARUN KUMAR P D
 +91-9994794759

--

-- 
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: How to call Android Native functions from html page

2012-05-03 Thread Mark Murphy
You can start up another activity that has linear layout with buttons.

Or, you can use addJavaScriptInterface() to have JavaScript code call
a method in your app that puts a linear layout with buttons
somewhere adjacent to the WebView on the current activity, or loads a
new fragment, or something.

However, you cannot put a linear layout with buttons in a WebView
itself, nor can DOM events or JavaScript directly cause changes
outside of the Web page without assistance from Java code.

On Thu, May 3, 2012 at 8:06 AM, arun kumar hariarun2...@gmail.com wrote:

 Hello all,
 i created one html page with two buttons. then i stored that html page in 
 assets folder. then i load that html page to web view. my question is if i 
 click that html button i want to show android native layout like linear 
 layout with buttons? is it possible?

 --
 WITH REGARDS
 ARUN KUMAR P D
 +91-9994794759

 --

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




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

Android Training...At Your Office: http://commonsware.com/training

-- 
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: How to call Android Native functions from html page

2012-05-03 Thread arun kumar
Hai Murphy,
Thanks For your answer. in that button click event i used intent that part
is  working. but i want if i click that button i want to show a button or
layout in a same activity?

On Thu, May 3, 2012 at 5:46 PM, Mark Murphy mmur...@commonsware.com wrote:

 You can start up another activity that has linear layout with buttons.

 Or, you can use addJavaScriptInterface() to have JavaScript code call
 a method in your app that puts a linear layout with buttons
 somewhere adjacent to the WebView on the current activity, or loads a
 new fragment, or something.

 However, you cannot put a linear layout with buttons in a WebView
 itself, nor can DOM events or JavaScript directly cause changes
 outside of the Web page without assistance from Java code.

 On Thu, May 3, 2012 at 8:06 AM, arun kumar hariarun2...@gmail.com wrote:
 
  Hello all,
  i created one html page with two buttons. then i stored that html page
 in assets folder. then i load that html page to web view. my question is if
 i click that html button i want to show android native layout like linear
 layout with buttons? is it possible?
 
  --
  WITH REGARDS
  ARUN KUMAR P D
  +91-9994794759
 
  --
 
  --
  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




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

 Android Training...At Your Office: http://commonsware.com/training

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




-- 
WITH REGARDS
ARUN KUMAR P D
+91-9994794759

-- 
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: How to call Android Native functions from html page

2012-05-03 Thread Mark Murphy
On Thu, May 3, 2012 at 8:32 AM, arun kumar hariarun2...@gmail.com wrote:
 Thanks For your answer. in that button click event i used intent that part
 is  working. but i want if i click that button i want to show a button or
 layout in a same activity?

As I wrote:

 Or, you can use addJavaScriptInterface() to have JavaScript code call
 a method in your app that puts a linear layout with buttons
 somewhere adjacent to the WebView on the current activity, or loads a
 new fragment, or something.

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

Android Training...At Your Office: http://commonsware.com/training

-- 
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: How to call Android Native functions from html page

2012-05-03 Thread arun kumar
yeah i tried adjacent to web view still not working. can u send sample code
for i click html button i want to show android native button in that
webview.

On Thu, May 3, 2012 at 6:05 PM, Mark Murphy mmur...@commonsware.com wrote:

 On Thu, May 3, 2012 at 8:32 AM, arun kumar hariarun2...@gmail.com wrote:
  Thanks For your answer. in that button click event i used intent that
 part
  is  working. but i want if i click that button i want to show a button or
  layout in a same activity?

 As I wrote:

  Or, you can use addJavaScriptInterface() to have JavaScript code call
  a method in your app that puts a linear layout with buttons
  somewhere adjacent to the WebView on the current activity, or loads a
  new fragment, or something.

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

 Android Training...At Your Office: http://commonsware.com/training

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




-- 
WITH REGARDS
ARUN KUMAR P D
+91-9994794759

-- 
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: How to call Android Native functions from html page

2012-05-03 Thread Kristopher Micinski
Mark doesn't have sample code for that lying around somewhere, and I doubt
anyone else does either, so asking for it is unlikely to get you responses..

What did you try, and how did it not work?

kris

On Thu, May 3, 2012 at 8:44 AM, arun kumar hariarun2...@gmail.com wrote:

 yeah i tried adjacent to web view still not working. can u send sample
 code for i click html button i want to show android native button in that
 webview.


 On Thu, May 3, 2012 at 6:05 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Thu, May 3, 2012 at 8:32 AM, arun kumar hariarun2...@gmail.com
 wrote:
  Thanks For your answer. in that button click event i used intent that
 part
  is  working. but i want if i click that button i want to show a button
 or
  layout in a same activity?

 As I wrote:

  Or, you can use addJavaScriptInterface() to have JavaScript code call
  a method in your app that puts a linear layout with buttons
  somewhere adjacent to the WebView on the current activity, or loads a
  new fragment, or something.

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

 Android Training...At Your Office: http://commonsware.com/training

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




 --
 WITH REGARDS
 ARUN KUMAR P D
 +91-9994794759

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