From e716905539dcdb3d13563456d701237afa5088ad Mon Sep 17 00:00:00 2001 From: Est Date: Sat, 19 Nov 2016 14:16:22 +0800 Subject: [PATCH] release v1.0.1 --- .../codeest/enviewsdemo/ScrollActivity.java | 20 ++++++-------- app/src/main/res/layout/activity_play.xml | 8 +++--- app/src/main/res/layout/activity_scroll.xml | 15 ++++------- app/src/main/res/layout/activity_volume.xml | 2 +- .../moe/codeest/enviews/ENDownloadView.java | 8 +++--- .../moe/codeest/enviews/ENLoadingView.java | 7 ++--- .../moe/codeest/enviews/ENScrollView.java | 26 ++++++++++++++----- .../moe/codeest/enviews/ENSearchView.java | 10 +++---- .../moe/codeest/enviews/ENVolumeView.java | 18 ++++++------- library/src/main/res/values/attrs.xml | 2 ++ 10 files changed, 62 insertions(+), 54 deletions(-) diff --git a/app/src/main/java/moe/codeest/enviewsdemo/ScrollActivity.java b/app/src/main/java/moe/codeest/enviewsdemo/ScrollActivity.java index 4d25975..fe55d52 100644 --- a/app/src/main/java/moe/codeest/enviewsdemo/ScrollActivity.java +++ b/app/src/main/java/moe/codeest/enviewsdemo/ScrollActivity.java @@ -14,26 +14,22 @@ public class ScrollActivity extends Activity{ ENScrollView scrollView; - Button btnSelect; - Button btnUnSelect; + Button btnSwitch; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_scroll); scrollView = (ENScrollView) findViewById(R.id.view_scroll); - btnSelect = (Button) findViewById(R.id.btn_select); - btnUnSelect = (Button) findViewById(R.id.btn_unselect); - btnSelect.setOnClickListener(new View.OnClickListener() { + btnSwitch = (Button) findViewById(R.id.btn_switch); + btnSwitch.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - scrollView.select(); - } - }); - btnUnSelect.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - scrollView.unSelect(); + if (scrollView.isSelected()) { + scrollView.unSelect(); + } else { + scrollView.select(); + } } }); } diff --git a/app/src/main/res/layout/activity_play.xml b/app/src/main/res/layout/activity_play.xml index 4a7967c..9142159 100644 --- a/app/src/main/res/layout/activity_play.xml +++ b/app/src/main/res/layout/activity_play.xml @@ -18,17 +18,17 @@ app:play_bg_line_width="12"/>