1

It appears trivial even on the 'Usage' section here My edit text appears just the same, when i type on it everything appears as usual, when i select text everything is still normal. No "FORMAT" entry on the action mode. What am I doing wrong??

My layout:

<com.commonsware.cwac.richedit.RichEditText
android:id="@+id/editTextSermon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="top"
android:hint="@string/type_the_sermon_here"
android:lines="10"
android:imeOptions="flagNoExtractUi"
android:inputType="textMultiLine">
<requestFocus/>
</com.commonsware.cwac.richedit.RichEditText>

In my activity:

sermonText = (RichEditText) findViewById(R.id.editTextSermon);
sermonText.enableActionModes(true);

From the documentation that is all I need to do, or is it?

On a side note part of the documentation reads like this:

On its own, by default, RichEditText provides one means of users applying formatting: the standard Ctrl-B for bold, Ctrl-I for italics, and Ctrl-U for underline work if there is a selection.

I've never seen a 'Control' button on an android keyboard. Whats going on? I just want to be able to bold, italicize and underline my text.

Community
  • 1
  • 1
kev
  • 1,148
  • 2
  • 14
  • 29
  • "From the documentation that is all I need to do, or is it?" -- yes, though some devices screw with `EditText` and therefore won't let me hook into the action mode. Eventually, I'll have a separate `Toolbar` (or possibly the M floating action mode). What device are you testing on? "I've never seen a 'Control' button on an android keyboard" -- yes, but there are external keyboards available (e.g., Bluetooth, hardware docks) that can have Control keys. – CommonsWare May 28 '15 at 20:34
  • I'm testing on a samsung galaxy s4 – kev May 28 '15 at 20:43
  • There are many devices that Samsung markets as the Galaxy S4. Have you tried running the demo app as-is on this device? – CommonsWare May 28 '15 at 20:47
  • Yeah I've run the demo. It also doesn't show anything. – kev May 28 '15 at 20:59
  • Wait, spoke too soon. the demo actually does show the options. – kev May 28 '15 at 20:59
  • Well, [the demo activity is pretty short](https://github.com/commonsguy/cwac-richedit/blob/master/demo/src/main/java/com/commonsware/cwac/richedit/demo/RichTextEditorDemoActivity.java). Compare the demo app with your app, see what's different, and see if you can determine what's different that is causing the behavior change. – CommonsWare May 28 '15 at 21:02

0 Answers0