Skip to content

Commit 755fca9

Browse files
committed
Generated by gradle-git-publish.
1 parent 7d2b6e3 commit 755fca9

File tree

1 file changed

+38
-39
lines changed

1 file changed

+38
-39
lines changed

index.html

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -24,53 +24,52 @@ <h2 class="project-tagline">Android TextView and EditText with hashtag, mention,
2424
<p>
2525
<a href="https://app.circleci.com/pipelines/github/hanggrian/socialview/"><img alt="CircleCI" src="https://img.shields.io/circleci/build/gh/hanggrian/socialview"></a>
2626
<a href="https://app.codecov.io/gh/hanggrian/socialview/"><img alt="Codecov" src="https://img.shields.io/codecov/c/gh/hanggrian/socialview"></a>
27-
<a href="https://search.maven.org/artifact/com.hendraanggrian.appcompat/socialview/"><img alt="Maven Central" src="https://img.shields.io/maven-central/v/com.hendraanggrian.appcompat/socialview"></a>
28-
<a href="https://s01.oss.sonatype.org/content/repositories/snapshots/com/hendraanggrian/appcompat/socialview/"><img alt="Nexus Snapshot" src="https://img.shields.io/nexus/s/com.hendraanggrian.appcompat/socialview?server=https%3A%2F%2Fs01.oss.sonatype.org"></a>
27+
<a href="https://search.maven.org/artifact/com.hendraanggrian.socialview/socialview/"><img alt="Maven Central" src="https://img.shields.io/maven-central/v/com.hendraanggrian.socialview/socialview"></a>
2928
<a href="https://developer.android.com/tools/releases/platforms#5.0"><img alt="Android SDK" src="https://img.shields.io/badge/android-21%2B-34a853"></a>
3029
</p>
31-
30+
3231
<h1>SocialView</h1>
33-
32+
3433
<p>
35-
<img alt="Hashtag preview." src="https://github.com/hendraanggrian/socialview/raw/assets/preview_hashtag.png">
36-
<img alt="Mention preview." src="https://github.com/hendraanggrian/socialview/raw/assets/preview_mention.png">
34+
<img alt="Hashtag preview" src="https://github.com/hendraanggrian/socialview/raw/assets/preview_hashtag.png">
35+
<img alt="Mention preview" src="https://github.com/hendraanggrian/socialview/raw/assets/preview_mention.png">
3736
</p>
38-
37+
3938
<p>TextView and EditText with hashtag, mention, and hyperlink support.</p>
40-
39+
4140
<ul>
42-
41+
4342
<li>Pre-loaded with default views, but also installable to any custom view.</li>
44-
43+
4544
<li>Display hashtag and mention suggestions as you type.</li>
46-
45+
4746
</ul>
48-
47+
4948
<h2>Download</h2>
50-
51-
<pre><code class="language-groovy">repositories {
49+
50+
<pre><code class="language-gradle">repositories {
5251
mavenCentral()
5352
google()
5453
}
5554
dependencies {
5655
// base widgets
57-
implementation "com.hendraanggrian.appcompat:socialview:$version"
56+
implementation "com.hendraanggrian.socialview:socialview:$version"
5857

5958
// auto-complete widgets
60-
implementation "com.hendraanggrian.appcompat:socialview-autocomplete:$version"
59+
implementation "com.hendraanggrian.socialview:socialview-autocomplete:$version"
6160
}
6261
</code></pre>
63-
62+
6463
<h2>Usage</h2>
65-
64+
6665
<h3>Core</h3>
67-
66+
6867
<p>
6968
Core library contains <code>SocialTextView</code>, <code>SocialEditText</code> and helper class
7069
applies these behavior into any <code>TextView</code>.
7170
</p>
72-
73-
<pre><code class="language-xml">&lt;com.hendraanggrian.appcompat.socialview.widget.SocialTextView
71+
72+
<pre><code class="language-xml">&lt;com.hendraanggrian.socialview.SocialTextView
7473
android:id="@+id/textView"
7574
android:layout_width="match_parent"
7675
android:layout_height="wrap_content"
@@ -79,14 +78,14 @@ <h3>Core</h3>
7978
app:hashtagColor="@color/blue"
8079
app:mentionColor="@color/red"/&gt;
8180
</code></pre>
82-
81+
8382
<p>
8483
See <a href="https://github.com/HendraAnggrian/socialview/blob/master/socialview/res/values/attrs.xml">attrs.xml</a>
8584
for full list of available attributes.
8685
</p>
87-
86+
8887
<p>Modify its state and set listeners programmatically.</p>
89-
88+
9089
<pre><code class="language-java">textView.setMentionEnabled(false);
9190
textView.setHashtagColor(Color.RED);
9291
textView.setOnHashtagClickListener(
@@ -98,27 +97,27 @@ <h3>Core</h3>
9897
}
9998
);
10099
</code></pre>
101-
100+
102101
<h3>Auto-complete</h3>
103-
102+
104103
<p>
105104
Extended library comes with <code>SocialAutoCompleteTextView</code>.
106105
</p>
107-
108-
<pre><code class="language-xml">&lt;com.hendraanggrian.appcompat.socialview.widget.SocialAutoCompleteTextView
106+
107+
<pre><code class="language-xml">&lt;com.hendraanggrian.socialview.autocomplete.SocialAutoCompleteTextView
109108
android:id="@+id/textView"
110109
android:layout_width="match_parent"
111110
android:layout_height="wrap_content"
112111
android:hint="What's on your mind?"
113112
app:socialFlags="hyperlink"
114113
app:hyperlinkColor="@color/green"/&gt;
115114
</code></pre>
116-
115+
117116
<p>
118117
To display suggestions, it is required to <code>setHashtagAdapter()</code>
119118
and <code>setMentionAdapter()</code>.
120119
</p>
121-
120+
122121
<pre><code class="language-java">ArrayAdapter&lt;Hashtag&gt; hashtagAdapter = new HashtagAdapter(getContext());
123122
hashtagAdapter.add(new Hashtag("yolo"));
124123
hashtagAdapter.add(new Hashtag("swag", 500));
@@ -131,23 +130,23 @@ <h3>Auto-complete</h3>
131130
new Mention(
132131
"johndoe",
133132
"John Doe",
134-
"url://to.profile",
133+
"url://to.profile"
135134
)
136135
);
137136
textView.setMentionAdapter(mentionAdapter);
138137
</code></pre>
139-
138+
140139
<p>
141140
To customize hashtag or mention adapter, create a custom adapter using
142141
customized <code>SocialAdapter</code> or write your own <code>ArrayAdapter</code>.
143142
</p>
144-
143+
145144
<blockquote>
146-
145+
147146
<p>Custom adapters are experimental, see sample for example.</p>
148-
147+
149148
</blockquote>
150-
149+
151150
<pre><code class="language-java">public class Person {
152151
public final String name;
153152

@@ -179,15 +178,15 @@ <h3>Auto-complete</h3>
179178
// and of course, filtering logic
180179
}
181180
</code></pre>
182-
181+
183182
<p>Then, use the custom adapter.</p>
184-
183+
185184
<pre><code class="language-java">ArrayAdapter&lt;Person&gt; adapter = new PersonAdapter(getContext());
186185
adapter.add(personA);
187186
adapter.add(personB);
188187
textView.setMentionAdapter(adapter);
189188
</code></pre>
190-
189+
191190
<footer class="site-footer">
192191
<span class="site-footer-owner"><a href="https://github.com/hanggrian/socialview/">socialview</a> is maintained by <a href="https://github.com/hanggrian/">Hendra Anggrian</a></span><span class="site-footer-credits">Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/jasonlong/cayman-theme/">jasonlong</a></span>
193192
</footer>

0 commit comments

Comments
 (0)