Submit Search
Upload
Rich Text Editing and Beyond
•
4 likes
•
2,914 views
C
CommonsWare
Follow
From the AnDevCon III conference
Read less
Read more
Technology
Education
Report
Share
Report
Share
1 of 21
Download now
Download to read offline
Recommended
Android Security: Defending Your Users
Android Security: Defending Your Users
CommonsWare
Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
CommonsWare
Getting Android Developers for Your Wearables
Getting Android Developers for Your Wearables
CommonsWare
When Microwatts Are Precious: Battery Tips for Wearable Apps
When Microwatts Are Precious: Battery Tips for Wearable Apps
CommonsWare
ExoPlayer for Application developers
ExoPlayer for Application developers
Hassan Abid
App integration: Strategies and Tactics
App integration: Strategies and Tactics
CommonsWare
Embedded Android Workshop with Pie
Embedded Android Workshop with Pie
Opersys inc.
App Integration (Revised and Updated)
App Integration (Revised and Updated)
CommonsWare
Recommended
Android Security: Defending Your Users
Android Security: Defending Your Users
CommonsWare
Gradle and Your Android Wearable Projects
Gradle and Your Android Wearable Projects
CommonsWare
Getting Android Developers for Your Wearables
Getting Android Developers for Your Wearables
CommonsWare
When Microwatts Are Precious: Battery Tips for Wearable Apps
When Microwatts Are Precious: Battery Tips for Wearable Apps
CommonsWare
ExoPlayer for Application developers
ExoPlayer for Application developers
Hassan Abid
App integration: Strategies and Tactics
App integration: Strategies and Tactics
CommonsWare
Embedded Android Workshop with Pie
Embedded Android Workshop with Pie
Opersys inc.
App Integration (Revised and Updated)
App Integration (Revised and Updated)
CommonsWare
Effective Spring on Kubernetes
Effective Spring on Kubernetes
Neven Cvetković
The unconventional devices for the video streaming in Android
The unconventional devices for the video streaming in Android
Alessandro Martellucci
Running Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native Images
VMware Tanzu
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
Christopher Judd
Why companies like Google, Alibaba and UOL choose Flutter
Why companies like Google, Alibaba and UOL choose Flutter
Geison Goes
[Android] DI in multimodule application
[Android] DI in multimodule application
Oleg Mazhukin
Best Practices in Media Playback
Best Practices in Media Playback
GDG Korea
Flutter not yet another mobile cross-platform framework - i ox-kl19
Flutter not yet another mobile cross-platform framework - i ox-kl19
oradoe
Flutter101
Flutter101
인수 장
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3
Opersys inc.
Intro to Flutter
Intro to Flutter
Eason Pai
Reactive declarative UI as code - DroidCon Vietnam 2019
Reactive declarative UI as code - DroidCon Vietnam 2019
oradoe
Introduction to android studio 2.0 and data binding library
Introduction to android studio 2.0 and data binding library
Kaushal Dhruw
UI Automation Using Flutter
UI Automation Using Flutter
Sharaniya Premkumar
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
Vijay Rastogi
Gradle and Android Studio : Best of Friends
Gradle and Android Studio : Best of Friends
Romin Irani
Counterclockwise past present future
Counterclockwise past present future
lolopetit
Building GPE: What We Learned
Building GPE: What We Learned
rajeevdayal
Gradle & Android Studio - Introduction
Gradle & Android Studio - Introduction
Kevin Pelgrims
Migrating to Angular 5 for Spring Developers
Migrating to Angular 5 for Spring Developers
Gunnar Hillert
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014
DouglasWaterfall
Dust.js
Dust.js
Yevgeniy Brikman
More Related Content
What's hot
Effective Spring on Kubernetes
Effective Spring on Kubernetes
Neven Cvetković
The unconventional devices for the video streaming in Android
The unconventional devices for the video streaming in Android
Alessandro Martellucci
Running Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native Images
VMware Tanzu
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
Christopher Judd
Why companies like Google, Alibaba and UOL choose Flutter
Why companies like Google, Alibaba and UOL choose Flutter
Geison Goes
[Android] DI in multimodule application
[Android] DI in multimodule application
Oleg Mazhukin
Best Practices in Media Playback
Best Practices in Media Playback
GDG Korea
Flutter not yet another mobile cross-platform framework - i ox-kl19
Flutter not yet another mobile cross-platform framework - i ox-kl19
oradoe
Flutter101
Flutter101
인수 장
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3
Opersys inc.
Intro to Flutter
Intro to Flutter
Eason Pai
Reactive declarative UI as code - DroidCon Vietnam 2019
Reactive declarative UI as code - DroidCon Vietnam 2019
oradoe
Introduction to android studio 2.0 and data binding library
Introduction to android studio 2.0 and data binding library
Kaushal Dhruw
UI Automation Using Flutter
UI Automation Using Flutter
Sharaniya Premkumar
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
Vijay Rastogi
Gradle and Android Studio : Best of Friends
Gradle and Android Studio : Best of Friends
Romin Irani
Counterclockwise past present future
Counterclockwise past present future
lolopetit
Building GPE: What We Learned
Building GPE: What We Learned
rajeevdayal
Gradle & Android Studio - Introduction
Gradle & Android Studio - Introduction
Kevin Pelgrims
Migrating to Angular 5 for Spring Developers
Migrating to Angular 5 for Spring Developers
Gunnar Hillert
What's hot
(20)
Effective Spring on Kubernetes
Effective Spring on Kubernetes
The unconventional devices for the video streaming in Android
The unconventional devices for the video streaming in Android
Running Spring Boot Applications as GraalVM Native Images
Running Spring Boot Applications as GraalVM Native Images
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
Why companies like Google, Alibaba and UOL choose Flutter
Why companies like Google, Alibaba and UOL choose Flutter
[Android] DI in multimodule application
[Android] DI in multimodule application
Best Practices in Media Playback
Best Practices in Media Playback
Flutter not yet another mobile cross-platform framework - i ox-kl19
Flutter not yet another mobile cross-platform framework - i ox-kl19
Flutter101
Flutter101
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3
Intro to Flutter
Intro to Flutter
Reactive declarative UI as code - DroidCon Vietnam 2019
Reactive declarative UI as code - DroidCon Vietnam 2019
Introduction to android studio 2.0 and data binding library
Introduction to android studio 2.0 and data binding library
UI Automation Using Flutter
UI Automation Using Flutter
Android App development and test environment, Understaing android app structure
Android App development and test environment, Understaing android app structure
Gradle and Android Studio : Best of Friends
Gradle and Android Studio : Best of Friends
Counterclockwise past present future
Counterclockwise past present future
Building GPE: What We Learned
Building GPE: What We Learned
Gradle & Android Studio - Introduction
Gradle & Android Studio - Introduction
Migrating to Angular 5 for Spring Developers
Migrating to Angular 5 for Spring Developers
Similar to Rich Text Editing and Beyond
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014
DouglasWaterfall
Dust.js
Dust.js
Yevgeniy Brikman
Mongo NYC PHP Development
Mongo NYC PHP Development
Fitz Agard
“Startup - it’s not just an IT project” - a random sampling of problems we’ve...
“Startup - it’s not just an IT project” - a random sampling of problems we’ve...
MobileMonday Estonia
Tim Klein's talk on making websites with SilverStripe in no time
Tim Klein's talk on making websites with SilverStripe in no time
JoannaTMcLeod
Html 5 mobile - nitty gritty
Html 5 mobile - nitty gritty
Mario Noble
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Gaurav Mishra
Taming the Legacy Beast: Turning wild old code into a sleak new thoroughbread.
Taming the Legacy Beast: Turning wild old code into a sleak new thoroughbread.
Chris Laning
From Android to the Mobile Web
From Android to the Mobile Web
CommonsWare
Web Information Systems Html and css
Web Information Systems Html and css
Artificial Intelligence Institute at UofSC
Crucible
Crucible
Brian Repko
Solution Challenge GDSC GHRCE WEB DEVELOPMENT.pdf
Solution Challenge GDSC GHRCE WEB DEVELOPMENT.pdf
GoogleDeveloperStude22
Comps into pages 102
Comps into pages 102
Edward Meehan
Let's Build a Custom Theme
Let's Build a Custom Theme
Andy Stratton
Document Object Model
Document Object Model
chomas kandar
Document Object Model
Document Object Model
chomas kandar
Dart the Better JavaScript
Dart the Better JavaScript
Jorg Janke
Dig into the omega theme
Dig into the omega theme
DrupalcampAtlanta2012
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing Company
Marcos Labad
PodsCMS Framework by Tom Hermans (WordCampNL)
PodsCMS Framework by Tom Hermans (WordCampNL)
Tom Hermans
Similar to Rich Text Editing and Beyond
(20)
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014
Dust.js
Dust.js
Mongo NYC PHP Development
Mongo NYC PHP Development
“Startup - it’s not just an IT project” - a random sampling of problems we’ve...
“Startup - it’s not just an IT project” - a random sampling of problems we’ve...
Tim Klein's talk on making websites with SilverStripe in no time
Tim Klein's talk on making websites with SilverStripe in no time
Html 5 mobile - nitty gritty
Html 5 mobile - nitty gritty
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Taming the Legacy Beast: Turning wild old code into a sleak new thoroughbread.
Taming the Legacy Beast: Turning wild old code into a sleak new thoroughbread.
From Android to the Mobile Web
From Android to the Mobile Web
Web Information Systems Html and css
Web Information Systems Html and css
Crucible
Crucible
Solution Challenge GDSC GHRCE WEB DEVELOPMENT.pdf
Solution Challenge GDSC GHRCE WEB DEVELOPMENT.pdf
Comps into pages 102
Comps into pages 102
Let's Build a Custom Theme
Let's Build a Custom Theme
Document Object Model
Document Object Model
Document Object Model
Document Object Model
Dart the Better JavaScript
Dart the Better JavaScript
Dig into the omega theme
Dig into the omega theme
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing Company
PodsCMS Framework by Tom Hermans (WordCampNL)
PodsCMS Framework by Tom Hermans (WordCampNL)
More from CommonsWare
The Action Bar: Front to Back
The Action Bar: Front to Back
CommonsWare
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
CommonsWare
Mastering the Master Detail Pattern
Mastering the Master Detail Pattern
CommonsWare
Not Quite As Painful Threading
Not Quite As Painful Threading
CommonsWare
Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot View
CommonsWare
Maps V2... And You!
Maps V2... And You!
CommonsWare
A Deep Dive Into ViewPager
A Deep Dive Into ViewPager
CommonsWare
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2
CommonsWare
Integrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
CommonsWare
X Means Y
X Means Y
CommonsWare
The Wonderful World of Wearables
The Wonderful World of Wearables
CommonsWare
Securing User Data with SQLCipher
Securing User Data with SQLCipher
CommonsWare
Beaming Data to Devices with NFC
Beaming Data to Devices with NFC
CommonsWare
What's New in Jelly Bean
What's New in Jelly Bean
CommonsWare
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business Models
CommonsWare
AppsWorld Keynote
AppsWorld Keynote
CommonsWare
Backwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and Tactics
CommonsWare
Android Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... Odd
CommonsWare
Google TV For Fun
Google TV For Fun
CommonsWare
If I Were Starting Now
If I Were Starting Now
CommonsWare
More from CommonsWare
(20)
The Action Bar: Front to Back
The Action Bar: Front to Back
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
Mastering the Master Detail Pattern
Mastering the Master Detail Pattern
Not Quite As Painful Threading
Not Quite As Painful Threading
Android Development: The 20,000-Foot View
Android Development: The 20,000-Foot View
Maps V2... And You!
Maps V2... And You!
A Deep Dive Into ViewPager
A Deep Dive Into ViewPager
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2
Integrate Android Apps and Web Apps
Integrate Android Apps and Web Apps
X Means Y
X Means Y
The Wonderful World of Wearables
The Wonderful World of Wearables
Securing User Data with SQLCipher
Securing User Data with SQLCipher
Beaming Data to Devices with NFC
Beaming Data to Devices with NFC
What's New in Jelly Bean
What's New in Jelly Bean
Making Money at Mobile: 60 Business Models
Making Money at Mobile: 60 Business Models
AppsWorld Keynote
AppsWorld Keynote
Backwards Compatibility: Strategies and Tactics
Backwards Compatibility: Strategies and Tactics
Android Hardware That's A Little Bit... Odd
Android Hardware That's A Little Bit... Odd
Google TV For Fun
Google TV For Fun
If I Were Starting Now
If I Were Starting Now
Recently uploaded
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Kalema Edgar
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
LoriGlavin3
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
DianaGray10
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Fwdays
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Florian Wilhelm
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Mattias Andersson
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
mohitsingh558521
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
LoriGlavin3
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
Lars Bell
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
ScyllaDB
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Addepto
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
LoriGlavin3
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
LoriGlavin3
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
LoriGlavin3
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Lorenzo Miniero
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Databarracks
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
LoriGlavin3
Recently uploaded
(20)
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Rich Text Editing and Beyond
1.
Rich Text Editing... And
Beyond Copyright © 2012CommonsWare, LLC
2.
Whadaya Mean, Rich? ●
Things Like Bold, Italics, Underline, Etc. ● Other Terms – Styled Text – Formatted Text – WYSIWYG Copyright © 2012CommonsWare, LLC
3.
Is Android Rich? ●
Native Rich Text Rendering in TextView – Available to all subclasses of TextView (e.g., Button) – Reasonable (but not immense) range of available styles to apply ● Differing fonts, colors ● Vertical & horizontal alignments ● Bullets ● Etc. Copyright © 2012CommonsWare, LLC
4.
Where Did All
the Strings Go? ● CharSequence – In traditional Java, an inheritance artifact ● Mostly the superclass of StringBuilder – In Android, used as basis for rich text ● Hence, lots of CharSequence parameters and return values, in places where Android supports rich text Copyright © 2012CommonsWare, LLC
5.
Spanning the Globe ●
Spanned – Interface for CharSequences with inline formatting ● Spannable – Sub-interface where the spans can be modified ● Editable – Sub-sub-interface where the text can be modified Copyright © 2012CommonsWare, LLC
6.
Getting More Concrete ●
SpannedString – String with markup ● SpannableString – String with mutable markup ● SpannableStringBuilder – String with mutable text and markup Copyright © 2012CommonsWare, LLC
7.
We Are Stylin' ●
CharacterStyle – Base class for all styles that can be applied to a portion of a Spanned – 21 total subclasses, each applying some effect ● BackgroundColorSpan ● StyleSpan ● TypefaceSpan ● StrikethroughSpan Copyright © 2012CommonsWare, LLC
8.
Our Resources Are
Low ● String Resources – Can have inline markup (<b>, <i>, <u>) – Retrieving the SpannedString ● getText() (as opposed to getString()) ● Applying the resource directly to a widget in a layout via @string/... Copyright © 2012CommonsWare, LLC
9.
Oh, Those Angle
Brackets ● HTML – Use Html.fromHtml() to convert into SpannedString ● Modest, undocumented set of tags supported ● Optional, largely undocumented TagHandler for trying to add support for other tags – Put the resulting SpannedString in a TextView (or subclass) Copyright © 2012CommonsWare, LLC
10.
Tag! You're It? ●
<a href="..."> ● <h4> ● <b> ● <h5> ● <big> ● <h6> ● <blockquote> ● <i> ● <br> ● <img src="..."> ● <cite> ● <p> ● <dfn> ● <small> ● <div align="..."> ● <strike> ● <em> ● <strong> ● <font size="..." color="..." face="..."> ● <sub> ● <h1> ● <sup> ● <h2> ● <tt> ● <h3> Copyright © 2012CommonsWare, LLC ● <u>
11.
Mark It Down ●
Anything You Can Convert to HTML ● Example: Markdown – Popular wikitext format – Used by StackOverflow, GitHub, etc. – Various parsers available – Example: AndDown ● Wrapper around sundown C parser Copyright © 2012CommonsWare, LLC
12.
Format This, Buddy ●
Step #1: Get a SpannableString (or subclass) ● Step #2: Manipulate the Formatting – setSpan() applies formatting to a particular region – removeSpan() removes a particular span – getSpans() retrieves applied spans for a given region Copyright © 2012CommonsWare, LLC
13.
The End of
Style ● SPAN_EXCLUSIVE_EXCLUSIVE – Anything added at either end is considered outside the span ● SPAN_INCLUSIVE_INCLUSIVE – Anything added at either end is considered inside the span ● SPAN_EXCLUSIVE_INCLUSIVE ● SPAN_INCLUSIVE_EXCLUSIVE Copyright © 2012CommonsWare, LLC
14.
CharSequence: Rich Yet
Not ● Most Utility Methods On String, Not CharSequence – Example: indexOf() ● TextUtils – Offers a subset of those utility methods as static methods that can be applied to a CharSequence Copyright © 2012CommonsWare, LLC
15.
Hello? Didn't You
Say “Editing”? ● EditText – Supports Editable ● Reason why you keep calling toString() to get the plain text back – Users Edit Prose in Existing Spans ● You supply something with spans, and user types in the middle of one, gets formatted – No UI for Users to Set Own Spans Copyright © 2012CommonsWare, LLC
16.
RichEditText ●
Open Source Component ● Easy: Automatic FORMAT Action Mode – One method to enable – Works on Android 2.1+ (ActionBarSherlock!) – Works great on tablets (and not so hot on phones...) ● Harder: Roll Your Own UI – E.g., toolbar Copyright © 2012CommonsWare, LLC
17.
RichEditText: Innards ●
Action Mode Items Set or Toggle “Effects” – Effect = Wrapper Around CharacterStyle ● Awareness of current selection ● Manages idiosyncrasies of different style classes – Toggle Logic ● See what's in the selection now of this particular effect ● Invert current setting Copyright © 2012CommonsWare, LLC
18.
RichEditText: The Future! ●
Better Support for Phones – ...somehow... ● Full Range of CharacterStyle Support – Colors (foreground/background) – Line alignment – Bullets – Links ● Ragnarök Copyright © 2012CommonsWare, LLC
19.
A Little Bit
Persistent ● SpannableString Not Serializable ● Best Native Bet: Convert into HTML – Need to test that the formatting you apply will survive the round-trip conversion ● Alternative: DIY – More complete HTML conversion – Convert into something else (byte array? Markdown?) Copyright © 2012CommonsWare, LLC
20.
What Would Be
Handy... ● More In, More Out – Better HTML Conversion – More wikitext support ● Other flavors ● Bi-directional – Word processing formats (ODT, DOC/DOCX) – Legacy formats ● RTF Copyright © 2012CommonsWare, LLC
21.
What Would Be
Handy... ● More CharacterStyles? – Theoretically an extensible system, based on interfaces ● More Reusable Editing Widgets – EditStyledText? Copyright © 2012CommonsWare, LLC
Download now