My problem is that I want to get the exact text from the edit text with the font that is installed in the text editor, as well as the text size, text color and text style, such as bold, italics and underline.
so far I have used Spannable, like this Spannable messageText; , and get the text from EditText, like this
messageText = editText.getText();
and set to textview
textView.setText(messageText);
But in this case, it returns only a simple string, not color,font,size and style .
EditText <EditText android:id="@+id/message" android:layout_width="fill_parent" android:layout_height="180dp" android:inputType="textMultiLine" android:singleLine="false" android:tag="no" android:textColor="#000000" android:textSize="15sp" android:textStyle="normal" android:typeface="normal" /> TextView <TextView android:id="@+id/preview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="" android:textColor="#000000" android:textSize="15sp" android:textStyle="normal" android:typeface="normal" />
Help me thanks
android android-edittext textview
Naveen kumar
source share