KeywordTextView

KeywordTextView for Android.

Лицензия

Лицензия

Категории

Категории

KeY Данные Data Formats Formal Verification
Группа

Группа

me.imirai
Идентификатор

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

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

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

0.1.2
Дата

Дата

Тип

Тип

aar
Описание

Описание

KeywordTextView
KeywordTextView for Android.
Ссылка на сайт

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

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

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

https://github.com/shakuganns/KeywordTextView

Скачать keywordtextview

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.android.support » appcompat-v7 jar 25.0.1

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

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

KeywordTextView

A Textview that allows you to highlight the keyword.

Screenshot

screen

URL and 6 to 18 digit numbers have the same effect.

screen

Usage

  • Gradle
compile 'me.imirai:keywordtextview:0.1.2'
  • Maven
<dependency>
  <groupId>me.imirai</groupId>
  <artifactId>keywordtextview</artifactId>
  <version>0.1.2</version>
  <type>arr</type>
</dependency> 

Sample

Two keywords separated by a comma. Relative size is a multiple of the default size.

  • Xml
<me.imirai.library.KeywordTextView
    app:keyword="hello,world"
    app:keyword_color="@color/colorAccent"
    app:keywords_underline="false"
    app:num_underline="false"
    app:url_highlight="true"
    app:num_highlight="true"
    app:keywords_relativeSize="2.0"
    app:url_relativeSize="1.4"
    app:num_relativeSize="0.8"
    app:url_color="@color/colorPrimaryDark"
    app:num_color="@color/colorPrimary"
    android:id="@+id/text"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello World!" />
  • Java
textView.setTextWithKeyword("A pretty girl! So pretty!","pretty,girl");

//You can do what you want to do by setting up the listener.
textView.setOnKeywordClickListener(new KeywordTextView.OnKeywordClickListener() {
            @Override
            public void onClick(View view, String keyword) {
                Toast.makeText(MainActivity.this,
                        keyword,Toast.LENGTH_SHORT).show();
            }
        });

License

Copyright 2016 Shakuganns.

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.

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

Версия
0.1.2
0.1.1
0.1.0