All Projects → zeoflow → stylar

zeoflow / stylar

Licence: Apache-2.0 License
An Android markdown library - it does not require WebView

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to stylar

bottom-dialogs
An Android Library that shows on the bottom of the screen a fully customisable dialog.
Stars: ✭ 14 (-6.67%)
Mutual labels:  zeoflow, zeoflow-library
flow-kit
An Android Library that comes with useful features and components.
Stars: ✭ 15 (+0%)
Mutual labels:  zeoflow, zeoflow-library
memo
Android processing and secured library for managing SharedPreferences as key-value elements efficiently and structurally.
Stars: ✭ 18 (+20%)
Mutual labels:  zeoflow, zeoflow-library
markdown
Learn Markdown. Persian and English version.
Stars: ✭ 29 (+93.33%)
Mutual labels:  md
dillinger
The last Markdown editor, ever.
Stars: ✭ 7,533 (+50120%)
Mutual labels:  md
ngx-showdown
Angular (>=2) integration for Showdown
Stars: ✭ 16 (+6.67%)
Mutual labels:  md
WacOS
A Linux distribution that mimics MacOS (modern and classic) iOS, and other Apple operating systems, but is open, customizable, and free to use on non-apple hardware.
Stars: ✭ 18 (+20%)
Mutual labels:  md
inos-baileys-wabot
WhatsApp Bot Using Baileys Library
Stars: ✭ 35 (+133.33%)
Mutual labels:  md
modern-cpp
C++ online course. Modules about modern C++ features. C++11, C++14, C++17 and C++20
Stars: ✭ 15 (+0%)
Mutual labels:  md
umdoc
A Markdown to LaTeX to PDF converter
Stars: ✭ 15 (+0%)
Mutual labels:  md
paper-terminal
Print Markdown to a paper in your terminal
Stars: ✭ 33 (+120%)
Mutual labels:  md
safemd
Safety first markdown rendering
Stars: ✭ 77 (+413.33%)
Mutual labels:  md
markdown.css
📝 The simple CSS to replicate the GitHub Markdown style (Sukka Ver.)
Stars: ✭ 13 (-13.33%)
Mutual labels:  md
envoyproxy doc ZH CN
envoyproxy 智能代理中文参考文档 v1.5.0
Stars: ✭ 75 (+400%)
Mutual labels:  md
html2md
helloworld 开发者社区开源的一个轻量级,强大的 html 一键转 md 工具,支持多平台文章一键转换,并保存下载到本地。
Stars: ✭ 332 (+2113.33%)
Mutual labels:  md
sphinx-jekyll-builder
sphinx builder that outputs jekyll compatible markdown files with frontmatter
Stars: ✭ 18 (+20%)
Mutual labels:  md
markdown-fenced-code-tabs
Generates tabs for consecutive markdown code blocks
Stars: ✭ 46 (+206.67%)
Mutual labels:  md
mddatasetbuilder
A script to build reference datasets for training neural network potentials from given LAMMPS trajectories.
Stars: ✭ 23 (+53.33%)
Mutual labels:  md
RxFamilyUser
框架使用retrofit2与rxjava2+databing,Md风格一个开源项目.
Stars: ✭ 21 (+40%)
Mutual labels:  md
reacnetgenerator
an automatic reaction network generator for reactive molecular dynamics simulation
Stars: ✭ 25 (+66.67%)
Mutual labels:  md

Stylar for Android

Intro

An Android markdown library - it does not require WebView

Getting Started

For information on how to get started with Stylar, take a look at our Getting Started guide.

Submitting Bugs or Feature Requests

Bugs or feature requests should be submitted at our GitHub Issues section.

How does it work?

1. Depend on our library

Stylar for Android is available through Google's Maven Repository. To use it:

  1. Open the build.gradle file for your application.

  2. Make sure that the repositories section includes Google's Maven Repository google(). For example:

      allprojects {
        repositories {
          google()
          jcenter()
        }
      }
  3. Add the library to the dependencies section:

      dependencies {
        // ...
        implementation 'com.zeoflow:stylar:<version>'
        // ...
      }

2. Add the StylarView component to your app

activity_main.xml

    <!--
        ...
    -->
    <com.zeoflow.stylar.view.StylarView
        android:id="@+id/zStylarView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>
    <!--
        ...
    -->

3. Activity/Fragment Class

MainActivity.java

public class MainActivity extends BindAppActivity<ActivityMainBinding, MainViewBinding>
{
    //..
    private StylarView zStylarView;
    //..
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState)
    {
        //..
        zStylarView = findViewById(R.id.zStylarView)
        //..
        final Stylar stylar = Stylar.builder(this)
            .withLayoutElement(zStylarView)
            .withAnchoredHeadings(true)
            .withImagePlugins(true)
            .withCodeStyle(false)
            .setClickEvent(link -> Toast.makeText(MainActivity.this, link, Toast.LENGTH_SHORT).show())
            .usePlugin(new AbstractStylarPlugin() {
                @Override
                public void configureTheme(@NonNull StylarTheme.Builder builder) {
                    builder
                        .codeTextColor(Color.parseColor("#CE570CC1"))
                        .codeBackgroundColor(Color.parseColor("#EDEDED"));
                }
            })
            .build();
        //..
        String mdText = "**[test](#test)**";
        stylar.setMarkdown(mdText);
        //..
    }
    //..
}

License

Copyright 2020 ZeoFlow

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

🏆 Contributors 🏆

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].