icarus-android alternatives and similar packages
Based on the "TextView/EditText Widget" category.
Alternatively, view icarus-android alternatives based on common mentions on social networks and blogs.
-
android-autofittextview
A TextView that automatically resizes text to fit perfectly within its bounds. -
ExpandableTextView
Android's TextView that can expand/collapse like the Google Play's app description -
android-edittext-validator
Android form edit text is an extension of EditText that brings data validation facilities to the edittext. -
AutoLinkTextView
AutoLinkTextView is TextView that supports Hashtags (#), Mentions (@) , URLs (http://), Phone and Email automatically detecting and ability to handle clicks. -
Android-RobotoTextView
Implementation of a TextView and all its direct/indirect subclasses with native support for the Roboto fonts, includes the brand new Roboto Slab fonts. -
WaitingDots
Small library that provides... bouncing dots. This feature is used in number of messaging apps (such as Hangouts or Messenger), and lately in Android TV (for example when connecting to Wifi). -
SecretTextView
A TextView that simulates the effect from the app Secret where the characters fade in/out at different speeds. -
AwesomeText
A tool that facilitates working with Spans on TextViews or any extension of them (EditTexts, Buttons...). -
Masked-Edittext
Android library contain custom realisation of EditText component for masking and formatting input text -
AnimatedEditText
Androids EditText that animates the typed text. EditText is extended to create AnimatedEditText and a PinEntryEditText. -
chips-edittext-library
Chips EditText, Token EditText, Bubble EditText, Spannable EditText and etc.. There are many names of this control. Here I develop easy to understand , modify and integrate Chips Edit Text widget for Android -
EmailAutoCompleteTextView
An AutoCompleteTextView with builtin Adapter with the emails in the device. -
CurrencyEditText
A module designed to encapsulate the use of an Android EditText field for gathering currency information from a user. Supports all ISO-3166 compliant locales/currencies. -
AutosizeEditText
AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size. -
Android-SingleInputForm
A single EditText instead of a classical form. Library that implements flavienlaurent's singleinputform -
android-formidable-validation
Form validation and feedback library for Android. Provides .setText for more than just TextView and EditText widgets. Provides easy means to validate with dependencies. -
anytextview
An extension of Android's TextView, EditText and Button that let's you use the font of your choice -
MaskFormatter
Add text masking functionality to Android EditText. It will prevent user from inserting not allowed signs, and format input as well. -
KerningViews
Provides a set of views which allows to adjust the spacing between the characters of that view, AKA, Kerning effect. -
SimpleLinkableText
Simple way to create linked text, such as @username or #hashtag, in Android TextView and EditText
InfluxDB - Purpose built for real-time analytics at any scale.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of icarus-android or a related project?
README
icarus-android
Maybe the best rich text editor on android platform. Base on Simditor
[demo](demo.gif)
Features
- Alignment (left/center/right)
- Bold
- Blockquote
- Code
- Horizontal ruler
- Italic
- Image
- Indent
- Link
- Outdent
- Ordered List
- Unordered List
- Underline
- Raw html (Insert anything to any selection range that you want via API)
Usage
Add this line to your build.gradle
file under your module directory.
compile 'com.github.mr5:icarus:0.1.14'
Java codes:
import android.app.Activity;
import android.webkit.WebView;
import android.widget.TextView;
import com.github.mr5.icarus.entity.Options;
import com.github.mr5.icarus.button.TextViewButton;
class EditorActivity extends Activity {
protected WebView webView;
protected Icarus icarus;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Get WebView from your layout, or create it manually.
setContentView(R.layout.activity_main);
webView = (WebView) findViewById(R.id.editor);
// I offered a toolbar to manage editor buttons which implements TextView that with icon fonts.
// It's just a collection, not an Android View implementation.
// TextViewToolbar will listen click events on all buttons that added to it.
// You can implement your own `Toolbar`, to prevent these default behaviors.
TextViewToolbar toolbar = new TextViewToolbar();
Options options = new Options();
options.setPlaceholder("Placeholder...");
icarus = new Icarus(toolbar, options, webView);
TextView boldButton = new TextViewButton()
boldButton.setName(Button.NAME_BOLD);
toolbar.addButton(boldButton);
icarus.render();
}
}
Button Names
see [Button.java](library/src/main/java/com/github/mr5/icarus/button/Button.java)
Options
placeholder: String
Placeholder of Editor. Use the placeholder attribute value of the textarea by default.
default: "Icarus editor."
Example:
options.setPlaceholder("Input something...");
defaultImage: String
Default image placeholder. Used when inserting pictures in Edtior.
default: "images/image.png"
Example:
options.setDefaultImage("file:///android_asset/xxx.jpg");
cleanPaste: Boolean
Remove all styles in paste content automatically.
default: false
Example:
options.setCleanPaste(true);
allowedTags: String[]
Tags that are allowed in Editor
default: {"br", "span", "a", "img", "b", "strong", "i", "strike", "u", "font", "p", "ul", "ol", "li", "blockquote", "pre", "code", "h1", "h2", "h3", "h4", "hr"}
Example:
// option replacement.
options.setAllowedTags(Arrays.asList("a", "span", "img");
// add tag to current tag list.
options.addAllowedTag("pre");
allowedAttributes: Map<String, List<String>>
Whitelist of tag attributes. Note that custom whitelist will be merged into the default one.
default:
img: {"src", "alt", "width", "height", "data-non-image"}
a: {"href", "target"}
font: {"color"}
code: {"class"}
Example:
// option replacement.
options.setAllowedAttributes(new HashMap<String, List<String>>());
// add new attribute to current tag list.
options.addAllowedAttributes("a", Arrays.asList("class", "src", "alt", "data-type"));
Load Javascript or Stylesheet files.
icarus.loadCSS("file:///android_asset/editor.css");
icarus.loadJs("file:///android_asset/test.js");
Popover
Some buttons depend user's actions, such as Button.NAME_LINK
, Button.NAME_IMAGE
. So you want to show a popover for user to do these actions. Icarus offered 3 Popover Implementations, [HtmlPopoverImpl
](library/src/main/java/com/github/mr5/icarus/popover/HtmlPopoverImpl.java), [ImagePopoverImpl
](library/src/main/java/com/github/mr5/icarus/popover/ImagePopoverImpl.java), [LinkPopoverImpl
](library/src/main/java/com/github/mr5/icarus/popover/LinkPopoverImpl.java),
[popover](popover.png)
Samples:
TextView imageButtonTextView = (TextView) findViewById(R.id.button_image);
imageButtonTextView.setTypeface(iconfont);
TextViewButton imageButton = new TextViewButton(imageButtonTextView, icarus);
imageButton.setName(Button.NAME_IMAGE);
imageButton.setPopover(new ImagePopoverImpl(imageButtonTextView, icarus));
toolbar.addButton(imageButton);
You can implement your own popover to handler user's actions.
Insert html to current selection
icarus.insertHtml("<iframe src=\\"xxx\\"></iframe>");
Contents getting and setting
// Get contents
icarus.getContent(new Callback() {
@Override
public void run(String params) {
Gson gson = new Gson();
Html html = gson.fromJson(params, Html.class);
Log.d("Content gotten", html.getContent());
}
});
// Set contents
icarus.setContent("new content");
License
*Note that all licence references and agreements mentioned in the icarus-android README section above
are relevant to that project's source code only.