Skip to content

Commit 7d2b6e3

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

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

index.html

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,27 @@ <h2 class="project-tagline">Android TextView and EditText with hashtag, mention,
2828
<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>
2929
<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>
3030
</p>
31-
31+
3232
<h1>SocialView</h1>
33-
33+
3434
<p>
3535
<img alt="Hashtag preview." src="https://github.com/hendraanggrian/socialview/raw/assets/preview_hashtag.png">
3636
<img alt="Mention preview." src="https://github.com/hendraanggrian/socialview/raw/assets/preview_mention.png">
3737
</p>
38-
38+
3939
<p>TextView and EditText with hashtag, mention, and hyperlink support.</p>
40-
40+
4141
<ul>
42-
42+
4343
<li>Pre-loaded with default views, but also installable to any custom view.</li>
44-
44+
4545
<li>Display hashtag and mention suggestions as you type.</li>
46-
46+
4747
</ul>
48-
48+
4949
<h2>Download</h2>
50-
51-
<pre><code class="language-gradle">repositories {
50+
51+
<pre><code class="language-groovy">repositories {
5252
mavenCentral()
5353
google()
5454
}
@@ -60,16 +60,16 @@ <h2>Download</h2>
6060
implementation "com.hendraanggrian.appcompat:socialview-autocomplete:$version"
6161
}
6262
</code></pre>
63-
63+
6464
<h2>Usage</h2>
65-
65+
6666
<h3>Core</h3>
67-
67+
6868
<p>
6969
Core library contains <code>SocialTextView</code>, <code>SocialEditText</code> and helper class
7070
applies these behavior into any <code>TextView</code>.
7171
</p>
72-
72+
7373
<pre><code class="language-xml">&lt;com.hendraanggrian.appcompat.socialview.widget.SocialTextView
7474
android:id="@+id/textView"
7575
android:layout_width="match_parent"
@@ -79,14 +79,14 @@ <h3>Core</h3>
7979
app:hashtagColor="@color/blue"
8080
app:mentionColor="@color/red"/&gt;
8181
</code></pre>
82-
82+
8383
<p>
8484
See <a href="https://github.com/HendraAnggrian/socialview/blob/master/socialview/res/values/attrs.xml">attrs.xml</a>
8585
for full list of available attributes.
8686
</p>
87-
87+
8888
<p>Modify its state and set listeners programmatically.</p>
89-
89+
9090
<pre><code class="language-java">textView.setMentionEnabled(false);
9191
textView.setHashtagColor(Color.RED);
9292
textView.setOnHashtagClickListener(
@@ -98,13 +98,13 @@ <h3>Core</h3>
9898
}
9999
);
100100
</code></pre>
101-
101+
102102
<h3>Auto-complete</h3>
103-
103+
104104
<p>
105105
Extended library comes with <code>SocialAutoCompleteTextView</code>.
106106
</p>
107-
107+
108108
<pre><code class="language-xml">&lt;com.hendraanggrian.appcompat.socialview.widget.SocialAutoCompleteTextView
109109
android:id="@+id/textView"
110110
android:layout_width="match_parent"
@@ -113,12 +113,12 @@ <h3>Auto-complete</h3>
113113
app:socialFlags="hyperlink"
114114
app:hyperlinkColor="@color/green"/&gt;
115115
</code></pre>
116-
116+
117117
<p>
118118
To display suggestions, it is required to <code>setHashtagAdapter()</code>
119119
and <code>setMentionAdapter()</code>.
120120
</p>
121-
121+
122122
<pre><code class="language-java">ArrayAdapter&lt;Hashtag&gt; hashtagAdapter = new HashtagAdapter(getContext());
123123
hashtagAdapter.add(new Hashtag("yolo"));
124124
hashtagAdapter.add(new Hashtag("swag", 500));
@@ -136,18 +136,18 @@ <h3>Auto-complete</h3>
136136
);
137137
textView.setMentionAdapter(mentionAdapter);
138138
</code></pre>
139-
139+
140140
<p>
141141
To customize hashtag or mention adapter, create a custom adapter using
142142
customized <code>SocialAdapter</code> or write your own <code>ArrayAdapter</code>.
143143
</p>
144-
144+
145145
<blockquote>
146-
146+
147147
<p>Custom adapters are experimental, see sample for example.</p>
148-
148+
149149
</blockquote>
150-
150+
151151
<pre><code class="language-java">public class Person {
152152
public final String name;
153153

@@ -179,15 +179,15 @@ <h3>Auto-complete</h3>
179179
// and of course, filtering logic
180180
}
181181
</code></pre>
182-
182+
183183
<p>Then, use the custom adapter.</p>
184-
184+
185185
<pre><code class="language-java">ArrayAdapter&lt;Person&gt; adapter = new PersonAdapter(getContext());
186186
adapter.add(personA);
187187
adapter.add(personB);
188188
textView.setMentionAdapter(adapter);
189189
</code></pre>
190-
190+
191191
<footer class="site-footer">
192192
<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>
193193
</footer>

0 commit comments

Comments
 (0)