Groups
Groups
Sign in
Groups
Groups
日本Androidの会
Conversations
About
Send feedback
Help
EditTextで選択位置に文字列を貼り付け・削除するには?
449 views
Skip to first unread message
たけし
unread,
Jul 4, 2012, 8:27:30 AM
7/4/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
EditTextで部分選択したテキストを、プログラムから別のテキストを貼り付け・削除するにはどうすればいいでしょうか?
Android2.2以降です。
Hirokazu Fukami
unread,
Jul 4, 2012, 9:02:32 AM
7/4/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
こんばんはfkmです。
以下にクリップボードに関する説明があります
http://developer.android.com/guide/topics/text/copy-paste.html#Pasting
勝手に翻訳版
https://sites.google.com/a/techdoctranslator.com/jp/android/guide/copy-paste#Pasting
2012/7/4 たけし <
vixa...@gmail.com
>:
> EditTextで部分選択したテキストを、プログラムから別のテキストを貼り付け・削除するにはどうすればいいでしょうか?
>
> Android2.2以降です。
>
> --
> このメールは Google グループのグループ「日本Androidの会」の登録者に送られています。
> このディスカッションをウェブ上で閲覧するには、
https://groups.google.com/d/msg/android-group-japan/-/8e4ZXO_weUAJ
> にアクセスしてください。
> このグループに投稿するには、
android-g...@googlegroups.com
にメールを送信してください。
> このグループから退会するには、
android-group-j...@googlegroups.com
> にメールを送信してください。
> 詳細については、
http://groups.google.com/group/android-group-japan?hl=ja
> からこのグループにアクセスしてください。
--
-------------------------------------------------------------
深見 浩和(Hirokazu Fukami)
URI:
http://www.fkmsoft.jp
email:
f...@fkmsoft.jp
たけし
unread,
Jul 4, 2012, 9:50:16 AM
7/4/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
fkmさん、ありがとうございます。
クリップボードについてはわかりますが、選択位置にクリップボードにコピーした文字列を貼り付ける方法がわかりません。
もちろん手動でなら貼り付けられますが、そうではなくてプログラムから貼り付けたいです。
2012年7月4日水曜日 22時02分32秒 UTC+9 fkm:
Hirokazu Fukami
unread,
Jul 4, 2012, 10:08:05 AM
7/4/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
こんばんはfkmです。
EditText#getSelectionStart/Endで選択範囲の開始と終了位置が取得できるので、
あとは文字列の置換で実現できないでしょうか?
http://developer.android.com/reference/android/widget/TextView.html#getSelectionStart%28%29
2012/7/4 たけし <
vixa...@gmail.com
>:
> --
> このメールは Google グループのグループ「日本Androidの会」の登録者に送られています。
> このディスカッションをウェブ上で閲覧するには、
https://groups.google.com/d/msg/android-group-japan/-/OlgtB92Fkd8J
たけし
unread,
Jul 4, 2012, 1:50:10 PM
7/4/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
fkmさん、ありがとうございます。
なるほど。
もうAndroidではなくJavaの操作だけですね。
2012年7月4日水曜日 23時08分05秒 UTC+9 fkm:
Reply all
Reply to author
Forward
0 new messages