From ce8e73f729de4ea8116b836a5a87b8ed3e6c3c60 Mon Sep 17 00:00:00 2001 From: Jenly Date: Mon, 28 Nov 2016 11:38:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EGestureActivity=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=B7=A6=E5=8F=B3=E6=BB=91=E5=8A=A8,?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=90=91=E5=8F=B3=E6=BB=91=E5=8A=A8=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E7=95=8C=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4f63287..d189212 100644 --- a/README.md +++ b/README.md @@ -14,17 +14,17 @@ Base是针对于Android开发封装好一些常用的基类,主要包括通用 com.king.base base - 1.0 + 1.1 pom ``` ###Gradle: ```gradle -compile 'com.king.base:base:1.0' +compile 'com.king.base:base:1.1' ``` ###Lvy: ```lvy - + ``` @@ -101,6 +101,49 @@ public class TestActivity extends BaseActivity { } } ``` +###GestureActivity +```Java +public class TestActivity extends GestureActivity { + + private TextView tv; + private Button btn; + + @Override + public void initUI() { + //TODO:初始化UI + setContentView(R.layout.activity_test); + tv = findView(R.id.tv); + btn = findView(R.id.btn); + } + + @Override + public void addListeners() { + //TODO:添加监听事件 + } + + @Override + public void initData() { + //TODO:初始化数据(绑定数据) + tv.setText("text"); + } + + @Override + public void onEventMessage(EventMessage em) { + //TODO:接收EventBus发送的事件(EventMessage) + } + + @Override + public void onLeftFling() { + //TODO:向左滑动 + } + + @Override + public boolean onRightFling() { + //TODO:向右滑动,默认执行finish,返回为true表示拦截事件。 + return false; + } +} +``` ###BaseFragment ```Java