You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To customize hashtag or mention adapter, create a custom adapter using
137
137
customized <code>SocialAdapter</code> or write your own <code>ArrayAdapter</code>.
138
138
</p>
139
-
139
+
140
140
<blockquote>
141
-
141
+
142
142
<p>Custom adapters are experimental, see sample for example.</p>
143
-
143
+
144
144
</blockquote>
145
-
145
+
146
146
<pre><codeclass="language-java">public class Person {
147
147
public final String name;
148
148
@@ -174,15 +174,15 @@ <h3>Auto-complete</h3>
174
174
// and of course, filtering logic
175
175
}
176
176
</code></pre>
177
-
177
+
178
178
<p>Then, use the custom adapter.</p>
179
-
179
+
180
180
<pre><codeclass="language-java">ArrayAdapter<Person> adapter = new PersonAdapter(getContext());
181
181
adapter.add(personA);
182
182
adapter.add(personB);
183
183
textView.setMentionAdapter(adapter);
184
184
</code></pre>
185
-
185
+
186
186
<footerclass="site-footer">
187
187
<spanclass="site-footer-owner"><ahref="https://github.com/hendraanggrian/socialview/">socialview</a> is maintained by <ahref="https://github.com/hendraanggrian/">Hendra Anggrian</a></span><spanclass="site-footer-credits">Hosted on GitHub Pages — Theme by <ahref="https://github.com/jasonlong/cayman-theme/">jasonlong</a></span>
0 commit comments