Groups
Groups
Sign in
Groups
Groups
日本Androidの会
Conversations
About
Send feedback
Help
WebViewでページの最後までスクロールした時のイベントを取得する方法について
2,981 views
Skip to first unread message
鎌田 聡
unread,
May 28, 2012, 9:58:35 PM
5/28/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Androidの会
いつもお世話になっております。
鎌田と申します。
WebViewでページの最後までスクロールした時のイベントを取得する方法について、
どのように実現したら良いのか、皆様にご相談したく投稿しました。
やりたい事としましては、以下の通りです。
・アプリケーション起動時に、Web上にある利用規約ページを表示
・規約ページの最後までスクロールされたら、規約を確認したと判断し、
「同意する」「同意しない」ボタンを有効にする。
以上です。
調べたところ、onTouchEventで、WebViewのスクロール位置(getScrollY()で取得)と
表示しているコンテンツの高さ(getContentHeight()で取得)の取得までできたのですが、
スクロール位置がスクロールバーの上部の位置のため、スクロールの高さを取得し、
最後まで、スクロールされたか判断をしたいのですが、取得方法がわかりませんでした。
どなたか、ご存知の方がいらっしゃいましたら、教えて頂けませんでしょうか?
bina
unread,
May 29, 2012, 12:00:38 AM
5/29/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-g...@googlegroups.com
鎌田さん
binaと申します。
onScrollChanged でスクロールは検知できると思います。
参考になればと思います。
よろしくお願いします。
2012年5月29日火曜日 10時58分35秒 UTC+9 鎌田 聡:
2012年5月29日火曜日 10時58分35秒 UTC+9 鎌田 聡:
2012年5月29日火曜日 10時58分35秒 UTC+9 鎌田 聡:
2012年5月29日火曜日 10時58分35秒 UTC+9 鎌田 聡:
Ishikawa Hiromi
unread,
May 29, 2012, 3:51:37 AM
5/29/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-g...@googlegroups.com
鎌田さん
こんにちは。
プログラム的に何かするよりも、レイアウトを工夫して、単純に規約ページの一番下に「同意する」「同意しない」ボタンを置けばいいんじゃないでしょうか?
2012年5月29日 10:58 鎌田 聡 <
kamat...@gmail.com
>:
> --
> このメールは Google グループのグループ「日本Androidの会」の登録者に送られています。
> このグループに投稿するには、
android-g...@googlegroups.com
にメールを送信してください。
> このグループから退会するには、
android-group-j...@googlegroups.com
にメールを送信してください。
> 詳細については、
http://groups.google.com/group/android-group-japan?hl=ja
からこのグループにアクセスしてください。
>
鎌田 聡
unread,
May 31, 2012, 10:01:13 PM
5/31/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-g...@googlegroups.com
>binaさん
>
Ishikawa Hiromi
さん
返答遅くなりまして、申し訳ございません。
ご回答ありがとうございました。
当初、binaさんに頂いた案で実装を試してみたのですが、
WebViewで、onScrollChangedイベントをハンドリングする方法がわからず、
今回は、
Ishikawa Hiromiさんに頂いた案で対応することになりました。
ありがとうございました。
2012年5月29日火曜日 10時58分35秒 UTC+9 鎌田 聡:
いつもお世話になっております。
Reply all
Reply to author
Forward
0 new messages