liujiangyao лет назад: 8
Родитель
Сommit
e755b41f97

+ 30 - 2
app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java

@@ -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
 
 
 
-
     }
 
 

+ 2 - 1
app/src/main/java/com/sheep/gamegroup/util/ImageGlarryDrawable.java

@@ -69,7 +69,8 @@ public class ImageGlarryDrawable {
             ImageView imageView = new ImageView(mActivity);
             imageView.setOnClickListener(new ImageGlarryDrawable.cls_main(pos));
             imageView.setScaleType(scaleType);
-            Glide.with(mActivity).load(pic).apply(new RequestOptions().dontAnimate()).into(imageView);
+            imageView.setImageDrawable(pic);
+//            Glide.with(mActivity).load(pic).apply(new RequestOptions().dontAnimate()).into(imageView);
             mListImages.add(imageView);
 
 

+ 8 - 8
app/src/main/java/com/sheep/gamegroup/view/adapter/TryMakeMoneyAdp.java

@@ -135,16 +135,16 @@ public class TryMakeMoneyAdp extends AdpCommonRecy<RecyleObj> {
                 ((TextView)viewHolder.itemView.findViewById(R.id.detail_task_tv)).setOnClickListener(new View.OnClickListener() {
                     @Override
                     public void onClick(View v) {
-                        G.showToast("任务详情");
-                        if(isHave){
-                            G.showToast("请先取消已接受的任务");
-                            return;
-                        }
+//                        G.showToast("任务详情");
+//                        if(isHave){
+//                            G.showToast("请先取消已接受的任务");
+//                            return;
+//                        }
                         TaskEty taskEty = etyList.get(i).getTask();
                         taskEty.setRunTask(0);
                         taskEty.setRelease_task_id(etyList.get(i).getId());
                         taskEty.setName(etyList.get(i).getName());
-                        Jump2View.getInstance().goDialogActivityView(context, taskEty);
+                        Jump2View.getInstance().goTaskDetailView(context, taskEty);
                     }
                 });
                 Glide.with(context)
@@ -201,12 +201,12 @@ public class TryMakeMoneyAdp extends AdpCommonRecy<RecyleObj> {
         detail_task_tv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                G.showToast("任务详情");
+//                G.showToast("任务详情");
                 TaskEty taskEty = acceptedEty.getRelease_task().getTask();
                 taskEty.setRunTask(1);
                 taskEty.setRelease_task_id(acceptedEty.getRelease_task().getId());
                 taskEty.setName(acceptedEty.getRelease_task().getName());
-                Jump2View.getInstance().goDialogActivityView(context, taskEty);
+                Jump2View.getInstance().goTaskDetailView(context, taskEty);
             }
         });
         holder.itemView.setOnClickListener(new View.OnClickListener() {

+ 8 - 2
app/src/main/res/layout/homepage_act_layout.xml

@@ -7,6 +7,7 @@
     android:background="@color/bg_gray">
 
     <ScrollView
+        android:id="@+id/scrollView"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:scrollbars="none">
@@ -121,12 +122,13 @@
                 android:visibility="gone"/>
             <RelativeLayout
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content">
+                android:layout_height="wrap_content"
+                android:padding="@dimen/content_padding_10">
 
                 <android.support.v4.view.ViewPager
                     android:id="@+id/viewpager_banner"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
+                    android:layout_height="@dimen/app_group_height_135"
                     android:minHeight="@dimen/app_group_height_120" />
 
                 <RadioGroup
@@ -228,6 +230,10 @@
                     ></com.layoutscroll.layoutscrollcontrols.view.EasyLayoutScroll>
 
             </LinearLayout>
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/view_size_40"
+                android:background="@color/bg_gray"/>
         </LinearLayout>
     </ScrollView>
 

+ 1 - 1
app/src/main/res/layout/try_makemoney_item.xml

@@ -82,7 +82,7 @@
             android:text="任务详情"
             android:minWidth="@dimen/view_size_73"
             android:textColor="@color/white"
-            android:textSize="@dimen/text_size_12"
+            android:textSize="@dimen/text_size_15"
             android:gravity="center"
             android:padding="@dimen/content_padding_3"
             android:layout_alignParentRight="true"

+ 1 - 1
app/src/main/res/layout/try_makemoney_item_recommend.xml

@@ -68,7 +68,7 @@
             android:text="任务详情"
             android:minWidth="@dimen/view_size_73"
             android:textColor="@color/white"
-            android:textSize="@dimen/text_size_12"
+            android:textSize="@dimen/text_size_15"
             android:gravity="center"
             android:padding="@dimen/content_padding_3"
             android:layout_alignParentRight="true"

+ 1 - 0
app/src/main/res/values/dimen_app_dimens.xml

@@ -51,6 +51,7 @@
     <dimen name="content_padding_default">12dp</dimen>
 
     <dimen name="app_group_height_120">120dp</dimen>
+    <dimen name="app_group_height_135">135dp</dimen>
     <dimen name="app_group_height_160">160dp</dimen>
     <dimen name="app_group_height_170">170dp</dimen>
     <dimen name="app_group_height_180">180dp</dimen>