File: package.html

package info (click to toggle)
android-platform-frameworks-base 1%3A10.0.0%2Br36-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 321,788 kB
  • sloc: java: 962,234; cpp: 274,314; xml: 242,770; python: 5,060; sh: 1,432; ansic: 494; makefile: 47; sed: 19
file content (40 lines) | stat: -rw-r--r-- 1,839 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<HTML>
<BODY>
<p>Provides classes that allow you to create spell checkers in a manner similar to the
input method framework (for IMEs).</p>

<p>To create a new spell checker, you must implement a service that extends {@link
android.service.textservice.SpellCheckerService} and extend the {@link
android.service.textservice.SpellCheckerService.Session} class to provide spelling suggestions based
on text provided by the interface's callback methods. In the {@link
android.service.textservice.SpellCheckerService.Session} callback methods, you must return the
spelling suggestions as {@link android.view.textservice.SuggestionsInfo} objects. </p>

<p>Applications with a spell checker service must declare the {@link
android.Manifest.permission#BIND_TEXT_SERVICE} permission as required by the service. The service
must also declare an intent filter with {@code <action
android:name="android.service.textservice.SpellCheckerService" />} as the intent’s action and should
include a {@code <meta-data>} element that declares configuration information for the spell
checker. For example:</p>

<pre>
&lt;service
    android:label="&#064;string/app_name"
    android:name=".SampleSpellCheckerService"
    android:permission="android.permission.BIND_TEXT_SERVICE" >
    &lt;intent-filter >
        &lt;action android:name="android.service.textservice.SpellCheckerService" />
    &lt;/intent-filter>
    &lt;meta-data
        android:name="android.view.textservice.scs"
        android:resource="&#064;xml/spellchecker" />
&lt;/service>
</pre>

<p>For example code, see the sample <a
href="{@docRoot}resources/samples/SpellChecker/SampleSpellCheckerService/index.html">Spell
Checker service</a> app, and the sample <a
href="{@docRoot}resources/samples/SpellChecker/HelloSpellChecker/index.html">Spell
Checker client</a> app.</p>
</BODY>
</HTML>