All Projects → enofeb → Socially

enofeb / Socially

Licence: MIT license
Socially is a textView which is able to create separate clickable views according to your requirements.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Socially

textmatcher
A simple text watcher that matches specific targets like mention or hashtag in a string by defining rules
Stars: ✭ 67 (+139.29%)
Mutual labels:  hashtag, textview, mention
mention-hashtag
Extract mentions (@mention) or hashtags (#hashtag) from any text
Stars: ✭ 16 (-42.86%)
Mutual labels:  hashtag, regex
OrangeLabel
OrangeLabel is extensions of UILabel linkable, available line background and placeholder text
Stars: ✭ 19 (-32.14%)
Mutual labels:  hashtag, mention
Attributedstring
基于Swift插值方式优雅的构建富文本, 支持点击长按事件, 支持不同类型过滤, 支持自定义视图等.
Stars: ✭ 294 (+950%)
Mutual labels:  regex, textview
Mentions
An easy way to add mentions and hashtags
Stars: ✭ 24 (-14.29%)
Mutual labels:  hashtag, mention
dregex
Dregex is a JVM library that implements a regular expression engine using deterministic finite automata (DFA). It supports some Perl-style features and yet retains linear matching time, and also offers set operations.
Stars: ✭ 37 (+32.14%)
Mutual labels:  regex
python-hyperscan
A CPython extension for the Hyperscan regular expression matching library.
Stars: ✭ 112 (+300%)
Mutual labels:  regex
fu
Unix's Find, Unleashed.
Stars: ✭ 32 (+14.29%)
Mutual labels:  regex
CVparser
CVparser is software for parsing or extracting data out of CV/resumes.
Stars: ✭ 28 (+0%)
Mutual labels:  regex
java-core
Collections of solutions for micro-tasks created while building modules as part of project. Also has very fun stuffs :)
Stars: ✭ 35 (+25%)
Mutual labels:  regex
loadkit
Java 资源加载器,充分拓展ClassLoader#getResources(name)的能力,实现递归加载,支持普通风格 / 包名风格 / ANT风格 / 正则风格路径的资源加载同时支持自定义过滤器,通常作为框架的基础类库。
Stars: ✭ 39 (+39.29%)
Mutual labels:  regex
is-regex
Is this value a JS regex?
Stars: ✭ 22 (-21.43%)
Mutual labels:  regex
sortboard
A small ES6 library for easy sorting and filtering of elements.
Stars: ✭ 29 (+3.57%)
Mutual labels:  regex
stat133-spring-2019
Course materials for Stat 133, Spring 2019, at UC Berkeley
Stars: ✭ 26 (-7.14%)
Mutual labels:  regex
Brutegram
Instagram multi-bruteforce Platfrom
Stars: ✭ 183 (+553.57%)
Mutual labels:  hashtag
ocaml-re-nfa
OCaml code to construct an NFA from a regular expression
Stars: ✭ 44 (+57.14%)
Mutual labels:  regex
LicenseTextView
Custom Lincese TextView for android
Stars: ✭ 31 (+10.71%)
Mutual labels:  textview
pysorter
A command line utility for organizing files and directories according to regex patterns.
Stars: ✭ 40 (+42.86%)
Mutual labels:  regex
expand-brackets
Expand POSIX bracket expressions (character classes) in glob patterns.
Stars: ✭ 26 (-7.14%)
Mutual labels:  regex
RideShare-Trip-Stats
Chrome Extension to visualize your uber trip statistics
Stars: ✭ 61 (+117.86%)
Mutual labels:  regex

Socially

Socially is a textView which is able to create separate clickable views according to your requirements.

Sample Video

Simple Usage

  1. Add SocialTextView to your xml.
<com.enofeb.socially.view.SocialTextView
        android:id="@+id/socialTextView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:hashTagColor="@color/colorGreen"
        app:mailColor="@color/colorOrange"
        app:mentionColor="@color/colorBlue"
        app:phoneNumberColor="@color/colorOrange"
        app:webLinkColor="@color/colorRed" />
  1. Add your rules.
socialTextView.addRules(
          Rule.Hashtag,
          Rule.Mention,
          Rule.PhoneNumber,
          Rule.Mail,
          Rule.WebLink,
          Rule.Custom(
               "Date",
               "^(0?[1-9]|[12][0-9]|3[01])-(0?[1-9]|1[012])-([12][0-9]{3})$",
               this.getColor(R.color.colorRed)
         )
)
  1. And, finally set your text.
socialTextView.socialText = "I am #Spider @Enes99 +905512026461 [email protected] https://www.lichess.org"

NOTES: Please get follow these three steps while setting up this library.

Features

  • It already supports hashtag, mention, phone number, mail and weblinks. To enable them , you need to add rule which you want to use.
socialTextView.addRules(
         Rule.Mention,
         Rule.PhoneNumber
)
  • It is possible to add Custom regex rule with text color.
socialTextView.addRules(
        Rule.Custom(
            "Date",
            "^(0?[1-9]|[12][0-9]|3[01])-(0?[1-9]|1[012])-([12][0-9]{3})$",
            this.getColor(R.color.colorRed)
        )
)
  • Listen when the user click any text.
socialTextView.onTextClickListener = { word, rule ->
            when (rule) {
                is Rule.Hashtag -> {

                }
                is Rule.Mention -> {

                }
                is Rule.Custom -> {

                }
            }
}

XML Attributes

<attr name="hashTagColor" format="color" />
<attr name="mentionColor" format="color" />
<attr name="phoneNumberColor" format="color" />
<attr name="mailColor" format="color" />
<attr name="webLinkColor" format="color" />

Download

  • Add Jitpack to your root build.gradle repositories.
allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}
  • Add Socially to your module dependencies.
dependencies {
    implementation 'com.github.enofeb:Socially:1.0.9'
}

License

MIT License

Copyright (c) 2021 Enes Zor

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
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].