Change text color from InputMethodService

I'm modifying gingerbread keyboard. I want to change the color of the text that i'm entering. Its possible when I'm entering the text using InputConnection.setComposingText(CharSequence, cursorPosition) since the argument of the method setComposingText allows a Spannable type. But when I press the space button, that is, when the text is committed, the color goes back to default.

InputConnection's commitText method takes the same arguments as the setComposingText. But the color is not changed. How can I overcome the problem?

will appreciate any help


public abstract boolean commitText (CharSequence text, int newCursorPosition)
Commit text to the text box and set the new cursor position. Any composing text set previously will be removed automatically.

commitText function sends only the raw text to a TextBox removing any special composing styling or other state that was around it. Because it is up to the application what it should do with the text and not the responsibility of an Input Method. What style a text can support depends totally on the respective app.

Need Your Help

For statement with arrays

java arrays for-loop

I was working on a way to change to length of some code. permgen space error

android monodroid permgen

I am creating an android app in Xamarin 3. The app runs perfectly but gives an error when i try to view the .axml designer. This is the error:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.