Skip to content

Commit 49a057b

Browse files
committed
Generated by gradle-git-publish.
1 parent 19c14c5 commit 49a057b

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

index.html

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<link href="styles/normalize.css" rel="stylesheet">
1212
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet">
1313
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css" rel="stylesheet">
14-
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-groovy.min.js"></script>
14+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-groovy.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-java.min.js"></script>
1515
<!--Primary meta tags-->
1616
<meta content="socialview" name="title">
1717
<meta content="Android TextView and EditText with hashtag, mention, and hyperlink support" name="description">
@@ -29,27 +29,27 @@ <h2 class="project-tagline">Android TextView and EditText with hashtag, mention,
2929
<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>
3030
<a href="https://developer.android.com/studio/releases/platforms/#4.0"><img alt="Android SDK" src="https://img.shields.io/badge/sdk-14%2B-informational"></a>
3131
</p>
32-
32+
3333
<h1>SocialView</h1>
34-
34+
3535
<p>
3636
<img alt="Hashtag preview." src="https://github.com/hendraanggrian/socialview/raw/assets/preview_hashtag.png">
3737
<img alt="Mention preview." src="https://github.com/hendraanggrian/socialview/raw/assets/preview_mention.png">
3838
</p>
39-
39+
4040
<p>TextView and EditText with hashtag, mention, and hyperlink support.</p>
41-
41+
4242
<ul>
43-
43+
4444
<li>Pre-loaded with default views, but also installable to any custom view.</li>
45-
45+
4646
<li>Display hashtag and mention suggestions as you type.</li>
47-
47+
4848
</ul>
49-
49+
5050
<h2>Download</h2>
51-
52-
<pre><code class="language-gradle">repositories {
51+
52+
<pre><code class="language-groovy">repositories {
5353
mavenCentral()
5454
google()
5555
}
@@ -61,16 +61,16 @@ <h2>Download</h2>
6161
implementation "com.hendraanggrian.appcompat:socialview-autocomplete:$version"
6262
}
6363
</code></pre>
64-
64+
6565
<h2>Usage</h2>
66-
66+
6767
<h3>Core</h3>
68-
68+
6969
<p>
7070
Core library contains <code>SocialTextView</code>, <code>SocialEditText</code> and helper class
7171
applies these behavior into any <code>TextView</code>.
7272
</p>
73-
73+
7474
<pre><code class="language-xml">&lt;com.hendraanggrian.appcompat.socialview.widget.SocialTextView
7575
android:id="@+id/textView"
7676
android:layout_width="match_parent"
@@ -80,14 +80,14 @@ <h3>Core</h3>
8080
app:hashtagColor="@color/blue"
8181
app:mentionColor="@color/red"/&gt;
8282
</code></pre>
83-
83+
8484
<p>
8585
See <a href="https://github.com/HendraAnggrian/socialview/blob/master/socialview/res/values/attrs.xml">attrs.xml</a>
8686
for full list of available attributes.
8787
</p>
88-
88+
8989
<p>Modify its state and set listeners programmatically.</p>
90-
90+
9191
<pre><code class="language-java">textView.setMentionEnabled(false);
9292
textView.setHashtagColor(Color.RED);
9393
textView.setOnHashtagClickListener(new SocialView.OnClickListener() {
@@ -97,13 +97,13 @@ <h3>Core</h3>
9797
}
9898
});
9999
</code></pre>
100-
100+
101101
<h3>Auto-complete</h3>
102-
102+
103103
<p>
104104
Extended library comes with <code>SocialAutoCompleteTextView</code>.
105105
</p>
106-
106+
107107
<pre><code class="language-xml">&lt;com.hendraanggrian.appcompat.socialview.widget.SocialAutoCompleteTextView
108108
android:id="@+id/textView"
109109
android:layout_width="match_parent"
@@ -112,12 +112,12 @@ <h3>Auto-complete</h3>
112112
app:socialFlags="hyperlink"
113113
app:hyperlinkColor="@color/green"/&gt;
114114
</code></pre>
115-
115+
116116
<p>
117117
To display suggestions, it is required to <code>setHashtagAdapter()</code>
118118
and <code>setMentionAdapter()</code>.
119119
</p>
120-
120+
121121
<pre><code class="language-java">ArrayAdapter&lt;Hashtag&gt; hashtagAdapter = new HashtagAdapter(getContext());
122122
hashtagAdapter.add(new Hashtag("follow"));
123123
hashtagAdapter.add(new Hashtag("followme", 1000));
@@ -131,18 +131,18 @@ <h3>Auto-complete</h3>
131131
"https://avatars0.githubusercontent.com/u/11507430?v=3&amp;s=460"));
132132
textView.setMentionAdapter(mentionAdapter);
133133
</code></pre>
134-
134+
135135
<p>
136136
To customize hashtag or mention adapter, create a custom adapter using
137137
customized <code>SocialAdapter</code> or write your own <code>ArrayAdapter</code>.
138138
</p>
139-
139+
140140
<blockquote>
141-
141+
142142
<p>Custom adapters are experimental, see sample for example.</p>
143-
143+
144144
</blockquote>
145-
145+
146146
<pre><code class="language-java">public class Person {
147147
public final String name;
148148

@@ -174,15 +174,15 @@ <h3>Auto-complete</h3>
174174
// and of course, filtering logic
175175
}
176176
</code></pre>
177-
177+
178178
<p>Then, use the custom adapter.</p>
179-
179+
180180
<pre><code class="language-java">ArrayAdapter&lt;Person&gt; adapter = new PersonAdapter(getContext());
181181
adapter.add(personA);
182182
adapter.add(personB);
183183
textView.setMentionAdapter(adapter);
184184
</code></pre>
185-
185+
186186
<footer class="site-footer">
187187
<span class="site-footer-owner"><a href="https://github.com/hendraanggrian/socialview/">socialview</a> is maintained by <a href="https://github.com/hendraanggrian/">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>
188188
</footer>

0 commit comments

Comments
 (0)