Browse Source

修复游戏详情查看图片;修复试玩赚钱中文字覆盖;修复分类中点击后图片加载到以前的网络图片的问题

zengjiebin 8 years ago
parent
commit
c014448d19

+ 1 - 1
app/src/main/java/com/kfzs/duanduan/ActPicturesEnlarge.java

@@ -59,7 +59,7 @@ public class ActPicturesEnlarge extends BaseCompatActivity {
         vpPictureEnlarge.setPageTransformer(true, new DepthPageTransformer());
 
 
-        vpPictureEnlarge.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
+        vpPictureEnlarge.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
             @Override
             public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
 

+ 2 - 13
app/src/main/java/com/kfzs/duanduan/adp/ClassificationGridviewAdapter.java

@@ -139,22 +139,11 @@ public class ClassificationGridviewAdapter extends BaseAdapter {
             public boolean onTouch(View v, MotionEvent event) {
                 switch (event.getAction()){
                     case MotionEvent.ACTION_DOWN:
-                        Glide.with(mContext)
-                                .load(gameTypeSpecial == null ?R.drawable.classification_gengduoyouxo_click :gameTypeSpecial.getHighlightIcon())
-                                .apply(new RequestOptions().error(android.R.drawable.stat_notify_error))
-                                .into( finalHolder.imageView);
+                        finalHolder.imageView.setAlpha(0.2f);
                         break;
                     case MotionEvent.ACTION_UP:
-                        Glide.with(mContext)
-                                .load(gameTypeSpecial == null ?R.drawable.classification_gengduoyouxo :gameTypeSpecial.getIcon())
-                                .apply(new RequestOptions().error(android.R.drawable.stat_notify_error))
-                                .into( finalHolder.imageView);
-                        break;
                     default:
-                        Glide.with(mContext)
-                                .load(gameTypeSpecial == null ?R.drawable.classification_gengduoyouxo :gameTypeSpecial.getIcon())
-                                .apply(new RequestOptions().error(android.R.drawable.stat_notify_error))
-                                .into( finalHolder.imageView);
+                        finalHolder.imageView.setAlpha(1f);
                         break;
                 }
                 return false;

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

@@ -107,8 +107,8 @@ public class PictureViewPagerAdapter extends PagerAdapter {
             parent.setLayoutParams(lpParent);
 
             RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
-                    LinearLayout.LayoutParams.WRAP_CONTENT,
-                    LinearLayout.LayoutParams.WRAP_CONTENT);
+                    LinearLayout.LayoutParams.MATCH_PARENT,
+                    LinearLayout.LayoutParams.MATCH_PARENT);
             lp.setMargins(20, 20, 20, 20);
             lp.addRule(RelativeLayout.CENTER_IN_PARENT);
             ivChildItem.setLayoutParams(lp);

+ 8 - 5
app/src/main/java/com/kfzs/duanduan/react/TabsHelper.java

@@ -18,9 +18,11 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 
-import io.reactivex.Observable;
-import io.reactivex.android.schedulers.AndroidSchedulers;
-import io.reactivex.functions.Consumer;
+import rx.Observable;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+import rx.schedulers.Schedulers;
+
 
 /**
  * Created by realicing on 2017/11/24.
@@ -190,10 +192,11 @@ public class TabsHelper {
         if (System.currentTimeMillis() - lastbackrn < period) {
             presscount = presscount + 1;
             Observable.just(1).delay(period * presscount, TimeUnit.MILLISECONDS)
+                    .subscribeOn(Schedulers.io())
                     .observeOn(AndroidSchedulers.mainThread())
-                    .subscribe(new Consumer<Integer>() {
+                    .subscribe(new Action1<Integer>() {
                         @Override
-                        public void accept(Integer integer) throws Exception {
+                        public void call(Integer integer) {
                             doBackPress();
                         }
                     });

+ 26 - 22
app/src/main/res/layout/try_makemoney_item_recommend.xml

@@ -2,6 +2,7 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:orientation="vertical"
     android:paddingRight="12dp"
     android:paddingTop="12dp"
@@ -24,7 +25,7 @@
             android:layout_marginBottom="13dp"/>
     </LinearLayout>
 
-    <RelativeLayout
+    <android.support.constraint.ConstraintLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content">
         <ImageView
@@ -33,35 +34,38 @@
             android:layout_height="@dimen/view_size_60"
             android:src="@drawable/icon_lj"/>
         <TextView
-            android:id="@+id/item_anem_tv"
+            android:id="@+id/item_money"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text=""
-            android:layout_alignTop="@+id/item_icon_iv"
-            android:layout_toEndOf="@+id/item_icon_iv"
-            android:layout_marginTop="6dp"
+            android:text="+10元"
+            android:textSize="18dp"
+            android:textColor="@color/txt_red"
+            app:layout_constraintTop_toTopOf="@+id/item_anem_tv"
+            app:layout_constraintBottom_toBottomOf="@+id/item_anem_tv"
+            app:layout_constraintEnd_toEndOf="parent"/>
+        <TextView
+            android:id="@+id/item_anem_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:text="adefasdddddddddddddddddddddddddddddddddddd"
+            android:lines="2"
+            android:gravity="start|center"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintStart_toEndOf="@+id/item_icon_iv"
+            app:layout_constraintRight_toLeftOf="@+id/item_money"
             android:layout_marginStart="15dp"
-            android:layout_above="@+id/item_num_tv"
             style="@style/txt_style_15"/>
         <TextView
             android:id="@+id/item_num_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text=""
-            android:layout_below="@+id/item_money"
-            android:layout_alignStart="@+id/item_anem_tv"
-            android:layout_marginTop="8dp"
+            android:text="asdfasdfasdf"
+            app:layout_constraintTop_toBottomOf="@+id/item_anem_tv"
+            app:layout_constraintStart_toStartOf="@+id/item_anem_tv"
             android:textColor="@color/txt_black_8e8e8e"
+            android:layout_marginBottom="@dimen/content_padding_10"
             android:textSize="@dimen/text_size_12"/>
         <TextView
-            android:id="@+id/item_money"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text=""
-            android:textSize="18dp"
-            android:textColor="@color/txt_red"
-            android:layout_alignParentRight="true"/>
-        <TextView
             android:id="@+id/detail_task_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -71,11 +75,11 @@
             android:textSize="@dimen/text_size_15"
             android:gravity="center"
             android:padding="@dimen/content_padding_3"
-            android:layout_alignParentRight="true"
-            android:layout_below="@+id/item_money"
+            app:layout_constraintBaseline_toBaselineOf="@+id/item_num_tv"
+            app:layout_constraintEnd_toEndOf="parent"
             android:layout_marginTop="@dimen/content_padding_small"
             android:background="@drawable/sp_bg_gradient_rectangle_yellow"/>
-    </RelativeLayout>
+    </android.support.constraint.ConstraintLayout>
     <TextView
         android:id="@+id/line_tv"
         android:layout_width="match_parent"