搜索框CommonSearchView
<h2>样式展示</h2>
<p><img src="https://www.showdoc.cc/server/api/common/visitfile/sign/68a2b2fc85b38dfa78e374a8645e327a?showdoc=.jpg" alt="" /></p>
<h2>示例代码</h2>
<pre><code class="language-xml"><com.hongshi.uilibrary.businessview.CommonSearchView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:searchview_hint="input your hint string,defalut value is empty" /></code></pre>
<pre><code class="language-java">private void initEvent() {
commonSearchView.setOnCancelListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(FlowLayoutActivity.this, commonSearchView.getInputText(), Toast.LENGTH_SHORT).show();
}
});
}</code></pre>
<h2>控件常用api</h2>
<ul>
<li>setOnCancelListener(OnClickListener listener)获取取消的点击事件</li>
<li>getInputText()获取输入的文字</li>
<li>xml中app:searchview_hint=""键入默认的提示文案</li>
</ul>