|
|
@@ -10,6 +10,7 @@ import android.support.v4.view.ViewPager;
|
|
|
import android.text.TextUtils;
|
|
|
import android.util.Log;
|
|
|
import android.view.LayoutInflater;
|
|
|
+import android.view.MotionEvent;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
|
import android.widget.AdapterView;
|
|
|
@@ -17,6 +18,7 @@ import android.widget.ImageView;
|
|
|
import android.widget.LinearLayout;
|
|
|
import android.widget.RadioGroup;
|
|
|
import android.widget.RelativeLayout;
|
|
|
+import android.widget.ScrollView;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
@@ -103,6 +105,8 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
ViewPager viewpager_banner;
|
|
|
@BindView(R.id.group_banner)
|
|
|
RadioGroup group_banner;
|
|
|
+ @BindView(R.id.scrollView)
|
|
|
+ ScrollView scrollView;
|
|
|
|
|
|
@Inject
|
|
|
SmallSheepPresenter pagePresenter;
|
|
|
@@ -149,7 +153,32 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
|
|
|
|
|
|
public void initListener() {
|
|
|
-
|
|
|
+ scrollView.setOnTouchListener(new View.OnTouchListener() {
|
|
|
+ @Override
|
|
|
+ public boolean onTouch(View v, MotionEvent event) {
|
|
|
+ switch (event.getAction()){
|
|
|
+ case MotionEvent.ACTION_DOWN:
|
|
|
+ if (upview1 != null) {
|
|
|
+ //开始滚动
|
|
|
+ upview1.stopScroll();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case MotionEvent.ACTION_UP:
|
|
|
+ if (upview1 != null) {
|
|
|
+ //开始滚动
|
|
|
+ upview1.startScroll();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ if (upview1 != null) {
|
|
|
+ //开始滚动
|
|
|
+ upview1.startScroll();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
public void initData() {
|
|
|
@@ -274,7 +303,6 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|