Maniaplanet Style Parser

Maniaplanet dollar style android parser can be used to convert Maniaplanetstyles to spannablestrings that you can use in styled spannable textviews.

Лицензия

Лицензия

MIT
Категории

Категории

Сеть ORM Данные
Группа

Группа

net.tvalk.mpformatter
Идентификатор

Идентификатор

mpformatter
Последняя версия

Последняя версия

1.3.6
Дата

Дата

Тип

Тип

aar
Описание

Описание

Maniaplanet Style Parser
Maniaplanet dollar style android parser can be used to convert Maniaplanetstyles to spannablestrings that you can use in styled spannable textviews.
Ссылка на сайт

Ссылка на сайт

https://github.com/tomvlk/MPFormatter_android
Система контроля версий

Система контроля версий

https://github.com/tomvlk/MPFormatter_android

Скачать mpformatter

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/net.tvalk.mpformatter/mpformatter/ -->
<dependency>
    <groupId>net.tvalk.mpformatter</groupId>
    <artifactId>mpformatter</artifactId>
    <version>1.3.6</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/net.tvalk.mpformatter/mpformatter/
implementation 'net.tvalk.mpformatter:mpformatter:1.3.6'
// https://jarcasting.com/artifacts/net.tvalk.mpformatter/mpformatter/
implementation ("net.tvalk.mpformatter:mpformatter:1.3.6")
'net.tvalk.mpformatter:mpformatter:aar:1.3.6'
<dependency org="net.tvalk.mpformatter" name="mpformatter" rev="1.3.6">
  <artifact name="mpformatter" type="aar" />
</dependency>
@Grapes(
@Grab(group='net.tvalk.mpformatter', module='mpformatter', version='1.3.6')
)
libraryDependencies += "net.tvalk.mpformatter" % "mpformatter" % "1.3.6"
[net.tvalk.mpformatter/mpformatter "1.3.6"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

Build Status

MPFormatter_android

A ManiaPlanet Color Style parser and formatter for Android. Currently basicly only working with all the styles. But in future it can also strip styles, links and colors and have more options. It will output a Spanned object that can be used in TextViews and more Android controls that support Spanned Strings.

Installation

You can use gradle to compile it, it's in the jCentral repository and in the Maven Central.

dependencies {
    compile 'net.tvalk.mpformatter:mpformatter:1.3.6'
}

If you want to stay updated, replace the '1.3.6' with '1.+'. But can break things when there is a new version. Maybe you need to change your repositories for gradle:

repositories {
	mavenCentral()
	jcenter()
}

Usage

To get the Spanned from a styled nickname for example, use:

String nickname = "$F80$i$o$SToffe$z$06FSmurf $z$n$l[http://goo.gl/y4M9VK][App]$l";
Spanned styledNickname = new MPFormatter(nickname).parse().getSpannable();

This will result in: Example result from above code

You can also strip the colors, links or styles with the functions stripColors(), stripLinks() and stripStyles() on the parse() return to strip it. You can also get a string without any styles, colors or links with getString() on the parse() return

For example, to strip the links in this nickname:

String nickname = "$F80$i$o$SToffe$z$06FSmurf $z$n$l[http://goo.gl/y4M9VK][App]$l";
Spanned styledNickname = new MPFormatter(nickname).parse().stripLinks().getSpannable();

Licence

See LICENCE file for MIT licence.

Версии библиотеки

Версия
1.3.6
1.3.5
1.3.4
1.3.3
1.3.2
1.3.1
1.3.0