一个炫酷的SearchView搜索动画库

laoliang 8年前
   <h2>介绍:</h2>    <p>一个炫酷的SearchView搜索动画库</p>    <h2>运行效果:</h2>    <p><img src="https://simg.open-open.com/show/81c8bdef0184b697367a7ed23584b9ee.gif"></p>    <h2>使用说明:</h2>    <p> </p>    <table style="width:888px">     <thead>      <tr>       <th>Design</th>       <th>Demo</th>       <th>Designer</th>       <th>Class</th>      </tr>     </thead>     <tbody>      <tr>       <td><a href="https://simg.open-open.com/show/ebb3b6fad668952c69114cad52cf102d.gif"><img src="https://simg.open-open.com/show/ebb3b6fad668952c69114cad52cf102d.gif"></a></td>       <td><a href="https://simg.open-open.com/show/3ba41e911421feac383d9a14688388cf.gif"><img src="https://simg.open-open.com/show/3ba41e911421feac383d9a14688388cf.gif"></a></td>       <td>Nick</td>       <td>JJDotGoPathController</td>      </tr>      <tr>       <td><a href="https://simg.open-open.com/show/77b0a32ee8b9c6360ba3ba423dc89543.gif"><img src="https://simg.open-open.com/show/77b0a32ee8b9c6360ba3ba423dc89543.gif"></a></td>       <td><a href="https://simg.open-open.com/show/8a3d985ae5cac9cff4c859050dd95be9.gif"><img src="https://simg.open-open.com/show/8a3d985ae5cac9cff4c859050dd95be9.gif"></a></td>       <td>Oleg Frolov</td>       <td>JJAroundCircleBornTailController</td>      </tr>      <tr>       <td><a href="https://simg.open-open.com/show/42b47f492d127caa47e260150e12995d.gif"><img src="https://simg.open-open.com/show/42b47f492d127caa47e260150e12995d.gif"></a></td>       <td><a href="https://simg.open-open.com/show/09729cf6cad0002720298d655893caba.gif"><img src="https://simg.open-open.com/show/09729cf6cad0002720298d655893caba.gif"></a></td>       <td>sandeep virk</td>       <td>JJBarWithErrorIconController</td>      </tr>      <tr>       <td><a href="https://simg.open-open.com/show/078947e78c445edb9422388d29283be7.gif"><img src="https://simg.open-open.com/show/078947e78c445edb9422388d29283be7.gif"></a></td>       <td><a href="https://simg.open-open.com/show/c08d444b20d3a710e3f8eb5441b2cfd3.gif"><img src="https://simg.open-open.com/show/c08d444b20d3a710e3f8eb5441b2cfd3.gif"></a></td>       <td>Jurre Houtkamp</td>       <td>JJScaleCircleAndTailController</td>      </tr>      <tr>       <td><a href="https://simg.open-open.com/show/ba33c34b96c597988326cabd2d7b4f9a.gif"><img src="https://simg.open-open.com/show/ba33c34b96c597988326cabd2d7b4f9a.gif"></a></td>       <td><a href="https://simg.open-open.com/show/ec7046aeec65abd293ac56a42ddc546e.gif"><img src="https://simg.open-open.com/show/ec7046aeec65abd293ac56a42ddc546e.gif"></a></td>       <td>Rahul Bhosale</td>       <td>JJChangeArrowController</td>      </tr>      <tr>       <td><a href="https://simg.open-open.com/show/1aae0500611256daa26d4f22d3fadf5c.gif"><img src="https://simg.open-open.com/show/1aae0500611256daa26d4f22d3fadf5c.gif"></a></td>       <td><a href="https://simg.open-open.com/show/b38aeaadc7478d5e89c88c6c102579fc.gif"><img src="https://simg.open-open.com/show/b38aeaadc7478d5e89c88c6c102579fc.gif"></a></td>       <td>Nicolás J. Engler</td>       <td>JJCircleToLineAlphaController</td>      </tr>      <tr>       <td><a href="https://simg.open-open.com/show/c05e1ac68200b6972fb00e4f79245a12.gif"><img src="https://simg.open-open.com/show/c05e1ac68200b6972fb00e4f79245a12.gif"></a></td>       <td><a href="https://simg.open-open.com/show/5f0305701f0a0c40647be38bb6b73c33.gif"><img src="https://simg.open-open.com/show/5f0305701f0a0c40647be38bb6b73c33.gif"></a></td>       <td>Boris Kirov</td>       <td>JJCircleToBarController</td>      </tr>      <tr>       <td><a href="https://simg.open-open.com/show/40ecd4649558b352a07b8afd8ec139f8.gif"><img src="https://simg.open-open.com/show/40ecd4649558b352a07b8afd8ec139f8.gif"></a></td>       <td><a href="https://simg.open-open.com/show/40ecd4649558b352a07b8afd8ec139f8.gif"><img src="https://simg.open-open.com/show/40ecd4649558b352a07b8afd8ec139f8.gif"></a></td>       <td>Anish Chandran</td>       <td>JJCircleToSimpleLineController</td>      </tr>      <tr>       <td><a href="https://simg.open-open.com/show/4cf77a28b6a3445ea62b45573671ab39.gif"><img src="https://simg.open-open.com/show/4cf77a28b6a3445ea62b45573671ab39.gif"></a></td>       <td><a href="https://simg.open-open.com/show/834c3e07705898db57fe9311f861ccb5.gif"><img src="https://simg.open-open.com/show/834c3e07705898db57fe9311f861ccb5.gif"></a></td>       <td>Antonio Di Nardo</td>       <td>MaterialSearchView</td>      </tr>     </tbody>    </table>    <p> </p>    <p>(1)在布局文件xml中</p>    <pre>  <code class="language-java"><RelativeLayout      xmlns:android="http://schemas.android.com/apk/res/android"      xmlns:tools="http://schemas.android.com/tools"      android:layout_width="match_parent"      android:layout_height="match_parent"      tools:context="com.cjj.jjsearchviewanim.MainActivity">        <com.cjj.sva.JJSearchView          android:id="@+id/jjsv"          android:layout_width="match_parent"          android:layout_height="match_parent"/></code></pre>    <p> </RelativeLayout></p>    <p>(2) 在java代码中</p>    <pre>  <code class="language-java">    @Override      protected void onCreate(Bundle savedInstanceState) {          super.onCreate(savedInstanceState);          setContentView(R.layout.activity_main);          JJSearchView mJJSearchView = (JJSearchView) findViewById(R.id.jjsv);          mJJSearchView.setController(new JJChangeArrowController());      }</code></pre>    <p>(3)设置动画开启及恢复</p>    <pre>  <code class="language-java">mJJSearchView.startAnim();  mJJSearchView.resetAnim();</code></pre>    <p> </p>    <p>项目地址: <a href="/misc/goto?guid=4959670213295422993" rel="nofollow">https://github.com/android-cjj/JJSearchViewAnim</a></p>