I'm trying to find a way to format EditText in an Android app that I'm planning to create.
When I created a example project to do this, all there is are plain text multiline edit text etc. There isn't really a specific EditText for rich text formatting. For instance in windows there is RichTextBox. Here thw developer can set styles such as bold,Italics underline etc. by selecting part of the text and styling it.
I'm wondering how I can achieve this in Android development. Can someone shed some light on this, would be greatly appreciated!
Related
Anyone knows how to get the text of any component like textview, button, or edit text with it is current font style.
My issue is that I am getting a normal text with text view.getText() but I want to text with the custom font which I have applied with Typeface.
Thanks in advance
Share your code and what you have done until now in your thread, if you get error include it to your post. Here guide for asking in SO Guide Ask in SO
I want to ask you if it's possible to create formatted text like
This text is normal and this one is bold. We also have an italic font slope.
in this way:
graphics.DrawString("This text is normal and this one is bold. We also have an italic font slope.", font, PdfBrushes.Black, new PointF(0, 0));
I tried to use order the documentation a HTML Styled Text (https://help.syncfusion.com/file-formats/pdf/working-with-text#adding-a-html-styled-text) but PdfHTMLTextElement Class is not supported in Xamarin.
A next choice was to insert RTF text (https://help.syncfusion.com/file-formats/pdf/working-with-text#inserting-rich-text-format-contents) it's also impossible to use that in Xamarin.
I'd also to have a formatted string inside a cells of PdfLightTable. Have you any tips how to achieve this?
I'd appreciate your help very much.
At present the PdfHTMLTextElement is not supported in Xamarin platform. In order to achieve your requirement, we have created the workaround sample for applying style to the text based on HTML tags.
Please find the
Sample
Thanks.
I am wondering if anyone can point me in the right direction. I am fairly new to android, and I am trying to change the Hebrew text font in my application to a more biblical look. Any ideas? A tutorial would be greatly appreciated.
i want to create a simple rich text editor in android, just like this application on google play store: https://play.google.com/store/apps/details?id=com.spn.richnotepad&hl=en
and i am very new in android so anyone can provide some idea about it.
Thank You
It's not difficult at all but before you start I highly recommend you to read the guide from Android Developer site:
https://developer.android.com/training/basics/data-storage/index.html
You will learn how to save data which is a very important part of your project.
Then you have to learn all about EditText (allows the user to type text into your app) and TextView (displays text on screen).
http://developer.android.com/guide/topics/ui/controls/text.html
When your app is finished you can add some additional functionality:
Spelling Suggestions
https://developer.android.com/training/keyboard-input/index.html
Text Formatting
http://www.chrisumbel.com/article/android_textview_rich_text_spannablestring
Font Style
http://code.tutsplus.com/tutorials/quick-tip-customize-android-fonts--mobile-1601
Some useful links:
http://developer.android.com/reference/android/widget/EditText.html
http://developer.android.com/reference/android/widget/TextView.html
I also advice you this Notepad Tutorial which will guide you step by step to construct a simple notes list that lets the user add new notes.
http://developer.android.com/training/notepad/index.html
Check out this one https://github.com/chinalwb/Android-Rich-text-Editor, it is still in progress but you may get some pointers from there. Thanks.
Supported styles:
Bold
Italic
Underline
Strikethrough
Numeric list
Bullet list
Align left
Align center
Align right
Insert image
Background color
Hyper link
#
Quote
Foreground color
Emoji icon
Superscript
Subscript
Font size
Video
Image from internet
Dividing line
All styles support save as HTML file
Set init html content and continue editing or displaying
Demo for part of the supported features
Found some quick solutions :
droid-writer
cwac-richedit
Also check following discussions:
Rich Text Box in android
Implementing a rich text editor in Android?
Basically, i am trying to implement a WYSIWYG editor just like MS Word or Quick Office. After so much R & D, i am not able to find a good simple solution.,The app would contain basic formatting buttons like text style, font, size, alignment, bullets.,.
So please anyone suggest something
I am adding snapshots from QuickOffice.,It is WYSIWIG Rich Text editor.
Snapshots are in a Series from 1 to 5.,.Pleas go through them..,.I am sure you will understand what i want now.,.
Rahul I got the point. Thanks for your explanation.
You have to build the listener what you are looking for any button's action. Like bold the text, underline , changing the color or font, change the justification of text and others. I will prefer to follow these link from where you will get depth knowledge of working with text editor on android:
GOOGLE DRIVE SDK [ANDROID, iOS , Java & more platform]
https://github.com/googledrive/dredit
Some other repository you can check :
https://github.com/paulmach/Text-Edit-for-Android
https://github.com/jecelyin/920-Text-Editor
https://github.com/jiro-aqua/Jota-Text-Editor
And if you get any specific problem you can share I will try to give the solution.
Happy coding !!!