【问题标题】:How to use getSelectionStart and getSelectionEnd of TextViewwhen user touches?用户触摸时如何使用TextView的getSelectionStart和getSelectionEnd?
【发布时间】:2011-08-05 07:44:26
【问题描述】:

我想通过 parcing 在 textView 中获取电话号码之类的文本,并且我想使用这个 getSelectionStart(),但它不起作用?谁能给我一个例子。

【问题讨论】:

  • 您可能需要解释您尝试过的内容,并发布您使用 getSelectionStart 的代码以了解为什么这不起作用。

标签: android parsing text textview


【解决方案1】:

我的第一个答案很糟糕,因为我将 getselection 与 2.3 的新文本 api 混合在一起。

你会在这些帖子中找到一些答案:

Android - get selection of text from EditText

How to use getSelectionStart and getSelectionEnd of EditText when user touches EditText?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-04-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多