仿饿了么左滑跳转

2010_m 5年前
   <h2>LikeELMLeftLoad</h2>    <p>仿饿了么左滑跳转</p>    <h2>预览</h2>    <p style="text-align:center"><img src="https://simg.open-open.com/show/d7f2b57ed3085138d882ae9cb4b12e21.gif"></p>    <p style="text-align:center">preview.gif</p>    <h2>项目地址</h2>    <p><a href="/misc/goto?guid=4959732172152799469" rel="nofollow,noindex">https://github.com/CSnowStack/LikeELMLeftLoad</a></p>    <h2>膜拜巴神</h2>    <p><a href="/misc/goto?guid=4959732172242510333" rel="nofollow,noindex">https://github.com/JeasonWong</a></p>    <h2>使用</h2>    <h3>(1) 加依赖</h3>    <pre>  <code class="language-java">dependencies {      compile fileTree(dir: 'libs', include: ['*.jar'])      compile 'com.android.support:appcompat-v7:25.1.0'      compile 'com.android.support:design:25.1.0'  }</code></pre>    <h3>(2) 把View文件内的文件放到你们那的项目中,还有一些配置文件也要拉过去</h3>    <h2>代码的使用</h2>    <pre>  <code class="language-java"><csnowstack.load.view.PullLeftLoadMoreLayout      android:id="@+id/pull_load_layout"      android:layout_width="match_parent"      android:layout_height="wrap_content">        <android.support.v7.widget.RecyclerView          android:id="@+id/rcv"          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:overScrollMode="never"/>  </csnowstack.load.view.PullLeftLoadMoreLayout>      mRecyclerView= (RecyclerView) findViewById(R.id.rcv);         mRecyclerView.setLayoutManager(new LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL,false));         mRecyclerView.setAdapter(new ELMAdapter());           mPullLeftLoadMoreLayout= (PullLeftLoadMoreLayout) findViewById(R.id.pull_load_layout);         mPullLeftLoadMoreLayout.addView(getResources().getDimensionPixelOffset(R.dimen.item_img));         mPullLeftLoadMoreLayout.setFillLoadingColor(ContextCompat.getColor(this,R.color.colorAccent));         mPullLeftLoadMoreLayout.setOnGoListener(new LoadingView.OnNoticeGoListener() {             @Override             public void go() {                 Toast.makeText(MainActivity.this,"跳转页面",Toast.LENGTH_SHORT).show();             }         });</code></pre>    <h2>修改起来还是很方便的。</h2>    <p> </p>    <p>来自:http://www.jianshu.com/p/e4991d409f76</p>    <p> </p>