8000 +):1.新增ViewGragHelper使用详解框架实例代码 · lhwCoding/FastDev4Android@4f3c680 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f3c680

Browse files
committed
+):1.新增ViewGragHelper使用详解框架实例代码
1 parent 401176f commit 4f3c680

File tree

5 files changed

+49
-1
lines changed

5 files changed

+49
-1
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<activity android:name="com.chinaztt.fda.test.RecyclerViewRefresh.RecyclerFootActivity"/>
4343
<activity android:name="com.chinaztt.fda.test.CardView.CardViewActivity"/>
4444
<activity android:name="com.chinaztt.fda.test.CardView.CardViewRecyclerActivity"/>
45+
<activity android:name="com.chinaztt.fda.test.ViewGragHelperActivity"/>
4546
</application>
4647
<!--添加权限-->
4748

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package com.chinaztt.fda.test;
2+
3+
import android.os.Bundle;
4+
import android.view.View;
5+
import android.widget.LinearLayout;
6+
import android.widget.TextView;
7+
8+
import com.chinaztt.fda.ui.R;
9+
import com.chinaztt.fda.ui.base.BaseActivity;
10+
11+
/**
12+
* 当前类注释:ViewGragHelper使用实例
13+
* 项目名:FastDev4Android
14+
* 包名:com.chinaztt.fda.test
15+
* 作者:江清清 on 15/11/24 20:15
16+
* 邮箱:jiangqqlmj@163.com
17+
* QQ: 781931404
18+
* 公司:江苏中天科技软件技术有限公司
19+
*/
20+
public class ViewGragHelperActivity extends BaseActivity {
21+
private LinearLayout top_bar_linear_back;
22+
private TextView top_bar_title;
23+
@Override
24+
protected void onCreate(Bundle savedInstanceState) {
25+
super.onCreate(savedInstanceState);
26+
setContentView(R.layout.view_grag_helper_layout);
27+
top_bar_linear_back=(LinearLayout)this.findViewById(R.id.top_bar_linear_back);
28+
top_bar_linear_back.setOnClickListener(new CustomOnClickListener());
29+
top_bar_title=(TextView)findViewById(R.id.top_bar_title);
30+
top_bar_title.setText("ViewGragHelper使用详解");
31+
}
32+
33+
class CustomOnClickListener implements View.OnClickListener{
34+
@Override
35+
public void onClick(View v) {
36+
ViewGragHelperActivity.this.finish();
37+
}
38+
}
39+
}

app/src/main/java/com/chinaztt/fda/ui/MainActvity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import com.chinaztt.fda.test.SPCacheActivity_;
2929
import com.chinaztt.fda.test.TextDrawablesTestActivity_;
3030
import com.chinaztt.fda.test.TranslucentActivity_;
31+
import com.chinaztt.fda.test.ViewGragHelperActivity;
3132
import com.chinaztt.fda.test.VolleyTestActivity_;
3233
import com.chinaztt.fda.ui.base.BaseActivity;
3334
import org.androidannotations.annotations.EActivity;
@@ -59,7 +60,7 @@ protected void onCreate(Bundle savedInstanceState) {
5960
EventBusTestActivity_.class, TextDrawablesTestActivity_.class,
6061
HTML5WebViewCustomAD.class, BaseAdapterTestActivity_.class,
6162
VolleyTestActivity_.class, MainFrameActivity_.class,
62-
RecyclerDemoActivity_.class, CardViewActivity.class
63+
RecyclerDemoActivity_.class, CardViewActivity.class, ViewGragHelperActivity.class
6364
};
6465

6566
lv_main = (ListView) this.findViewById(R.id.lv_main);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:orientation="vertical" android:layout_width="match_parent"
4+
android:layout_height="match_parent">
5+
<include layout="@layout/common_top_bar_layout"/>
6+
</LinearLayout>

app/src/main/res/values/arrays.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
<item>Fragment嵌套Fragment,ViewPager实例</item>
1818
<item>RecyclerView使用实例</item>
1919
<item>CardView使用实例</item>
20+
<item>ViewGragHelper使用实例</item>
2021
</array>
2122
</resources>

0 commit comments

Comments
 (0)
0