Quellcode durchsuchen

Merge remote-tracking branch 'origin/sheep_develop' into sheep_develop

zhoujuncai vor 7 Jahren
Ursprung
Commit
6c11b94614
50 geänderte Dateien mit 2352 neuen und 205 gelöschten Zeilen
  1. 1 0
      .idea/gradle.xml
  2. 1 0
      WaterWaveProgress/.gitignore
  3. 28 0
      WaterWaveProgress/build.gradle
  4. 25 0
      WaterWaveProgress/proguard-rules.pro
  5. 26 0
      WaterWaveProgress/src/androidTest/java/com/bingfor/waterwaveprogress/ExampleInstrumentedTest.java
  6. 12 0
      WaterWaveProgress/src/main/AndroidManifest.xml
  7. 103 0
      WaterWaveProgress/src/main/java/cn/modificator/waterwave_progress/WaterWaveAttrInit.java
  8. 462 0
      WaterWaveProgress/src/main/java/cn/modificator/waterwave_progress/WaterWaveProgress.java
  9. 15 0
      WaterWaveProgress/src/main/java/cn/modificator/waterwave_progress/WidgetUtil.java
  10. 19 0
      WaterWaveProgress/src/main/res/values/attrs.xml
  11. 3 0
      WaterWaveProgress/src/main/res/values/strings.xml
  12. 17 0
      WaterWaveProgress/src/test/java/com/bingfor/waterwaveprogress/ExampleUnitTest.java
  13. 1 0
      app/build.gradle
  14. 1 4
      app/proguard-rules.pro
  15. 3 0
      app/src/main/AndroidManifest.xml
  16. 2 2
      app/src/main/java/com/sheep/gamegroup/absBase/BaseActivity.java
  17. 11 0
      app/src/main/java/com/sheep/gamegroup/absBase/ICanShowAll.java
  18. 169 9
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  19. 121 0
      app/src/main/java/com/sheep/gamegroup/model/entity/AppScoreDetail.java
  20. 12 3
      app/src/main/java/com/sheep/gamegroup/model/entity/FindAppScore.java
  21. 31 0
      app/src/main/java/com/sheep/gamegroup/model/entity/ShowAll.java
  22. 191 0
      app/src/main/java/com/sheep/gamegroup/model/entity/UserComment.java
  23. 47 0
      app/src/main/java/com/sheep/gamegroup/util/ApiJSONUtil.java
  24. 16 0
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  25. 10 0
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  26. 1 1
      app/src/main/java/com/sheep/gamegroup/util/RefreshUtil.java
  27. 41 0
      app/src/main/java/com/sheep/gamegroup/util/TextViewUtil.java
  28. 8 0
      app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java
  29. 100 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActCommentGameApp.java
  30. 5 5
      app/src/main/java/com/sheep/gamegroup/view/activity/ActFindGame.java
  31. 69 44
      app/src/main/java/com/sheep/gamegroup/view/activity/ActGcGameAppDetail.java
  32. 61 0
      app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppComment.java
  33. 49 52
      app/src/main/java/com/sheep/gamegroup/view/fragment/BaseListFragment3.java
  34. 199 0
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppComment.java
  35. 8 30
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppDetail.java
  36. 41 0
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppWelfare.java
  37. 1 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtSmallSheep.java
  38. 23 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/utils/TitleBarUtils.java
  39. 0 0
      app/src/main/res/drawable-xhdpi/bulletwindow.webp
  40. 0 0
      app/src/main/res/drawable-xxhdpi/bulletwindow.webp
  41. 0 0
      app/src/main/res/drawable-xxxhdpi/bulletwindow.webp
  42. 41 0
      app/src/main/res/drawable/lay_list_progress_yellow.xml
  43. 94 0
      app/src/main/res/layout/act_comment_game_app.xml
  44. 84 0
      app/src/main/res/layout/header_gc_game_app_comment.xml
  45. 130 0
      app/src/main/res/layout/item_gc_game_app_comment.xml
  46. 4 4
      app/src/main/res/layout/item_gc_game_app_intro.xml
  47. 34 0
      app/src/main/res/layout/item_xin_progress.xml
  48. 30 48
      app/src/main/res/layout/title.xml
  49. 1 1
      app/src/main/res/values/dd_styles.xml
  50. 1 1
      settings.gradle

+ 1 - 0
.idea/gradle.xml

@@ -8,6 +8,7 @@
         <option name="modules">
           <set>
             <option value="$PROJECT_DIR$" />
+            <option value="$PROJECT_DIR$/WaterWaveProgress" />
             <option value="$PROJECT_DIR$/app" />
             <option value="$PROJECT_DIR$/ucrop" />
             <option value="$PROJECT_DIR$/view" />

+ 1 - 0
WaterWaveProgress/.gitignore

@@ -0,0 +1 @@
+/build

+ 28 - 0
WaterWaveProgress/build.gradle

@@ -0,0 +1,28 @@
+apply plugin: 'com.android.library'
+
+android {
+    compileSdkVersion ANDROID_COMPILE_SDK_VERSION as int
+    buildToolsVersion ANDROID_BUILD_TOOLS_VERSION
+
+    defaultConfig {
+        minSdkVersion ANDROID_MIN_SDK_VERSION as int
+        targetSdkVersion ANDORID_TARGET_SDK_VERSION as int
+        versionCode VERSION_CODE as int
+        versionName VERSION_NAME
+
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+}
+
+dependencies {
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
+        exclude group: 'com.android.support', module: 'support-annotations'
+    })
+    implementation "com.android.support:appcompat-v7:$supportLibVersion"
+}

+ 25 - 0
WaterWaveProgress/proguard-rules.pro

@@ -0,0 +1,25 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /home/mod/Android/Sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile

+ 26 - 0
WaterWaveProgress/src/androidTest/java/com/bingfor/waterwaveprogress/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
+package com.bingfor.waterwaveprogress;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumentation test, which will execute on an Android device.
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+    @Test
+    public void useAppContext() throws Exception {
+        // Context of the app under test.
+        Context appContext = InstrumentationRegistry.getTargetContext();
+
+        assertEquals("com.bingfor.waterwaveprogress.test", appContext.getPackageName());
+    }
+}

+ 12 - 0
WaterWaveProgress/src/main/AndroidManifest.xml

@@ -0,0 +1,12 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+
+    package="cn.modificator.waterwave_progress">
+
+    <application
+        android:allowBackup="true"
+        android:label="@string/app_name"
+        android:supportsRtl="true">
+
+    </application>
+
+</manifest>

+ 103 - 0
WaterWaveProgress/src/main/java/cn/modificator/waterwave_progress/WaterWaveAttrInit.java

@@ -0,0 +1,103 @@
+package cn.modificator.waterwave_progress;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import cn.modificator.waterwave_progress.R;
+
+public class WaterWaveAttrInit {
+
+	private int progressWidth; // 进度条宽度
+	private int progressColor;
+	private int progressBgColor;
+	private int waterWaveColor;
+	private int waterWaveBgColor;
+	private int progress2WaterWidth; // 进度条和水波之间的间距
+	private boolean showProgress; // 是否显示进度条
+	private boolean showNumerical; // 是否显示百分比
+	private int fontSize;
+	private int textColor;
+	private int progress;
+	private int maxProgress;
+
+	@SuppressLint("Recycle")
+	public WaterWaveAttrInit(Context context, AttributeSet attrs, int defStyle) {
+		TypedArray typedArray = context.obtainStyledAttributes(attrs,
+				R.styleable.WaterWaveProgress, defStyle, 0);
+		progressWidth = typedArray.getDimensionPixelOffset(
+				R.styleable.WaterWaveProgress_progressWidth, 0);
+		progressColor = typedArray.getColor(
+				R.styleable.WaterWaveProgress_progressColor, 0xFF33B5E5);
+		progressBgColor = typedArray.getColor(
+				R.styleable.WaterWaveProgress_progressBgColor, 0xFFBEBEBE);
+		waterWaveColor = typedArray.getColor(
+				R.styleable.WaterWaveProgress_waterWaveColor, 0XFF4BBDFE);
+		waterWaveBgColor = typedArray.getColor(
+				R.styleable.WaterWaveProgress_waterWaveBgColor, 0xFFDDDDDD);
+		progress2WaterWidth = typedArray.getDimensionPixelOffset(
+				R.styleable.WaterWaveProgress_progress2WaterWidth, 0);
+		showProgress = typedArray.getBoolean(
+				R.styleable.WaterWaveProgress_showProgress, true);
+		showNumerical = typedArray.getBoolean(
+				R.styleable.WaterWaveProgress_showNumerical, true);
+		fontSize = typedArray.getDimensionPixelOffset(
+				R.styleable.WaterWaveProgress_fontSize, 0);
+		textColor = typedArray.getColor(
+				R.styleable.WaterWaveProgress_textColor, 0xFFFFFFFF);
+		progress = typedArray.getInteger(
+				R.styleable.WaterWaveProgress_progress, 15);
+		maxProgress = typedArray.getInteger(
+				R.styleable.WaterWaveProgress_maxProgress, 100);
+		typedArray.recycle();
+	}
+
+	public int getProgressWidth() {
+		return progressWidth;
+	}
+
+	public int getProgressColor() {
+		return progressColor;
+	}
+
+	public int getProgressBgColor() {
+		return progressBgColor;
+	}
+
+	public int getWaterWaveColor() {
+		return waterWaveColor;
+	}
+
+	public int getWaterWaveBgColor() {
+		return waterWaveBgColor;
+	}
+
+	public int getProgress2WaterWidth() {
+		return progress2WaterWidth;
+	}
+
+	public boolean isShowProgress() {
+		return showProgress;
+	}
+
+	public boolean isShowNumerical() {
+		return showNumerical;
+	}
+
+	public int getFontSize() {
+		return fontSize;
+	}
+
+	public int getTextColor() {
+		return textColor;
+	}
+
+	public int getProgress() {
+		return progress;
+	}
+
+	public int getMaxProgress() {
+		return maxProgress;
+	}
+
+}

+ 462 - 0
WaterWaveProgress/src/main/java/cn/modificator/waterwave_progress/WaterWaveProgress.java

@@ -0,0 +1,462 @@
+package cn.modificator.waterwave_progress;
+
+import java.lang.ref.WeakReference;
+import java.text.DecimalFormat;
+import java.util.Locale;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Path;
+import android.graphics.Point;
+import android.graphics.RectF;
+import android.graphics.Region;
+import android.graphics.Path.Direction;
+import android.graphics.Region.Op;
+import android.os.Handler;
+import android.os.Message;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.ProgressBar;
+
+/**
+ * @author Administrator
+ */
+public class WaterWaveProgress extends View {
+    // 水的画笔 // 画圆环的画笔// 进度百分比的画笔
+    private Paint mPaintWater = null, mRingPaint = null, mTextPaint = null;
+
+    // 圆环颜色 // 圆环背景颜色 // 当前进度 //水波颜色 // 水波背景色 //进度条和水波之间的距离 //进度百分比字体大小
+    // //进度百分比字体颜色
+    private int mRingColor, mRingBgColor, mWaterColor, mWaterBgColor,
+            mFontSize, mTextColor;
+    // 进度 //浪峰个数
+    float crestCount = 1.5f;
+
+    int mProgress = 10, mMaxProgress = 100;
+
+    // 画布中心点
+    private Point mCenterPoint;
+    // 圆环宽度
+    private float mRingWidth, mProgress2WaterWidth;
+    // 是否显示进度条 //是否显示进度百分比
+    private boolean mShowProgress = false, mShowNumerical = true;
+
+    /**
+     * 产生波浪效果的因子
+     */
+    private long mWaveFactor = 0L;
+    /**
+     * 正在执行波浪动画
+     */
+    private boolean isWaving = false;
+    /**
+     * 振幅
+     */
+    private float mAmplitude = 30.0F; // 20F
+    /**
+     * 波浪的速度
+     */
+    private float mWaveSpeed = 0.070F; // 0.020F
+    /**
+     * 水的透明度
+     */
+    private int mWaterAlpha = 255; // 255
+    WaterWaveAttrInit attrInit;
+
+    private MyHandler mHandler = null;
+
+    private static class MyHandler extends Handler {
+        private WeakReference<WaterWaveProgress> mWeakRef = null;
+
+        private int refreshPeriod = 100;
+
+        public MyHandler(WaterWaveProgress host) {
+            mWeakRef = new WeakReference<WaterWaveProgress>(host);
+        }
+
+        @Override
+        public void handleMessage(Message msg) {
+            super.handleMessage(msg);
+            if (mWeakRef.get() != null) {
+                mWeakRef.get().invalidate();
+                sendEmptyMessageDelayed(0, refreshPeriod);
+            }
+        }
+    }
+
+    public WaterWaveProgress(Context paramContext) {
+        super(paramContext);
+    }
+
+    public WaterWaveProgress(Context context, AttributeSet attributeSet) {
+        this(context, attributeSet, 0);
+    }
+
+    public WaterWaveProgress(Context context, AttributeSet attrs,
+                             int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        attrInit = new WaterWaveAttrInit(context, attrs, defStyleAttr);
+        init(context);
+    }
+
+    @SuppressLint("NewApi")
+    private void init(Context context) {
+        mCenterPoint = new Point();
+        mRingColor = attrInit.getProgressColor();
+        mRingBgColor = attrInit.getProgressBgColor();
+        mWaterColor = attrInit.getWaterWaveColor();
+        mWaterBgColor = attrInit.getWaterWaveBgColor();
+        mRingWidth = attrInit.getProgressWidth();
+        mProgress2WaterWidth = attrInit.getProgress2WaterWidth();
+        mShowProgress = attrInit.isShowProgress();
+        mShowNumerical = attrInit.isShowNumerical();
+        mFontSize = attrInit.getFontSize();
+        mTextColor = attrInit.getTextColor();
+        mProgress = attrInit.getProgress();
+        mMaxProgress = attrInit.getMaxProgress();
+
+        // 如果手机版本在4.0以上,则开启硬件加速
+        if (VERSION.SDK_INT >= VERSION_CODES.ICE_CREAM_SANDWICH) {
+            setLayerType(View.LAYER_TYPE_HARDWARE, null);
+            // setLayerType(View.LAYER_TYPE_SOFTWARE, null);
+        }
+        mRingPaint = new Paint();
+        mRingPaint.setAntiAlias(true);
+        mRingPaint.setColor(mRingColor); // 圆环颜色
+        mRingPaint.setStyle(Paint.Style.STROKE);
+        mRingPaint.setStrokeWidth(mRingWidth); // 圆环宽度
+
+        mPaintWater = new Paint();
+        mPaintWater.setStrokeWidth(1.0F);
+        mPaintWater.setColor(mWaterColor);
+        // mPaintWater.setColor(getResources().getColor(mWaterColor));
+        mPaintWater.setAlpha(mWaterAlpha);
+
+        mTextPaint = new Paint();
+        mTextPaint.setAntiAlias(true);
+        mTextPaint.setColor(mTextColor);
+        mTextPaint.setStyle(Paint.Style.FILL);
+        mTextPaint.setTextSize(mFontSize);
+
+        mHandler = new MyHandler(this);
+
+    }
+
+    public void animateWave() {
+        if (!isWaving) {
+            mWaveFactor = 0L;
+            isWaving = true;
+            mHandler.sendEmptyMessage(0);
+        }
+    }
+
+    @SuppressLint({"DrawAllocation", "NewApi"})
+    protected void onDraw(Canvas canvas) {
+        super.onDraw(canvas);
+        // 获取整个View(容器)的宽、高
+        int width = getWidth();
+        int height = getHeight();
+        width = height = (width < height) ? width : height;
+        mAmplitude = width / 20f;
+
+        mCenterPoint.x = width / 2;
+        mCenterPoint.y = height / 2;
+        { // 重新设置进度条的宽度和水波与进度条的距离,,至于为什么写在这,我脑袋抽了可以不
+            mRingWidth = mRingWidth == 0 ? width / 20 : mRingWidth;
+            mProgress2WaterWidth = mProgress2WaterWidth == 0 ? mRingWidth * 0.6f
+                    : mProgress2WaterWidth;
+            mRingPaint.setStrokeWidth(mRingWidth);
+            mTextPaint.setTextSize(mFontSize == 0 ? width / 5 : mFontSize);
+            if (VERSION.SDK_INT == VERSION_CODES.JELLY_BEAN) {
+                setLayerType(View.LAYER_TYPE_SOFTWARE, null);
+            } else {
+                setLayerType(View.LAYER_TYPE_HARDWARE, null);
+            }
+        }
+
+        RectF oval = new RectF();
+        oval.left = mRingWidth / 2;
+        oval.top = mRingWidth / 2;
+        oval.right = width - mRingWidth / 2;
+        oval.bottom = height - mRingWidth / 2;
+
+        if (isInEditMode()) {
+            mRingPaint.setColor(mRingBgColor);
+            canvas.drawArc(oval, -90, 360, false, mRingPaint);
+            mRingPaint.setColor(mRingColor);
+            canvas.drawArc(oval, -90, 90, false, mRingPaint);
+            canvas.drawCircle(mCenterPoint.x, mCenterPoint.y, mCenterPoint.x
+                    - mRingWidth - mProgress2WaterWidth, mPaintWater);
+            return;
+        }
+
+        // 如果没有执行波浪动画,或者也没有指定容器宽高,就画个简单的矩形
+        if ((width == 0) || (height == 0) || isInEditMode()) {
+            canvas.drawCircle(mCenterPoint.x, mCenterPoint.y, width / 2
+                    - mProgress2WaterWidth - mRingWidth, mPaintWater);
+            return;
+        }
+
+        // 水与边框的距离
+        float waterPadding = mShowProgress ? mRingWidth + mProgress2WaterWidth
+                : 0;
+        // 水最高处
+        int waterHeightCount = mShowProgress ? (int) (height - waterPadding * 2)
+                : height;
+
+        // 重新生成波浪的形状
+        mWaveFactor++;
+        if (mWaveFactor >= Integer.MAX_VALUE) {
+            mWaveFactor = 0L;
+        }
+
+        // 画进度条背景
+        mRingPaint.setColor(mRingBgColor);
+        // canvas.drawArc(oval, -90, 360, false, mRingPaint);
+        // //和下面效果一样,只不过这个是画个360度的弧,下面是画圆环
+        canvas.drawCircle(width / 2, width / 2, waterHeightCount / 2
+                + waterPadding - mRingWidth / 2, mRingPaint);
+        mRingPaint.setColor(mRingColor);
+        // 100为 总进度
+        canvas.drawArc(oval, -90, (mProgress * 1f) / mMaxProgress * 360f, false,
+                mRingPaint);
+
+        // 计算出水的高度
+        float waterHeight = waterHeightCount * (1 - (mProgress * 1f) / mMaxProgress)
+                + waterPadding;
+        int staticHeight = (int) (waterHeight + mAmplitude);
+        Path mPath = new Path();
+        mPath.reset();
+        if (mShowProgress) {
+            mPath.addCircle(width / 2, width / 2, waterHeightCount / 2,
+                    Direction.CCW);
+        } else {
+            mPath.addCircle(width / 2, width / 2, waterHeightCount / 2,
+                    Direction.CCW);
+        }
+        // canvas添加限制,让接下来的绘制都在园内
+        canvas.clipPath(mPath, Op.INTERSECT);
+//		canvas.clipPath(mPath, Op.REPLACE);
+        Paint bgPaint = new Paint();
+        bgPaint.setColor(mWaterBgColor);
+        // 绘制背景
+        canvas.drawRect(waterPadding, waterPadding, waterHeightCount
+                + waterPadding, waterHeightCount + waterPadding, bgPaint);
+        // 绘制静止的水
+        canvas.drawRect(waterPadding, staticHeight, waterHeightCount
+                + waterPadding, waterHeightCount + waterPadding, mPaintWater);
+
+        // 待绘制的波浪线的x坐标
+        int xToBeDrawed = (int) waterPadding;
+        int waveHeight = (int) (waterHeight - mAmplitude
+                * Math.sin(Math.PI
+                * (2.0F * (xToBeDrawed + (mWaveFactor * width)
+                * mWaveSpeed)) / width));
+        // 波浪线新的高度
+        int newWaveHeight = waveHeight;
+        while (true) {
+            if (xToBeDrawed >= waterHeightCount + waterPadding) {
+                break;
+            }
+            // 根据当前x值计算波浪线新的高度
+            newWaveHeight = (int) (waterHeight - mAmplitude
+                    * Math.sin(Math.PI
+                    * (crestCount * (xToBeDrawed + (mWaveFactor * waterHeightCount)
+                    * mWaveSpeed)) / waterHeightCount));
+
+            // 先画出梯形的顶边
+            canvas.drawLine(xToBeDrawed, waveHeight, xToBeDrawed + 1,
+                    newWaveHeight, mPaintWater);
+
+            // 画出动态变化的柱子部分
+            canvas.drawLine(xToBeDrawed, newWaveHeight, xToBeDrawed + 1,
+                    staticHeight, mPaintWater);
+            xToBeDrawed++;
+            waveHeight = newWaveHeight;
+        }
+        if (mShowNumerical) {
+//            String progressTxt = String.format(Locale.CHINA, "%.0f.%%", (mProgress * 1f) / mMaxProgress * 100f);//%进度
+            String progressTxt = text != null ? text : new DecimalFormat("0.0").format((mProgress * 10f) / mMaxProgress);//10分满分制
+            float mTxtWidth = mTextPaint.measureText(progressTxt, 0, progressTxt.length());
+            canvas.drawText(progressTxt, mCenterPoint.x - mTxtWidth / 2,
+                    mCenterPoint.x * 1.5f - mFontSize / 2, mTextPaint);
+        }
+    }
+    //要显示的文本
+    private String text;
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        int width = widthMeasureSpec;
+        int height = heightMeasureSpec;
+        width = height = (width < height) ? width : height;
+        setMeasuredDimension(width, height);
+    }
+
+    /**
+     * 设置波浪的振幅
+     */
+    public void setAmplitude(float amplitude) {
+        mAmplitude = amplitude;
+    }
+
+    /**
+     * 设置水的透明度
+     *
+     * @param alpha 透明的百分比,值为0到1之间的小数,越接近0越透明
+     */
+    public void setWaterAlpha(float alpha) {
+        mWaterAlpha = (int) (255.0F * alpha);
+        mPaintWater.setAlpha(mWaterAlpha);
+    }
+
+    /**
+     * 设置水的颜色
+     */
+    public void setWaterColor(int color) {
+        mWaterColor = color;
+    }
+
+    /**
+     * 设置当前进度
+     */
+    public void setProgress(int progress) {
+        progress = progress > 100 ? 100 : progress < 0 ? 0 : progress;
+        mProgress = progress;
+        invalidate();
+    }
+
+    /**
+     * 获取进度 动画时会用到
+     */
+    public int getProgress() {
+        return mProgress;
+    }
+
+    /**
+     * 设置波浪速度
+     */
+    public void setWaveSpeed(float speed) {
+        mWaveSpeed = speed;
+    }
+
+    /**
+     * 是否显示进度条
+     *
+     * @param b
+     */
+    public void setShowProgress(boolean b) {
+        mShowProgress = b;
+    }
+
+    /**
+     * 是否显示进度值
+     *
+     * @param b
+     */
+    public void setShowNumerical(boolean b) {
+        mShowNumerical = b;
+    }
+
+    /**
+     * 设置进度条前景色
+     *
+     * @param mRingColor
+     */
+    public void setmRingColor(int mRingColor) {
+        this.mRingColor = mRingColor;
+    }
+
+    /**
+     * 设置进度条背景色
+     *
+     * @param mRingBgColor
+     */
+    public void setmRingBgColor(int mRingBgColor) {
+        this.mRingBgColor = mRingBgColor;
+    }
+
+    /**
+     * 设置水波颜色
+     *
+     * @param mWaterColor
+     */
+    public void setmWaterColor(int mWaterColor) {
+        this.mWaterColor = mWaterColor;
+    }
+
+    /**
+     * 设置水波背景色
+     *
+     * @param mWaterBgColor
+     */
+    public void setWaterBgColor(int mWaterBgColor) {
+        this.mWaterBgColor = mWaterBgColor;
+    }
+
+    /**
+     * 设置进度值显示字体大小
+     *
+     * @param mFontSize
+     */
+    public void setFontSize(int mFontSize) {
+        this.mFontSize = mFontSize;
+    }
+
+    /**
+     * 设置进度值显示字体颜色
+     *
+     * @param mTextColor
+     */
+    public void setTextColor(int mTextColor) {
+        this.mTextColor = mTextColor;
+    }
+
+    /**
+     * 设置进度条最大值
+     *
+     * @param mMaxProgress
+     */
+    public void setMaxProgress(int mMaxProgress) {
+        this.mMaxProgress = mMaxProgress;
+    }
+
+    /**
+     * 设置浪峰个数
+     *
+     * @param crestCount
+     */
+    public void setCrestCount(float crestCount) {
+        this.crestCount = crestCount;
+    }
+
+    /**
+     * 设置进度条宽度
+     *
+     * @param mRingWidth
+     */
+    public void setRingWidth(float mRingWidth) {
+        this.mRingWidth = mRingWidth;
+    }
+
+    /**
+     * 设置水波到进度条之间的距离
+     *
+     * @param mProgress2WaterWidth
+     */
+    public void setProgress2WaterWidth(float mProgress2WaterWidth) {
+        this.mProgress2WaterWidth = mProgress2WaterWidth;
+    }
+
+}

+ 15 - 0
WaterWaveProgress/src/main/java/cn/modificator/waterwave_progress/WidgetUtil.java

@@ -0,0 +1,15 @@
+package cn.modificator.waterwave_progress;
+
+import android.content.Context;
+
+public class WidgetUtil {
+	public static int Dp2Px(Context context, float dp) {
+		final float scale = context.getResources().getDisplayMetrics().density;
+		return (int) (dp * scale + 0.5f);
+	}
+
+	public static int Px2Dp(Context context, float px) {
+		final float scale = context.getResources().getDisplayMetrics().density;
+		return (int) (px / scale + 0.5f);
+	}
+}

+ 19 - 0
WaterWaveProgress/src/main/res/values/attrs.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <declare-styleable name="WaterWaveProgress">
+        <attr name="progressWidth" format="dimension" />
+        <attr name="fontSize" format="dimension" />
+        <attr name="progressColor" format="color" />
+        <attr name="progressBgColor" format="color" />
+        <attr name="waterWaveColor" format="color" />
+        <attr name="waterWaveBgColor" format="color" />
+        <attr name="progress2WaterWidth" format="dimension" />
+        <attr name="showProgress" format="boolean" />
+        <attr name="showNumerical" format="boolean" />
+        <attr name="textColor" format="color" />
+        <attr name="progress" format="integer" />
+        <attr name="maxProgress" format="integer" />
+    </declare-styleable>
+
+</resources>

+ 3 - 0
WaterWaveProgress/src/main/res/values/strings.xml

@@ -0,0 +1,3 @@
+<resources>
+    <string name="app_name">WaterWaveProgress</string>
+</resources>

+ 17 - 0
WaterWaveProgress/src/test/java/com/bingfor/waterwaveprogress/ExampleUnitTest.java

@@ -0,0 +1,17 @@
+package com.bingfor.waterwaveprogress;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+public class ExampleUnitTest {
+    @Test
+    public void addition_isCorrect() throws Exception {
+        assertEquals(4, 2 + 2);
+    }
+}

+ 1 - 0
app/build.gradle

@@ -290,6 +290,7 @@ dependencies {
     implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
     //有米科技
     implementation(name: 'YoumiSdk_v8.3.0_2018-09-20', ext: 'aar')
+    implementation project(':WaterWaveProgress')
 }
 
 static def releaseTime() {

+ 1 - 4
app/proguard-rules.pro

@@ -460,7 +460,4 @@
 #==================compile 'com.haibin:calendarview:3.4.4'==========================
  -keepclasseswithmembers class * {
      public <init>(android.content.Context);
- }
-#==================com.github.lsjwzh.RecyclerViewPager==========================
- -keep class com.lsjwzh.widget.recyclerviewpager.**
- -dontwarn com.lsjwzh.widget.recyclerviewpager.**
+ }

+ 3 - 0
app/src/main/AndroidManifest.xml

@@ -676,6 +676,9 @@
             android:name="com.sheep.gamegroup.view.activity.ActGcGameAppDetail"
             android:screenOrientation="portrait" />
         <activity
+            android:name="com.sheep.gamegroup.view.activity.ActCommentGameApp"
+            android:screenOrientation="portrait" />
+        <activity
             android:name="com.sheep.gamegroup.view.activity.ActPlayGameDetail"
             android:screenOrientation="portrait" />
         <activity

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/absBase/BaseActivity.java

@@ -2,10 +2,10 @@ package com.sheep.gamegroup.absBase;
 
 import android.os.Bundle;
 import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
 
 import com.sheep.gamegroup.util.ActionUtil;
 import com.sheep.gamegroup.view.dialog.DialogLoading;
+import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;
 
 import java.util.concurrent.TimeUnit;
 
@@ -20,7 +20,7 @@ import rx.schedulers.Schedulers;
  * Created by kemllor on 2017/12/15.
  */
 
-public abstract class BaseActivity extends AppCompatActivity {
+public abstract class BaseActivity extends RxAppCompatActivity {
 
     protected DialogLoading dialogLoading;
     public Unbinder unbinder;

+ 11 - 0
app/src/main/java/com/sheep/gamegroup/absBase/ICanShowAll.java

@@ -0,0 +1,11 @@
+package com.sheep.gamegroup.absBase;
+
+import com.sheep.gamegroup.model.entity.ShowAll;
+
+/**
+ * Created by realicing on 2018/11/2.
+ * realicing@sina.com
+ */
+public interface ICanShowAll {
+    ShowAll getShowAll();
+}

+ 169 - 9
app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java

@@ -9,6 +9,7 @@ import java.util.Map;
 import retrofit2.Call;
 import retrofit2.http.Body;
 import retrofit2.http.DELETE;
+import retrofit2.http.Field;
 import retrofit2.http.FieldMap;
 import retrofit2.http.FormUrlEncoded;
 import retrofit2.http.GET;
@@ -94,11 +95,13 @@ public interface ApiService {
      */
     @GET("app/find/commend_app")
     Observable<BaseMessage> getCommendApp(@Query("game_id") String game_id, @Query("order") int order);
+
     /**
      * 查询用户是否可以弹窗推荐应用
      */
     @GET("app/find/can/commend_app")
     Observable<BaseMessage> canGetCommendApp(@Query("game_id") String game_id);
+
     /**
      * @return ,
      * 主页抢任务
@@ -179,6 +182,7 @@ public interface ApiService {
      */
     @POST("app/accepted_task/auto_check/")
     Observable<BaseMessage> commitAutoTask(@Body JSONObject param);
+
     /**
      * 获取未查看的任务成功或失败的记录
      */
@@ -267,6 +271,7 @@ public interface ApiService {
 
     /**
      * 新手红包
+     *
      * @return .
      */
     @POST("app/newbie_task/login_red_packet")
@@ -523,6 +528,7 @@ public interface ApiService {
      */
     @GET("app/punch/all_punch_log")
     Observable<BaseMessage> getAllPunchLog(@Query("page") int page, @Query("per_page") int per_page);
+
     /**
      * 获取连续打卡记录
      */
@@ -577,6 +583,7 @@ public interface ApiService {
      */
     @GET("app/punch/punch_and_sign_count")
     Observable<BaseMessage> getPunchAndSignCount();
+
     /**
      * 获取今日之星数据
      */
@@ -888,7 +895,7 @@ public interface ApiService {
      * 获取邀请用户排名
      */
     @GET("app/user/invitation_top")
-    Observable<BaseMessage> getInvitationTop(@Query("top") int top,@Query("start_time") long start_time,@Query("end_time") long end_time);//top默认为5,可以不传
+    Observable<BaseMessage> getInvitationTop(@Query("top") int top, @Query("start_time") long start_time, @Query("end_time") long end_time);//top默认为5,可以不传
 
     /**
      * 获取邀请用户进两月礼物发放记录
@@ -921,6 +928,7 @@ public interface ApiService {
      */
     @GET("app/awaken/article")
     Observable<BaseMessage> awakenApparticle(@Query("page") int page, @Query("per_page") int per_page);
+
     /**
      * 唤醒业务APP
      */
@@ -950,6 +958,7 @@ public interface ApiService {
      */
     @PUT("app/gift_bag/receive/{id}")
     Observable<BaseMessage> receiveGiftBag(@Path("id") int id);
+
     /**
      * 获取热门福利
      */
@@ -979,22 +988,26 @@ public interface ApiService {
      */
     @PUT("app/user/bind_third")
     Observable<BaseMessage> bindThird(@Body JSONObject jsonObject);
+
     /**
      * 换绑qq或微信
      */
     @PUT("app/user/modify_third")
     Observable<BaseMessage> modifyThird(@Body JSONObject jsonObject);
+
     /**
      * 发送/校验换绑验证码
      */
     @POST("app/user/modify_third_sms")
     Observable<BaseMessage> modifyThirdSms(@Body JSONObject jsonObject);
+
     /**
      * 检查是否需要输入邀请码
      */
     @GET("app/auth/need_code")
     Observable<BaseMessage> needCode(@Query("mobile") String mobile);
 //---------------------------start 玩转游戏------------------------------
+
     /**
      * 玩转游戏——每日必玩
      * 玩转游戏——近期最热
@@ -1010,6 +1023,7 @@ public interface ApiService {
      */
     @GET("app/find/recommend/user_like")
     Observable<BaseMessage> getUserLikeList();
+
     /**
      * 玩转游戏-获取主页游戏数据 1:天天更新 2:重点推荐
      * display_type
@@ -1019,6 +1033,7 @@ public interface ApiService {
      */
     @GET("app/find/recommend")
     Observable<BaseMessage> getRecommendList(@Query("display_type") int display_type);
+
     /**
      * 玩转游戏-获取主页游戏数据 1:天天更新 2:重点推荐 更多
      * display_type
@@ -1028,6 +1043,7 @@ public interface ApiService {
      */
     @GET("app/find/recommend/list")
     Observable<BaseMessage> getRecommendListMore(@Query("display_type") int display_type);
+
     /**
      * 玩转游戏-获取主页 获取标签列表
      */
@@ -1047,14 +1063,139 @@ public interface ApiService {
      */
     @GET("app/find/detail/hot_games")
     Observable<BaseMessage> getDetailHotGames(@Query("app_id") int app_id);
+
+
+    //---------------------------start game_user------------------------------
+
     /**
-     *
+     * 查询应用评论列表
+     * CommentType       int8    `description:"评论类型 1:游戏 2:资讯" json:"comment_type"`
+     * app_id * integer (query)	应用id
+     * page_no  integer (query) 页码
+     * page_size  integer (query) 每页显示条数默认10条
      */
-    @GET("")
-    Observable<BaseMessage> get(@Query("app_id") int app_id);
-//---------------------------start 玩转游戏------------------------------
+    @GET("app/game_user/app_comment_list")
+    Observable<BaseMessage> getGameUserAppCommentList(@Query("page_no") int page_no, @Query("page_size") int page_size, @Query("app_id") int app_id, @Query("comment_type") int comment_type);
+
+    /**
+     * 查询应用评分详情
+     * app_id * integer (query)	应用id
+     */
+    @GET("app/game_user/app_score_detail")
+    Observable<BaseMessage> getGameUserAppScoreDetail(@Query("app_id") int app_id);
+
+    /**
+     * 查询用户主页评论列表
+     * focus_user_id  integer (query) 关注用户id
+     * page_no  integer (query) 页码
+     * page_size  integer (query) 每页显示条数默认10条
+     */
+    @GET("app/game_user/comment_list")
+    Observable<BaseMessage> getGameUserCommentList(@Query("page_no") int page_no, @Query("page_size") int page_size, @Query("focus_user_id") int focus_user_id);
+
+    /**
+     * 查询用户主页详情
+     * focus_user_id * integer (query)	关注用户id
+     */
+    @GET("app/game_user/detail")
+    Observable<BaseMessage> getGameUserDetail(@Query("focus_user_id") int focus_user_id);
+
+    /**
+     * 关注游戏
+     * focus_game_id  * integer (query)	关注应用id
+     */
+    @POST("app/game_user/focus_game")
+    Observable<BaseMessage> postGameUserFocusGame(@Query("focus_game_id ") int focus_game_id);
+
+    /**
+     * 关注用户
+     * focus_user_id * integer (query)	关注用户id
+     */
+    @POST("app/game_user/focus_user")
+    Observable<BaseMessage> postGameUserFocusUser(@Query("focus_user_id") int focus_user_id);
+
+    /**
+     * 查询最近在玩以及同类型游戏
+     * focus_user_id * integer (query)	关注用户id
+     */
+    @GET("app/game_user/lately_game")
+    Observable<BaseMessage> getGameUserLatelyGame(@Query("focus_user_id") int focus_user_id);
+
+    /**
+     * 用户主页点赞
+     * focus_user_id * integer (query)	关注用户id
+     */
+    @POST("app/game_user/like")
+    Observable<BaseMessage> postGameUserLike(@Query("focus_user_id") int focus_user_id);
+
+    /**
+     * 回复用户评论
+     * ReplyUserCommentReq{
+     * content:	string  评论内容
+     * user_comment_reply_id:	integer ($int64) 回复id
+     * }
+     */
+    @POST("app/game_user/")
+    Observable<BaseMessage> postGameUserReplyComment(@Body JSONObject jsonObject);
+
+    /**
+     * 查询用户主页回复列表
+     * focus_user_id  integer (query) 关注用户id
+     * page_no  integer (query) 页码
+     * page_size  integer (query) 每页显示条数默认10条
+     */
+    @GET("app/game_user/reply_list")
+    Observable<BaseMessage> getGameUserReplyList(@Query("page_no") int page_no, @Query("page_size") int page_size, @Query("focus_user_id") int focus_user_id);
+
+    /**
+     * 用户评论用户
+     * UserCommentReq{
+     * content:	string  评论内容
+     * expression:	boolean 是否有表情
+     * user_comment_id:	integer ($int64) 评论id
+     * }
+     */
+    @POST("app/game_user/user_comment")
+    Observable<BaseMessage> postGameUserUserComment(@Body JSONObject jsonObject);
+
+    /**
+     * 查询用户评论详情
+     * user_comment_id  integer (query) 评论id
+     * page_no  integer (query) 页码
+     * page_size  integer (query) 每页显示条数默认10条
+     */
+    @GET("app/game_user/user_comment_detail")
+    Observable<BaseMessage> getGameUserUserCommentDetail(@Query("page_no") int page_no, @Query("page_size") int page_size, @Query("user_comment_id") int user_comment_id);
+
+    /**
+     * 用户评论用户点赞
+     * user_comment_reply_id * integer (query) 回复id
+     */
+    @POST("app/game_user/user_comment_like")
+    Observable<BaseMessage> postGameUserUserCommentLike(@Query("user_comment_reply_id") int user_comment_reply_id);
+
+    /**
+     * 用户游戏评论
+     * GameCommentReq{
+     * CommentType       int8    `description:"评论类型 1:游戏 2:资讯" json:"comment_type"`
+     * app_id:	integer ($int64) 应用id
+     * content:	string 评论内容
+     * score:	integer ($int32) 评分 1-10
+     * }
+     */
+    @POST("app/game_user/user_game_comment")
+    Observable<BaseMessage> postGameUserUserGameComment(@Body JSONObject jsonObject);
+
+    /**
+     * 用户游戏评论点赞
+     * user_comment_id * integer (query) 评论id
+     */
+    @POST("app/game_user/user_game_comment_like")
+    Observable<BaseMessage> postGameUserUserGameCommentLike(@Query("user_comment_id") int user_comment_id);
+    //---------------------------end game_user------------------------------
+//---------------------------end 玩转游戏------------------------------
+
     /**
-     *
      * type: 1002:快发出包 1003:腾讯出包 1004:小米出包
      */
     @GET("app/find")
@@ -1062,30 +1203,38 @@ public interface ApiService {
 
     /**
      * platform 平台 1:andriod 2:ios
+     *
      * @return
      */
     @GET("app/game_banner")
     Observable<BaseMessage> gameBanner(@Query("platform") int platform);
+
     /**
      * platform 平台 1:andriod 2:ios
      * 获取游戏中心主页活动数据
      */
     @GET("app/game_banner/activity?platform=1")
     Observable<BaseMessage> gameBannerAct();
+
     /**
      * platform 平台 1:andriod 2:ios
+     *
      * @return
      */
     @GET("app/find/{id}")
     Observable<BaseMessage> playGameDetail(@Path("id") int id);
+
     /**
      * 判断是否是第一次运行的设备
+     *
      * @return
      */
     @GET("app/event_tracking/check_user_first")
     Observable<BaseMessage> checkUserFirst();
+
     /**
      * 查询用户截图加密开关
+     *
      * @return
      */
     @GET("app/common_config/need_shot_screen")
@@ -1095,47 +1244,56 @@ public interface ApiService {
 //    http://10.8.220.237:8010/v1/app/mobile_point/score    获取用户积分 post
 //    http://10.8.220.237:8010/v1/app/mobile_point/sms      获取短信验证码 post
 //    http://10.8.220.237:8010/v1/app/mobile_point/recharge 兑换积分 post
+
     /**
      * 获取商品列表
+     *
      * @return
      */
     @GET("app/mobile_point/goods")
     Observable<BaseMessage> getCMCCGoods();
+
     /**
      * 获取用户积分
+     *
      * @return
      */
     @POST("app/mobile_point/score")
     Observable<BaseMessage> getCMCCScore(@Body JSONObject jsonObject);
+
     /**
      * 获取短信验证码
+     *
      * @return
      */
     @POST("app/mobile_point/sms")
     Observable<BaseMessage> smsCMCC(@Body JSONObject jsonObject);
+
     /**
      * 兑换积分
+     *
      * @return
      */
     @POST("app/mobile_point/recharge")
     Observable<BaseMessage> rechargeCMCC(@Body JSONObject jsonObject);
 
 
-
-
-
 //---------------------------start 游戏sdk相关接口-------------------------------------
+
     /**
      * 请求授权
+     *
      * @return
      */
     @GET("app/sdk/{game_key}")
     Observable<BaseMessage> verificationAuth(@Header("Authorization") String token, @Path("game_key") String game_key);
+
     /**
      * 绵羊币支付订单查询接口
      */
     @GET("app/sdk/find/order")
     Observable<BaseMessage> sdkFindOrder(@Header("Authorization") String token, @Query("order_no") String order_no);
+
     /**
      * 绵羊币支付sdk订单
      */
@@ -1144,8 +1302,10 @@ public interface ApiService {
 //---------------------------end 游戏sdk相关接口-------------------------------------
 
 //---------------------------start 有米科技相关接口-------------------------------------
+
     /**
      * 获取有米积分余额
+     *
      * @return
      */
     @GET("youmi/youmi_total_price")

+ 121 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/AppScoreDetail.java

@@ -0,0 +1,121 @@
+package com.sheep.gamegroup.model.entity;
+
+import com.sheep.gamegroup.util.ListUtil;
+
+import java.util.List;
+
+/**
+ * Created by realicing on 2018/11/2.
+ * realicing@sina.com
+ * level_1:	integer ($int32)
+ * 评分等级1
+ * level_2:	integer ($int32)
+ * 评分等级2
+ * level_3:	integer ($int32)
+ * 评分等级3
+ * level_4:	integer ($int32)
+ * 评分等级4
+ * level_5:	integer ($int32)
+ * 评分等级5
+ * score:	number ($float)
+ * 评分
+ * score_count:	integer ($int64)
+ * 评分人数
+ * 游戏评分详情
+ */
+public class AppScoreDetail {
+    private int level_1;
+    private int level_2;
+    private int level_3;
+    private int level_4;
+    private int level_5;
+    private int score;
+    private int score_count;
+
+    public int getLevel_1() {
+        return level_1;
+    }
+
+    public void setLevel_1(int level_1) {
+        this.level_1 = level_1;
+    }
+
+    public int getLevel_2() {
+        return level_2;
+    }
+
+    public void setLevel_2(int level_2) {
+        this.level_2 = level_2;
+    }
+
+    public int getLevel_3() {
+        return level_3;
+    }
+
+    public void setLevel_3(int level_3) {
+        this.level_3 = level_3;
+    }
+
+    public int getLevel_4() {
+        return level_4;
+    }
+
+    public void setLevel_4(int level_4) {
+        this.level_4 = level_4;
+    }
+
+    public int getLevel_5() {
+        return level_5;
+    }
+
+    public void setLevel_5(int level_5) {
+        this.level_5 = level_5;
+    }
+
+    public int getScore() {
+        return score;
+    }
+
+    public void setScore(int score) {
+        this.score = score;
+    }
+
+    public int getScore_count() {
+        return score_count;
+    }
+
+    public void setScore_count(int score_count) {
+        this.score_count = score_count;
+    }
+
+
+    public List<GameAppScore> toGameAppScoreList(){
+        List<GameAppScore> list = ListUtil.emptyList();
+        GameAppScore gameAppScore1 = new GameAppScore();
+        gameAppScore1.setNum(level_1);
+        gameAppScore1.setStar(1);
+        gameAppScore1.setMax(score_count);
+        list.add(gameAppScore1);
+        GameAppScore gameAppScore2 = new GameAppScore();
+        gameAppScore2.setNum(level_2);
+        gameAppScore2.setStar(2);
+        gameAppScore2.setMax(score_count);
+        list.add(gameAppScore2);
+        GameAppScore gameAppScore3 = new GameAppScore();
+        gameAppScore3.setNum(level_3);
+        gameAppScore3.setStar(3);
+        gameAppScore3.setMax(score_count);
+        list.add(gameAppScore3);
+        GameAppScore gameAppScore4 = new GameAppScore();
+        gameAppScore4.setNum(level_4);
+        gameAppScore4.setStar(4);
+        gameAppScore4.setMax(score_count);
+        list.add(gameAppScore4);
+        GameAppScore gameAppScore5 = new GameAppScore();
+        gameAppScore5.setNum(level_5);
+        gameAppScore5.setStar(5);
+        gameAppScore5.setMax(score_count);
+        list.add(gameAppScore5);
+        return list;
+    }
+}

+ 12 - 3
app/src/main/java/com/sheep/gamegroup/model/entity/FindAppScore.java

@@ -4,9 +4,10 @@ package com.sheep.gamegroup.model.entity;
  * Created by realicing on 2018/6/29.
  * realicing@sina.com
  */
-public class FindAppScore {
-    private int star;
-    private int num;
+public class GameAppScore {
+    private int star;//几个星
+    private int num;//有多少人评
+    private int max;//总共有多少人评
 
     public int getStar() {
         return star;
@@ -23,4 +24,12 @@ public class FindAppScore {
     public void setNum(int num) {
         this.num = num;
     }
+
+    public int getMax() {
+        return max;
+    }
+
+    public void setMax(int max) {
+        this.max = max;
+    }
 }

+ 31 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/ShowAll.java

@@ -0,0 +1,31 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/11/2.
+ * realicing@sina.com
+ */
+public class ShowAll {
+
+    public ShowAll(String content) {
+        this.content = content;
+    }
+
+    private boolean yes;
+    private String content;
+
+    public boolean isYes() {
+        return yes;
+    }
+
+    public void setYes(boolean yes) {
+        this.yes = yes;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+}

+ 191 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/UserComment.java

@@ -0,0 +1,191 @@
+package com.sheep.gamegroup.model.entity;
+
+
+import com.sheep.gamegroup.absBase.ICanShowAll;
+
+/**
+ * Created by realicing on 2018/11/1.
+ * realicing@sina.com
+ * update_time:	integer ($int64)
+ * level:	integer ($int32)
+ * 评分等级 1-5
+ * app_name:	string
+ * 应用名称
+ * nickname:	string
+ * 昵称
+ * user_id:	integer ($int64)
+ * 用户id
+ * create_time:	integer ($int64)
+ * score:	integer ($int32)
+ * 评分 1-10
+ * status:	integer ($int32)
+ * 审核状态 1:通过 2:未通过
+ * like:	integer ($int64)
+ * 点赞数
+ * app_icon:	string
+ * 应用图标
+ * expression:	integer ($int64)
+ * 表情数
+ * app_type:	integer ($int32)
+ * 评论类型 1:游戏
+ * content:	string
+ * 评论内容
+ * avatar:	string
+ * 头像
+ * app_id:	integer ($int64)
+ * 评论应用id
+ * id:	integer ($int64)
+ * comment:	integer ($int64)
+ * 评论数
+ *
+ * 用户评论
+ */
+public class UserComment implements ICanShowAll {
+
+    private int id;
+
+    private int user_id;
+
+    private int app_id;
+
+    private String app_name;
+
+    private String app_icon;
+
+    private int app_type;
+
+    private String nickname;
+
+    private String avatar;
+
+    private int like;
+
+    private int expression;
+
+    private int comment;
+
+    private int score;
+
+    private int level;
+
+    private int status;
+
+    private String content;
+
+    private int create_time;
+
+    private int update_time;
+
+    public void setId(int id){
+        this.id = id;
+    }
+    public int getId(){
+        return this.id;
+    }
+    public void setUser_id(int user_id){
+        this.user_id = user_id;
+    }
+    public int getUser_id(){
+        return this.user_id;
+    }
+    public void setApp_id(int app_id){
+        this.app_id = app_id;
+    }
+    public int getApp_id(){
+        return this.app_id;
+    }
+    public void setApp_name(String app_name){
+        this.app_name = app_name;
+    }
+    public String getApp_name(){
+        return this.app_name;
+    }
+    public void setApp_icon(String app_icon){
+        this.app_icon = app_icon;
+    }
+    public String getApp_icon(){
+        return this.app_icon;
+    }
+    public void setApp_type(int app_type){
+        this.app_type = app_type;
+    }
+    public int getApp_type(){
+        return this.app_type;
+    }
+    public void setNickname(String nickname){
+        this.nickname = nickname;
+    }
+    public String getNickname(){
+        return this.nickname;
+    }
+    public void setAvatar(String avatar){
+        this.avatar = avatar;
+    }
+    public String getAvatar(){
+        return this.avatar;
+    }
+    public void setLike(int like){
+        this.like = like;
+    }
+    public int getLike(){
+        return this.like;
+    }
+    public void setExpression(int expression){
+        this.expression = expression;
+    }
+    public int getExpression(){
+        return this.expression;
+    }
+    public void setComment(int comment){
+        this.comment = comment;
+    }
+    public int getComment(){
+        return this.comment;
+    }
+    public void setScore(int score){
+        this.score = score;
+    }
+    public int getScore(){
+        return this.score;
+    }
+    public void setLevel(int level){
+        this.level = level;
+    }
+    public int getLevel(){
+        return this.level;
+    }
+    public void setStatus(int status){
+        this.status = status;
+    }
+    public int getStatus(){
+        return this.status;
+    }
+    public void setContent(String content){
+        this.content = content;
+    }
+    public String getContent(){
+        return this.content;
+    }
+    public void setCreate_time(int create_time){
+        this.create_time = create_time;
+    }
+    public int getCreate_time(){
+        return this.create_time;
+    }
+    public void setUpdate_time(int update_time){
+        this.update_time = update_time;
+    }
+    public int getUpdate_time(){
+        return this.update_time;
+    }
+
+
+
+    private ShowAll showAll;
+    @Override
+    public ShowAll getShowAll() {
+        if(showAll == null)
+            showAll = new ShowAll(content);
+        return showAll;
+    }
+}

+ 47 - 0
app/src/main/java/com/sheep/gamegroup/util/ApiJSONUtil.java

@@ -0,0 +1,47 @@
+package com.sheep.gamegroup.util;
+
+
+import android.support.annotation.IntDef;
+import android.support.annotation.StringDef;
+
+import com.alibaba.fastjson.JSONObject;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+import rx.Observable;
+
+/**
+ * Created by realicing on 2018/11/2.
+ * realicing@sina.com
+ */
+public class ApiJSONUtil {
+    public static final int COMMENT_TYPE_GAME = 1;
+    public static final int COMMENT_TYPE_INFORMATION = 2;
+    @IntDef({COMMENT_TYPE_GAME, COMMENT_TYPE_INFORMATION})
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface COMMENT_TYPE {
+    }
+    /**
+     * CommentType       int8    `description:"评论类型 1:游戏 2:资讯" json:"comment_type"`
+     * app_id:	integer ($int64) 应用id
+     * content:	string 评论内容
+     * score:	integer ($int32) 评分 1-10
+     * @param comment_type
+     * @param app_id
+     * @param content
+     * @param score
+     * @return
+     */
+    public static Observable<BaseMessage> postGameUserUserGameComment(@COMMENT_TYPE int comment_type, int app_id, String content, int score) {
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("comment_type", comment_type);
+        jsonObject.put("app_id", app_id);
+        jsonObject.put("content", content);
+        jsonObject.put("score", score);
+        return SheepApp.getInstance().getNetComponent().getApiService().postGameUserUserGameComment(jsonObject);
+    }
+
+}

+ 16 - 0
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -18,11 +18,13 @@ import android.text.Html;
 import android.text.TextUtils;
 import android.util.TypedValue;
 import android.view.View;
+import android.view.ViewGroup;
 import android.view.ViewTreeObserver;
 import android.webkit.DownloadListener;
 import android.webkit.WebView;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
+import android.widget.RelativeLayout;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSONObject;
@@ -1908,6 +1910,20 @@ public class CommonUtil {
         }
     }
 
+    //设置无数据距离上面的距离
+    public void setEmptyViewMargin(View empty_view, int topMargin, int bottomMargin) {
+        if(empty_view != null) {
+            ViewGroup.LayoutParams layoutParams = empty_view.getLayoutParams();
+            if(layoutParams instanceof RelativeLayout.LayoutParams) {
+                ((RelativeLayout.LayoutParams) layoutParams).topMargin = topMargin;
+                ((RelativeLayout.LayoutParams) layoutParams).bottomMargin = bottomMargin;
+            } else if(layoutParams instanceof LinearLayout.LayoutParams) {
+                ((LinearLayout.LayoutParams) layoutParams).topMargin = topMargin;
+                ((LinearLayout.LayoutParams) layoutParams).bottomMargin = bottomMargin;
+            }
+            empty_view.setLayoutParams(layoutParams);
+        }
+    }
     //设置无数据显示
     public void updateEmptyView(View empty_view, boolean showEmpty) {
         updateEmptyView(empty_view, showEmpty, false);

+ 10 - 0
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -41,6 +41,7 @@ import com.sheep.gamegroup.model.entity.XianWanEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.view.activity.ActAudit;
 import com.sheep.gamegroup.view.activity.ActBindMobileRegister;
+import com.sheep.gamegroup.view.activity.ActCommentGameApp;
 import com.sheep.gamegroup.view.activity.ActCreditCardTaskList;
 import com.sheep.gamegroup.view.activity.ActCreditCardWeb;
 import com.sheep.gamegroup.view.activity.ActDownloadWelfareList;
@@ -2087,4 +2088,13 @@ public class Jump2View {
             }
         }
     }
+
+    /**
+     * 跳转到游戏评论界面
+     * @param activity
+     * @param game_id 游戏id
+     */
+    public void goActCommentGameApp(Activity activity, int game_id) {
+        activity.startActivity(new Intent(activity, ActCommentGameApp.class).putExtra("game_id", game_id));
+    }
 }

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

@@ -37,7 +37,7 @@ public class RefreshUtil {
     /**
      * public parameter
      */
-    public void publicParameterRefresh(SmartRefreshLayout refreshLayout, Context context){
+    public void publicParameterLoadMore(SmartRefreshLayout refreshLayout, Context context){
         refreshLayout.setEnableRefresh(true);//是否启用下拉刷新功能
         refreshLayout.setEnableLoadMore(true);//是否启用上拉加载功能
         //设置 Header 为 贝塞尔雷达 样式

+ 41 - 0
app/src/main/java/com/sheep/gamegroup/util/TextViewUtil.java

@@ -1,9 +1,15 @@
 package com.sheep.gamegroup.util;
 
 import android.text.Layout;
+import android.text.TextUtils;
+import android.view.View;
 import android.view.ViewTreeObserver;
 import android.widget.TextView;
 
+import com.sheep.gamegroup.absBase.ICanShowAll;
+import com.sheep.gamegroup.model.entity.ShowAll;
+import com.sheep.jiuyan.samllsheep.R;
+
 import rx.functions.Action1;
 
 /**
@@ -26,4 +32,39 @@ public class TextViewUtil {
         });
 
     }
+    //初始化文本介绍,必须有 intro_content 和 intro_show_all
+    public static void initIntroView(View itemView, final ShowAll showAll) {
+        String text = showAll.getContent();
+        final TextView intro_content = itemView.findViewById(R.id.intro_content);
+        final TextView intro_show_all = itemView.findViewById(R.id.intro_show_all);
+        final View intro_show_all_no = itemView.findViewById(R.id.intro_show_all_no);
+        {
+            boolean canShowAll = showAll.isYes();
+            intro_content.setMaxLines(canShowAll ? Integer.MAX_VALUE : 3);
+            intro_content.setEllipsize(canShowAll ? null : TextUtils.TruncateAt.END);
+            intro_show_all.setText(canShowAll ? "显示全部" : "收起");
+        }
+        TextViewUtil.listenEllipsizeChange(intro_content, new Action1<Integer>() {
+            @Override
+            public void call(Integer integer) {
+                showAll.setYes(integer > 0);
+                if (showAll.isYes()) {
+                    ViewUtil.setVisibility(intro_show_all, true);
+                    ViewUtil.setVisibility(intro_show_all_no, false);
+                }
+            }
+        });
+        intro_show_all.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+//                boolean canShowAll = intro_content.getMaxLines() == 3;
+                boolean canShowAll = showAll.isYes();
+                intro_content.setMaxLines(canShowAll ? Integer.MAX_VALUE : 3);
+                intro_content.setEllipsize(canShowAll ? null : TextUtils.TruncateAt.END);
+                intro_show_all.setText(canShowAll ? "显示全部" : "收起");
+                showAll.setYes(!showAll.isYes());
+            }
+        });
+        ViewUtil.setText(intro_content, text);
+    }
 }

+ 8 - 0
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -1414,6 +1414,14 @@ public class ViewUtil {
         }
     }
 
+    public static void setAvatar(ImageView imageView, String pictures) {
+        if (imageView != null && !TextUtils.isEmpty(pictures)) {
+            if (pictures.contains(";")) {
+                pictures = pictures.split(";")[0];
+            }
+            GlideImageLoader.setAvatar(imageView, pictures);
+        }
+    }
     public static void setImage(ImageView imageView, String pictures) {
         if (imageView != null && !TextUtils.isEmpty(pictures)) {
             if (pictures.contains(";")) {

+ 100 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActCommentGameApp.java

@@ -0,0 +1,100 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.EditText;
+import android.widget.RatingBar;
+
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.ApiJSONUtil;
+import com.sheep.gamegroup.util.TestUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+
+import butterknife.BindView;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by realicing on 2018/11/1.
+ * realicing@sina.com
+ * 评论游戏
+ */
+public class ActCommentGameApp extends BaseActivity {
+    @BindView(R.id.act_comment_game_app_score)
+    RatingBar act_comment_game_app_score;
+    @BindView(R.id.act_comment_game_app_input_comment)
+    EditText act_comment_game_app_input_comment;
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.act_comment_game_app;
+    }
+
+    @Override
+    public void initView() {
+        TitleBarUtils.getInstance().setTitle(this, "写评价")
+                .setEndTv(this, "发表", 0xFF2EBEF2, new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        int progress = act_comment_game_app_score.getProgress();
+                        String content = act_comment_game_app_input_comment.getText().toString();
+                        commitUserGameComment(progress, content);
+                    }
+                })
+                .setTitleFinish(this);
+    }
+    //评论游戏
+    private void commitUserGameComment(int score, String content) {
+        if(TestUtil.isDev()) G.showToast(score + " " + content);
+        if(TextUtils.isEmpty(content)){
+            G.showToast("亲,您还没有填写你的观点呢");
+            return;
+        }
+        ApiJSONUtil.postGameUserUserGameComment(ApiJSONUtil.COMMENT_TYPE_GAME, game_id, content, score)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                        finish();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                    }
+                });
+    }
+
+
+    private int game_id;
+
+    @Override
+    public void initData() {
+        game_id = getIntent().getIntExtra("game_id", 0);
+        if (game_id > 0) {
+            if(TestUtil.isDev()) G.showToast("game_id为" + game_id);
+            act_comment_game_app_score.setIsIndicator(false);
+        } else {
+            G.showToast(R.string.error_data);
+            finish();
+        }
+    }
+
+    //点击x来重置评分
+    public void onClickXScore(View view) {
+        act_comment_game_app_score.setRating(0);
+    }
+
+    //点击x来清空输入内容
+    public void onClickXInput(View view) {
+        ViewUtil.setText(act_comment_game_app_input_comment);
+    }
+}

+ 5 - 5
app/src/main/java/com/sheep/gamegroup/view/activity/ActFindGame.java

@@ -23,7 +23,7 @@ import com.sheep.gamegroup.greendao.download.DownLoadInfo;
 import com.sheep.gamegroup.helper.ImageListHelper;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.GameApp;
-import com.sheep.gamegroup.model.entity.FindAppScore;
+import com.sheep.gamegroup.model.entity.GameAppScore;
 import com.sheep.gamegroup.model.entity.MyFindAppCore;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
@@ -254,7 +254,7 @@ public class ActFindGame extends BaseActivity {
     }
 
     private void initAppScoreNum() {
-        List<FindAppScore> findAppScoreList = DataUtil.getInstance().getCacheList(ApiKey.score_num(id), FindAppScore.class);
+        List<GameAppScore> findAppScoreList = DataUtil.getInstance().getCacheList(ApiKey.score_num(id), GameAppScore.class);
         if (!findAppScoreList.isEmpty()) {
             loadAppScoreNum(findAppScoreList);
         }
@@ -264,7 +264,7 @@ public class ActFindGame extends BaseActivity {
                 .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
                     @Override
                     public void onNext(BaseMessage baseMessage) {
-                        List<FindAppScore> findAppScoreList = baseMessage.getDataList(FindAppScore.class);
+                        List<GameAppScore> findAppScoreList = baseMessage.getDataList(GameAppScore.class);
                         if (ListUtil.isEmpty(findAppScoreList))
                             resetAppScoreNum();
                         else
@@ -413,8 +413,8 @@ public class ActFindGame extends BaseActivity {
     @BindView(R.id.find_game_score)
     TextView find_game_score;
 
-    private void loadAppScoreNum(List<FindAppScore> findAppScoreList) {
-        for (FindAppScore findAppScore : findAppScoreList) {
+    private void loadAppScoreNum(List<GameAppScore> findAppScoreList) {
+        for (GameAppScore findAppScore : findAppScoreList) {
             switch (findAppScore.getStar()) {
                 case 1:
                     find_game_progress_1.setProgress(findAppScore.getNum());

+ 69 - 44
app/src/main/java/com/sheep/gamegroup/view/activity/ActGcGameAppDetail.java

@@ -1,7 +1,9 @@
 package com.sheep.gamegroup.view.activity;
 
 import android.content.Intent;
+import android.os.Bundle;
 import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
 import android.support.design.widget.TabLayout;
 import android.support.v4.app.Fragment;
 import android.support.v4.view.ViewPager;
@@ -11,10 +13,14 @@ import android.view.View;
 import android.widget.ImageView;
 import android.widget.TextView;
 
+import com.kfzs.duanduan.utils.StatusBarUtils;
 import com.scwang.smartrefresh.layout.SmartRefreshLayout;
 import com.scwang.smartrefresh.layout.api.RefreshLayout;
 import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
+import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
 import com.sheep.gamegroup.absBase.AbsGetDownloadListener;
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.absBase.ILoadMore;
 import com.sheep.gamegroup.absBase.IRefresh;
 import com.sheep.gamegroup.event.BigEvent;
 import com.sheep.gamegroup.helper.DownloadHelper;
@@ -23,16 +29,17 @@ import com.sheep.gamegroup.model.entity.GameEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.RefreshUtil;
 import com.sheep.gamegroup.util.TagListUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
+import com.sheep.gamegroup.view.fragment.FgtGcGameAppComment;
 import com.sheep.gamegroup.view.fragment.FgtGcGameAppDetail;
-import com.sheep.gamegroup.view.fragment.FgtNull;
+import com.sheep.gamegroup.view.fragment.FgtGcGameAppWelfare;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
-import com.sheep.jiuyan.samllsheep.ui.base.BaseActivity;
 import com.sheep.jiuyan.samllsheep.utils.G;
 
 import org.afinal.simplecache.ApiKey;
@@ -52,6 +59,17 @@ import rx.schedulers.Schedulers;
  * 新的游戏详情界面
  */
 public class ActGcGameAppDetail extends BaseActivity {
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        StatusBarUtils.setTranslucent(this);
+        super.onCreate(savedInstanceState);
+    }
+    @Override
+    protected int getLayoutId() {
+        return R.layout.act_gc_game_app_detail;
+    }
+
     @BindView(R.id.refresh)
     SmartRefreshLayout refresh;
     @BindView(R.id.tabLayout)
@@ -69,61 +87,50 @@ public class ActGcGameAppDetail extends BaseActivity {
     @BindView(R.id.gc_game_app_detail_tag_list)
     RecyclerView recyclerView;
 
-    @Override
-    protected int onLayout() {
-        return R.layout.act_gc_game_app_detail;
-    }
-
-    private int id;
-
-    @Override
-    protected void onObject() {
-        id = getIntent().getIntExtra("id", 0);
-    }
-
     private TitleFragmentListAdapter mAdapter;
     private FgtGcGameAppDetail fgtGcPlayGameDetail;
+    private FgtGcGameAppComment fgtGcGameAppComment;
+    private FgtGcGameAppWelfare fgtGcGameAppWelfare;
 
+    private int id;
     @Override
-    protected void onView() {
+    public void initView() {
+        id = getIntent().getIntExtra("id", 0);
         EventBus.getDefault().register(this);
         //tagList
         TagListUtil.setTagList(recyclerView, tagList);
         //viewPager
         mAdapter = new TitleFragmentListAdapter(getSupportFragmentManager());
-        fgtGcPlayGameDetail = FgtGcGameAppDetail.newInstance();
-        fgtGcPlayGameDetail.setAppId(id);
+        fgtGcPlayGameDetail = FgtGcGameAppDetail.newInstance(id);
+        fgtGcGameAppComment = FgtGcGameAppComment.newInstance(id);
+        fgtGcGameAppWelfare = FgtGcGameAppWelfare.newInstance(id);
         mAdapter.add(fgtGcPlayGameDetail, "详情");
-        mAdapter.add(new FgtNull(), "评价");
-        mAdapter.add(new FgtNull(), "福利");
+        mAdapter.add(fgtGcGameAppComment, "评价");
+        mAdapter.add(fgtGcGameAppWelfare, "福利");
         viewPager.setOffscreenPageLimit(3);
         viewPager.setAdapter(mAdapter);
         tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(viewPager));
         tabLayout.setupWithViewPager(viewPager);
         CommonUtil.getInstance().reflex(tabLayout, this);
         //refresh
-        refresh.setOnRefreshListener(new OnRefreshListener() {
+        refresh.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
 
             @Override
             public void onRefresh(@NonNull RefreshLayout refreshLayout) {
-                initData();
+                refreshData();
+            }
+
+            @Override
+            public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
+                loadMoreData();
             }
         });
-        RefreshUtil.newInstance().publicParameter(refresh, this);
+        fgtGcGameAppComment.setSmartRefreshLayout(refresh);
+        RefreshUtil.newInstance().publicParameterLoadMore(refresh, this);
     }
 
     private List<String> tagList = ListUtil.emptyList();
 
-    @Override
-    protected void onData() {
-        GameEntity gameEntity = DataUtil.getInstance().getCacheResult(ApiKey.playGameDetail(id), GameEntity.class);
-        checkData(gameEntity);
-        initDetailFromNet();
-        if (refresh != null) {
-            refresh.autoRefresh();
-        }
-    }
-
     //重置view
     private void resetView() {
         ViewUtil.setDefaultText(gc_game_app_detail_name);
@@ -157,6 +164,7 @@ public class ActGcGameAppDetail extends BaseActivity {
         CommonUtil.getInstance().palyGameDetailBtnValue(this, gameEntity, gc_game_app_detail_bt2, 0);
         //初始化详情界面
         fgtGcPlayGameDetail.loadData(gameEntity);
+        fgtGcGameAppWelfare.loadData(gameEntity);
     }
 
     //通过网络获取游戏数据并尝试加载
@@ -182,22 +190,44 @@ public class ActGcGameAppDetail extends BaseActivity {
                 });
     }
 
-    private int initDataCount = 0;
-
-    private void initData() {
-        if (initDataCount != 0) {
+    private int refreshDataCount = 0;
+    @Override
+    public void initData() {
+        GameEntity gameEntity = DataUtil.getInstance().getCacheResult(ApiKey.playGameDetail(id), GameEntity.class);
+        checkData(gameEntity);
+        initDetailFromNet();
+        if (refresh != null) {
+            refresh.autoRefresh();
+        }
+    }
+    //刷新数据
+    public void refreshData(){
+        boolean isRefresh = false;
+        if (refreshDataCount != 0) {
             Fragment item = mAdapter.getItem(viewPager.getCurrentItem());
             if (item instanceof IRefresh) {//可刷新,就调用当前fragment刷新数据
                 ((IRefresh) item).refreshData();
+                isRefresh = true;
             }
         }
-        initDataCount++;
-        notifyDataSetChanged();
+        refreshDataCount++;
+        if(!isRefresh)
+            notifyDataSetChanged();
+    }
+    //加载更多数据
+    private void loadMoreData() {
+        Fragment item = mAdapter.getItem(viewPager.getCurrentItem());
+        if (item instanceof ILoadMore) {//可加载更多,就调用当前fragment刷新数据
+            ((ILoadMore) item).loadMoreData();
+        } else {
+            notifyDataSetChanged();
+        }
     }
 
     private void notifyDataSetChanged() {
         if (refresh != null) {
             refresh.finishRefresh();
+            refresh.finishLoadMore();
         }
     }
 
@@ -213,7 +243,7 @@ public class ActGcGameAppDetail extends BaseActivity {
 
     //点击加,发表评论
     public void onClickPlusDrag(View view) {
-        G.showToast(R.string.coming_soon);
+        Jump2View.getInstance().goActCommentGameApp(this, id);
     }
 
     //点击关注
@@ -250,11 +280,6 @@ public class ActGcGameAppDetail extends BaseActivity {
 
     @Subscribe
     public void onEventMainThread(BigEvent event) {
-        switch (event.getEventTypes()) {
-            case REFRESH_XIAOMI_GAME_LIST:
-                initData();
-                break;
-        }
         absGetDownloadListener.onEventMainThread(event);
     }
 

+ 61 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppComment.java

@@ -0,0 +1,61 @@
+package com.sheep.gamegroup.view.adapter;
+
+import android.support.v7.widget.AppCompatRatingBar;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.sheep.gamegroup.model.entity.UserComment;
+import com.sheep.gamegroup.util.TextViewUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import java.util.List;
+
+/**
+ * Created by realicing on 2018/11/1.
+ * realicing@sina.com
+ * 游戏评论adapter
+ */
+public class AdpGcGameAppComment extends BaseQuickAdapter<UserComment, BaseViewHolder> {
+    public AdpGcGameAppComment(List<UserComment> list) {
+        super(R.layout.item_gc_game_app_comment, list);
+    }
+
+    @Override
+    protected void convert(BaseViewHolder helper, UserComment item) {
+        int position = helper.getAdapterPosition() - getHeaderLayoutCount();
+        ImageView game_app_comment_user_avatar = helper.itemView.findViewById(R.id.game_app_comment_user_avatar);
+        TextView game_app_comment_user_name = helper.itemView.findViewById(R.id.game_app_comment_user_name);
+        AppCompatRatingBar game_app_comment_score = helper.itemView.findViewById(R.id.game_app_comment_score);
+        TextView game_app_comment_num1 = helper.itemView.findViewById(R.id.game_app_comment_num1);
+        TextView game_app_comment_num2 = helper.itemView.findViewById(R.id.game_app_comment_num2);
+        TextView game_app_comment_num3 = helper.itemView.findViewById(R.id.game_app_comment_num3);
+        View game_app_comment_line_top = helper.itemView.findViewById(R.id.game_app_comment_line_top);
+        ViewUtil.setVisibility(game_app_comment_line_top, position != 0);
+        if(item == null){
+            return;
+        }
+        ViewUtil.setAvatar(game_app_comment_user_avatar, item.getAvatar());
+        ViewUtil.setText(game_app_comment_num1, item.getComment());
+        ViewUtil.setText(game_app_comment_num2, item.getLike());
+        ViewUtil.setText(game_app_comment_num3, item.getExpression());
+        game_app_comment_score.setProgress(item.getScore());
+        game_app_comment_score.setMax(10);
+        ViewUtil.setText(game_app_comment_user_name, item.getNickname());
+        //String.format(Locale.CHINA, "%d %d %d %d", position, helper.getAdapterPosition(), helper.getLayoutPosition(), helper.getOldPosition()));
+        TextViewUtil.initIntroView(helper.itemView, item.getShowAll());
+
+        game_app_comment_num1.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                //TODO 跳转游戏评论详情界面
+                G.showToast(R.string.coming_soon);
+            }
+        });
+    }
+}

+ 49 - 52
app/src/main/java/com/sheep/gamegroup/view/fragment/BaseListFragment3.java

@@ -1,16 +1,14 @@
 package com.sheep.gamegroup.view.fragment;
 
 import android.app.Activity;
-import android.support.v4.view.ViewPager;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.view.View;
-import android.view.ViewGroup;
 
 import com.scwang.smartrefresh.layout.SmartRefreshLayout;
-import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.absBase.ILoadMore;
 import com.sheep.gamegroup.absBase.IRefresh;
+import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.CommonUtil;
@@ -20,7 +18,6 @@ import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
-import com.sheep.jiuyan.samllsheep.utils.G;
 
 import java.util.List;
 
@@ -29,6 +26,7 @@ import rx.Observable;
 import rx.android.schedulers.AndroidSchedulers;
 import rx.functions.Action1;
 import rx.schedulers.Schedulers;
+
 /**
  * Created by realicing on 2018/10/9.
  * realicing@sina.com
@@ -41,6 +39,7 @@ public abstract class BaseListFragment3<T> extends BaseFragment implements IRefr
     }
 
     protected Activity activity;
+
     @Override
     public void onViewCreated() {
         activity = getActivity();
@@ -58,6 +57,7 @@ public abstract class BaseListFragment3<T> extends BaseFragment implements IRefr
                 break;
         }
     }
+
     @BindView(R.id.title)
     protected View title;
     @BindView(R.id.empty_view)
@@ -74,47 +74,53 @@ public abstract class BaseListFragment3<T> extends BaseFragment implements IRefr
     public void initView() {
         title.setVisibility(View.GONE);
     }
+
     public void initListener() {
         view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        view_list.setHasFixedSize(true);
+        view_list.setNestedScrollingEnabled(false);
         view_list.setAdapter(getAdapter());
     }
+
     //加载更多数据
     public void loadMoreData() {
-        if(ListUtil.size(list) >= per_page*page){
+        if (ListUtil.size(list) >= per_page * page) {
             page += 1;
             initData();
-        }else {
+        } else {
             setNoMore(true);
+            refreshOrLoadMoreComplete();
         }
     }
 
     //设置是否还有更多数据
     public void setNoMore(boolean noMore) {
         this.noMore = noMore;
-        if(smartRefreshLayout != null && getUserVisibleHint()) {
+        if (smartRefreshLayout != null && getUserVisibleHint()) {
             smartRefreshLayout.setNoMoreData(noMore);
         }
     }
+
     //加载完成时更新header或footer
     protected void refreshOrLoadMoreComplete() {
-        if(smartRefreshLayout != null && getUserVisibleHint()) {
-            if (page == 1) {
-                smartRefreshLayout.finishRefresh();
-            } else {
-                smartRefreshLayout.finishLoadMore();
-            }
+        if (smartRefreshLayout != null && getUserVisibleHint()) {
+            smartRefreshLayout.finishRefresh();
+            smartRefreshLayout.finishLoadMore();
         }
     }
+
     protected List<T> list = ListUtil.emptyList();
     protected List<T> lastCacheList = ListUtil.emptyList();
+
     //默认先获取缓存
-    protected boolean isFirstGetACache(){
+    protected boolean isFirstGetACache() {
         return true;
     }
+
     //加载数据
     public void initData() {
         final String urlKey = getKey(page, per_page);
-        if(isFirstGetACache()) {
+        if (isFirstGetACache()) {
             //先尝试获取缓存数据
             lastCacheList = DataUtil.getInstance().getCacheList(urlKey, getTClass());
             loadList(lastCacheList);
@@ -122,11 +128,11 @@ public abstract class BaseListFragment3<T> extends BaseFragment implements IRefr
         SysAppUtil.checkNet(new Action1<Integer>() {
             @Override
             public void call(Integer result) {
-                if(result != 0){//无网络
-                    if(check_net_ll != null)
+                if (result != 0) {//无网络
+                    if (check_net_ll != null)
                         check_net_ll.setVisibility(View.VISIBLE);
                 } else {
-                    if(check_net_ll != null)
+                    if (check_net_ll != null)
                         check_net_ll.setVisibility(View.GONE);
                 }
             }
@@ -139,12 +145,12 @@ public abstract class BaseListFragment3<T> extends BaseFragment implements IRefr
                     public void onNext(BaseMessage baseMessage) {
                         lastMessage = baseMessage;
                         boolean isNewData = DataUtil.getInstance().isNewData(urlKey);
-                        if(isNewData || !isFirstGetACache()) {
-                            if(isFirstGetACache())
+                        if (isNewData || !isFirstGetACache()) {
+                            if (isFirstGetACache())
                                 ListUtil.removeAll(list, lastCacheList);
                             List<T> newList = baseMessage.getDatas(getTClass());
                             loadList(newList);
-                        }else {
+                        } else {
                             notifyDataSetChanged();
                         }
                     }
@@ -160,98 +166,89 @@ public abstract class BaseListFragment3<T> extends BaseFragment implements IRefr
     @Override
     public void onResume() {
         super.onResume();
-        if(refreshDataType() == REFRESH_ON_RESUME){
+        if (refreshDataType() == REFRESH_ON_RESUME) {
             refreshData();
         }
     }
+
     public static final int REFRESH_ON_CREATE = 0;
     public static final int REFRESH_ON_RESUME = 1;
     public static final int REFRESH_ON_YOURSELF = -1;
+
     /**
      * 在哪里初始化数据:0 onViewCreated后, 1 onResume后, -1 不初始化
+     *
      * @return
      */
     public int refreshDataType() {
         return REFRESH_ON_CREATE;
     }
-    public void clear(){
+
+    public void clear() {
         lastMessage = null;
         setNoMore(false);
-        if(empty_view != null)
+        if (empty_view != null)
             empty_view.setVisibility(View.INVISIBLE);
         list.clear();
         page = 1;
     }
+
     //通过刷新来重新加载数据
-    public void refreshData(){
+    public void refreshData() {
         clear();
-        if(view_list != null)
+        if (view_list != null)
             view_list.getAdapter().notifyDataSetChanged();
         initData();
     }
+
     protected List<T> newList;
 
-    protected void loadList(List<T> addList){
+    protected void loadList(List<T> addList) {
         ListUtil.addAllItem(list, addList);
         newList = addList;
         notifyDataSetChanged();
     }
+
     //刷新数据
-    public void notifyDataSetChanged(){
-        if(view_list == null || empty_view == null){
+    public void notifyDataSetChanged() {
+        if (view_list == null || empty_view == null) {
             return;
         }
         updateEmptyView();
         view_list.getAdapter().notifyDataSetChanged();
         refreshOrLoadMoreComplete();
-        resetViewPagerHeight();
-    }
-    //重新设置ViewPager的高度
-    protected void resetViewPagerHeight() {
-        if(viewPager != null && getUserVisibleHint()){
-            int count = ListUtil.size(list);
-            ViewGroup.LayoutParams params = viewPager.getLayoutParams();
-            params.height = count == 0 ? G.HEIGHT / 2 : (count * getItemHeight());
-            viewPager.setLayoutParams(params);
-        }
     }
 
     @Override
     public void setUserVisibleHint(boolean isVisibleToUser) {
         super.setUserVisibleHint(isVisibleToUser);
-        resetViewPagerHeight();
-        if(smartRefreshLayout != null && getUserVisibleHint()) {
+        if (smartRefreshLayout != null && getUserVisibleHint()) {
             smartRefreshLayout.setNoMoreData(noMore);
         }
     }
-    protected abstract int getItemHeight();
 
     //是否显示无数据占位图
-    protected void updateEmptyView(){
+    protected void updateEmptyView() {
         CommonUtil.getInstance().updateEmptyView(empty_view, list.isEmpty());
     }
 
     protected boolean noMore = false;
+
     public boolean isNoMore() {
         return noMore;
     }
+
     protected abstract RecyclerView.Adapter getAdapter();
+
     protected abstract String getKey(int page, int per_page);
+
     protected abstract Observable<BaseMessage> getApi(ApiService apiService);
+
     protected abstract Class<T> getTClass();
 
 
-    protected ViewPager viewPager;
     protected SmartRefreshLayout smartRefreshLayout;
 
-    public ViewPager getViewPager() {
-        return viewPager;
-    }
-
-    public void setViewPager(ViewPager viewPager) {
-        this.viewPager = viewPager;
-    }
-
     public SmartRefreshLayout getSmartRefreshLayout() {
         return smartRefreshLayout;
     }

+ 199 - 0
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppComment.java

@@ -0,0 +1,199 @@
+package com.sheep.gamegroup.view.fragment;
+
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.RatingBar;
+import android.widget.TextView;
+
+import com.kfzs.appstore.utils.adapter.recyclerview.RecyclerViewAdapter;
+import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
+import com.sheep.gamegroup.model.api.ApiService;
+import com.sheep.gamegroup.model.entity.AppScoreDetail;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.GameApp;
+import com.sheep.gamegroup.model.entity.UserComment;
+import com.sheep.gamegroup.model.entity.GameAppScore;
+import com.sheep.gamegroup.model.entity.GameEntity;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.ApiJSONUtil;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.AdpGcGameAppComment;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import java.text.DecimalFormat;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Locale;
+
+import cn.modificator.waterwave_progress.WaterWaveProgress;
+import rx.Observable;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by realicing on 2018/11/1.
+ * realicing@sina.com
+ * 玩转游戏 评价
+ */
+public class FgtGcGameAppComment extends BaseListFragment3<UserComment> {
+
+
+    public static FgtGcGameAppComment newInstance(int appId) {
+        FgtGcGameAppComment fgt = new FgtGcGameAppComment();
+        fgt.app_id = appId;
+        return fgt;
+    }
+
+    private int app_id;
+
+    private List<GameAppScore> scoreList = ListUtil.emptyList();
+    //头部view
+    private View headerView;
+    private WaterWaveProgress circularProgressView;
+    private RatingBar header_gc_game_app_comment_score;
+    private RecyclerView header_gc_game_app_comment_xin_list;
+
+    @Override
+    protected RecyclerView.Adapter getAdapter() {
+        //评论列表
+        AdpGcGameAppComment adapter = new AdpGcGameAppComment(list);
+        headerView = LayoutInflater.from(SheepApp.getInstance()).inflate(R.layout.header_gc_game_app_comment, null);
+        circularProgressView = headerView.findViewById(R.id.header_gc_game_app_comment_score_progress);
+        header_gc_game_app_comment_score = headerView.findViewById(R.id.header_gc_game_app_comment_score);
+
+        //评分列表
+        resetGameAppScoreNum();
+        header_gc_game_app_comment_xin_list = headerView.findViewById(R.id.header_gc_game_app_comment_xin_list);
+        header_gc_game_app_comment_xin_list.setHasFixedSize(true);
+        header_gc_game_app_comment_xin_list.setNestedScrollingEnabled(false);
+        header_gc_game_app_comment_xin_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        header_gc_game_app_comment_xin_list.setAdapter(new RecyclerViewAdapter<GameAppScore>(SheepApp.getInstance(), R.layout.item_xin_progress, scoreList) {
+            @Override
+            public void convert(ViewHolder viewHolder, GameAppScore item, int position) {
+                TextView item_xin_progress_tv = viewHolder.itemView.findViewById(R.id.item_xin_progress_tv);
+                ProgressBar item_xin_progress = viewHolder.itemView.findViewById(R.id.item_xin_progress);
+                ViewUtil.setText(item_xin_progress_tv, item.getStar());
+                item_xin_progress.setProgress(item.getNum());
+                item_xin_progress.setMax(item.getMax());
+            }
+        });
+        adapter.addHeaderView(headerView);
+        initAppScoreNum();
+        return adapter;
+    }
+
+    @Override
+    protected String getKey(int page, int per_page) {
+        return String.format(Locale.CHINA, "app/game_user/app_comment_list?page_no=%d&page_size=%d&app_id=%d", page, per_page, app_id);
+    }
+
+    @Override
+    protected Observable<BaseMessage> getApi(ApiService apiService) {
+        return apiService.getGameUserAppCommentList(page, per_page, app_id, ApiJSONUtil.COMMENT_TYPE_GAME);
+    }
+
+    @Override
+    protected Class<UserComment> getTClass() {
+        return UserComment.class;
+    }
+
+    //不会用到了,因为评分系统重新做了一套,以前的没用了
+    public void loadData(GameEntity gameEntity) {
+        GameApp gameApp;
+        if ((gameApp = gameEntity.getApp()) != null) {
+            updateScore(gameApp.getScore());
+        }
+    }
+
+    //更新评分
+    public void updateScore(float score) {
+        int progress = (int) score;
+        //显示评分
+        if (circularProgressView != null) {
+            circularProgressView.setMaxProgress(10);
+            circularProgressView.setProgress(progress);
+            circularProgressView.setText(new DecimalFormat("0.0").format(score));
+        }
+        if (header_gc_game_app_comment_score != null) {
+            header_gc_game_app_comment_score.setMax(10);
+            header_gc_game_app_comment_score.setProgress(progress);
+        }
+    }
+
+    //评分排序方法
+    private Comparator<GameAppScore> scoreComparable = new Comparator<GameAppScore>() {
+        @Override
+        public int compare(GameAppScore item1, GameAppScore item2) {
+            return item2.getStar() - item1.getStar();
+        }
+    };
+
+    //加载评分列表
+    private void initAppScoreNum() {
+        scoreList.clear();
+        notifyHeaderDataSetChanged();
+        SheepApp.getInstance().getNetComponent().getApiService().getGameUserAppScoreDetail(app_id)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        scoreList.clear();
+                        AppScoreDetail appScoreDetail = baseMessage.getData(AppScoreDetail.class);
+                        if (appScoreDetail != null) {
+                            updateScore(appScoreDetail.getScore());
+                            List<GameAppScore> newScoreList = appScoreDetail.toGameAppScoreList();
+                            if (ListUtil.isEmpty(newScoreList))
+                                resetGameAppScoreNum();
+                            else {
+                                scoreList.addAll(newScoreList);
+                                Collections.sort(scoreList, scoreComparable);
+                            }
+                        }
+                        notifyHeaderDataSetChanged();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        resetGameAppScoreNum();
+                        notifyHeaderDataSetChanged();
+                    }
+                });
+    }
+
+    //刷新头部view
+    private void notifyHeaderDataSetChanged() {
+        if (header_gc_game_app_comment_xin_list != null)
+            header_gc_game_app_comment_xin_list.getAdapter().notifyDataSetChanged();
+
+        if (empty_view != null) {
+            empty_view.postDelayed(new Runnable() {
+                @Override
+                public void run() {
+                    if (headerView != null) {
+                        int height = headerView.getHeight();
+                        CommonUtil.getInstance().setEmptyViewMargin(empty_view, (int) (height * 0.9), (int) (height * 0.3));
+                    }
+                }
+            }, 100L);
+        }
+    }
+
+    //重置评分列表
+    private void resetGameAppScoreNum() {
+        for (int i = 0; i < 5; i++) {//5星满分
+            GameAppScore item = new GameAppScore();
+            item.setNum(0);
+            item.setStar(5 - i);
+            scoreList.add(item);
+        }
+    }
+
+}

+ 8 - 30
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppDetail.java

@@ -16,6 +16,7 @@ import com.sheep.gamegroup.model.entity.Entry;
 import com.sheep.gamegroup.model.entity.GameApp;
 import com.sheep.gamegroup.model.entity.GameEntity;
 import com.sheep.gamegroup.model.entity.GameInfoList;
+import com.sheep.gamegroup.model.entity.ShowAll;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.ListUtil;
@@ -49,8 +50,10 @@ public class FgtGcGameAppDetail extends BaseFragment {
 
     private Activity activity;
 
-    public static FgtGcGameAppDetail newInstance() {
-        return new FgtGcGameAppDetail();
+    public static FgtGcGameAppDetail newInstance(int appId) {
+        FgtGcGameAppDetail fgt = new FgtGcGameAppDetail();
+        fgt.appId = appId;
+        return fgt;
     }
 
     @Override
@@ -90,31 +93,10 @@ public class FgtGcGameAppDetail extends BaseFragment {
         }
         String intro = gameApp.getIntro();
         if (!TextUtils.isEmpty(intro)) {
-            gameInfoListArrayList.add(new GameInfoList("游戏介绍", new RecyclerViewAdapter<String>(SheepApp.getInstance(), R.layout.item_gc_game_app_intro, ListUtil.asList(intro)) {
+            gameInfoListArrayList.add(new GameInfoList("游戏介绍", new RecyclerViewAdapter<ShowAll>(SheepApp.getInstance(), R.layout.item_gc_game_app_intro, ListUtil.asList(new ShowAll(intro))) {
                 @Override
-                public void convert(ViewHolder viewHolder, String text, int position) {
-                    final TextView item_gc_game_app_intro_tv = viewHolder.itemView.findViewById(R.id.item_gc_game_app_intro_tv);
-                    final TextView item_gc_game_app_intro_show_all = viewHolder.itemView.findViewById(R.id.item_gc_game_app_intro_show_all);
-                    final View item_gc_game_app_intro_show_all_no = viewHolder.itemView.findViewById(R.id.item_gc_game_app_intro_show_all_no);
-                    TextViewUtil.listenEllipsizeChange(item_gc_game_app_intro_tv, new Action1<Integer>() {
-                        @Override
-                        public void call(Integer integer) {
-                            if (integer > 0) {
-                                ViewUtil.setVisibility(item_gc_game_app_intro_show_all, true);
-                                ViewUtil.setVisibility(item_gc_game_app_intro_show_all_no, false);
-                            }
-                        }
-                    });
-                    item_gc_game_app_intro_show_all.setOnClickListener(new View.OnClickListener() {
-                        @Override
-                        public void onClick(View view) {
-                            boolean canShowAll = item_gc_game_app_intro_tv.getMaxLines() == 3;
-                            item_gc_game_app_intro_tv.setMaxLines(canShowAll ? Integer.MAX_VALUE : 3);
-                            item_gc_game_app_intro_tv.setEllipsize(canShowAll ? null : TextUtils.TruncateAt.END);
-                            item_gc_game_app_intro_show_all.setText(canShowAll ? "显示全部" : "收起");
-                        }
-                    });
-                    ViewUtil.setText(item_gc_game_app_intro_tv, text);
+                public void convert(ViewHolder viewHolder, ShowAll showAll, int position) {
+                    TextViewUtil.initIntroView(viewHolder.itemView, showAll);
                 }
             }));
         }
@@ -201,9 +183,5 @@ public class FgtGcGameAppDetail extends BaseFragment {
 
     private int appId;
 
-    public void setAppId(int appId) {
-        this.appId = appId;
-    }
-
 
 }

+ 41 - 0
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppWelfare.java

@@ -0,0 +1,41 @@
+package com.sheep.gamegroup.view.fragment;
+
+import android.app.Activity;
+
+import com.sheep.gamegroup.model.entity.GameEntity;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.base.BaseFragment;
+
+/**
+ * Created by realicing on 2018/11/1.
+ * realicing@sina.com
+ * 玩转游戏 福利
+ */
+public class FgtGcGameAppWelfare extends BaseFragment {
+
+    private Activity activity;
+
+    public static FgtGcGameAppWelfare newInstance(int appId) {
+        FgtGcGameAppWelfare fgt = new FgtGcGameAppWelfare();
+        fgt.appId = appId;
+        return fgt;
+    }
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.fgt_gc_game_app_detail;
+    }
+
+
+    @Override
+    public void onViewCreated() {
+        activity = getActivity();
+    }
+
+
+    private int appId;
+
+
+    public void loadData(GameEntity gameEntity) {
+    }
+}

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtSmallSheep.java

@@ -794,7 +794,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
                 refreshData();
             }
         });
-        RefreshUtil.newInstance().publicParameterRefresh(refresh, activity);
+        RefreshUtil.newInstance().publicParameterLoadMore(refresh, activity);
     }
 
     private void notifyDataSetChanged() {

+ 23 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/utils/TitleBarUtils.java

@@ -14,6 +14,8 @@ import android.widget.ImageButton;
 import android.widget.ImageView;
 import android.widget.TextView;
 
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.activity.ActCommentGameApp;
 import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.jiuyan.samllsheep.R;
@@ -520,4 +522,25 @@ public class TitleBarUtils {
         });
         return this;
     }
+
+    /**
+     * 设置最后的textView的文本,颜色与点击事件
+     * @param activity
+     * @param text 要显示的文本
+     * @param color 要显示的颜色
+     * @param onClickListener 点击事件
+     * @return
+     */
+    public TitleBarUtils setEndTv(Activity activity, String text, int color, View.OnClickListener onClickListener) {
+        TextView textView = activity.findViewById(R.id.title_end_tv);
+        if(textView != null) {
+            textView.setVisibility(View.VISIBLE);
+            ViewUtil.setText(textView, text);
+            if (color > 0)
+                textView.setTextColor(color);
+            if (onClickListener != null)
+                textView.setOnClickListener(onClickListener);
+        }
+        return this;
+    }
 }

app/src/main/res/drawable-xhdpi/Bulletwindow.webp → app/src/main/res/drawable-xhdpi/bulletwindow.webp


app/src/main/res/drawable-xxhdpi/Bulletwindow.webp → app/src/main/res/drawable-xxhdpi/bulletwindow.webp


app/src/main/res/drawable-xxxhdpi/Bulletwindow.webp → app/src/main/res/drawable-xxxhdpi/bulletwindow.webp


+ 41 - 0
app/src/main/res/drawable/lay_list_progress_yellow.xml

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:id="@android:id/background">
+        <shape>
+            <corners android:radius="5dip" />
+            <stroke
+                android:width="1dp"
+                android:color="#F4F4F4"/>
+        </shape>
+    </item>
+
+    <item android:id="@android:id/secondaryProgress">
+        <clip>
+            <shape>
+                <corners android:radius="5dip" />
+                <gradient
+                    android:angle="270"
+                    android:centerColor="#8000ae7c"
+                    android:centerY="0.75"
+                    android:endColor="#a000be7c"
+                    android:startColor="#8000ce7c" />
+            </shape>
+        </clip>
+    </item>
+
+    <item android:id="@android:id/progress">
+        <clip>
+            <shape>
+                <corners android:radius="5dip" />
+                <gradient
+                    android:angle="270"
+                    android:centerColor="#FFCC33"
+                    android:centerY="0.75"
+                    android:endColor="#FDB811"
+                    android:startColor="#FCD586" />
+            </shape>
+        </clip>
+    </item>
+
+</layer-list>

+ 94 - 0
app/src/main/res/layout/act_comment_game_app.xml

@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white"
+    android:orientation="vertical"
+    tools:context="com.sheep.gamegroup.view.activity.ActCommentGameApp">
+
+    <include layout="@layout/title" />
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="50dp">
+
+        <TextView
+            android:id="@+id/act_comment_game_app_score_start"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:paddingStart="16dp"
+            android:paddingEnd="13dp"
+            android:text="请打分"
+            android:textColor="#ff666666"
+            android:textSize="13sp" />
+
+        <android.support.v7.widget.AppCompatRatingBar
+            android:id="@+id/act_comment_game_app_score"
+            style="@style/style_rating_bar"
+            android:layout_width="wrap_content"
+            android:layout_centerVertical="true"
+            android:layout_toEndOf="@id/act_comment_game_app_score_start"
+            android:isIndicator="true"
+            android:numStars="5"
+            android:rating="0"
+            android:stepSize="0.5" />
+
+        <ImageView
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:layout_alignParentEnd="true"
+            android:layout_marginEnd="2dp"
+            android:onClick="onClickXScore"
+            android:padding="20dp"
+            android:scaleType="fitCenter"
+            android:src="@mipmap/x" />
+    </RelativeLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginStart="16dp"
+        android:layout_marginEnd="16dp"
+        android:background="#fff5f5f5" />
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <android.support.v7.widget.AppCompatEditText
+            android:id="@+id/act_comment_game_app_input_comment"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@null"
+            android:hint="写下您的看法"
+            android:lineSpacingMultiplier="1.3"
+            android:paddingStart="16dp"
+            android:paddingTop="20dp"
+            android:paddingEnd="16dp"
+            android:paddingBottom="20dp"
+            android:textColor="#333333"
+            android:textColorHint="#ffcccccc"
+            android:textSize="13sp" />
+
+        <ImageView
+            android:layout_width="50dp"
+            android:layout_height="wrap_content"
+            android:layout_alignBottom="@id/act_comment_game_app_input_comment"
+            android:layout_alignParentEnd="true"
+            android:layout_marginEnd="2dp"
+            android:onClick="onClickXInput"
+            android:padding="20dp"
+            android:scaleType="fitCenter"
+            android:src="@mipmap/x" />
+    </RelativeLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginStart="16dp"
+        android:layout_marginEnd="16dp"
+        android:background="#fff5f5f5" />
+
+</LinearLayout>

+ 84 - 0
app/src/main/res/layout/header_gc_game_app_comment.xml

@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+
+    <TextView
+        android:id="@+id/header_gc_game_app_comment_title_score"
+        style="@style/style_wc_line_title"
+        android:layout_marginStart="15dp"
+        android:layout_marginTop="18dp"
+        android:text="游戏评分"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/header_gc_game_app_comment_xin_list"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="4dp"
+        android:layout_marginEnd="27dp"
+        android:minHeight="70dp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/header_gc_game_app_comment_title_score" />
+
+    <LinearLayout
+        android:id="@+id/header_gc_game_app_comment_score_progress_ll"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="33dp"
+        android:gravity="center_horizontal"
+        android:orientation="vertical"
+        app:layout_constraintBottom_toBottomOf="@id/header_gc_game_app_comment_xin_list"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="@id/header_gc_game_app_comment_xin_list">
+
+        <cn.modificator.waterwave_progress.WaterWaveProgress
+            android:id="@+id/header_gc_game_app_comment_score_progress"
+            android:layout_width="57dp"
+            android:layout_height="57dp"
+            app:fontSize="18sp"
+            app:maxProgress="100"
+            app:progress="15"
+            app:progressBgColor="#F5F5F5"
+            app:progressColor="#FFBF00"
+            app:progressWidth="5dp"
+            app:showNumerical="true"
+            app:showProgress="true"
+            app:textColor="#FFBF00"
+            app:waterWaveBgColor="#ffffff"
+            app:waterWaveColor="#ffffff" />
+
+        <android.support.v7.widget.AppCompatRatingBar
+            android:id="@+id/header_gc_game_app_comment_score"
+            style="@style/style_rating_bar"
+            android:layout_width="wrap_content"
+            android:layout_marginTop="4dp"
+            android:isIndicator="true"
+            android:numStars="5"
+            android:rating="0"
+            android:stepSize="0.5" />
+
+    </LinearLayout>
+
+
+    <View
+        android:id="@+id/header_gc_game_app_comment_line"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginStart="25dp"
+        android:layout_marginTop="21dp"
+        android:layout_marginEnd="25dp"
+        android:background="#fff2f2f2"
+        app:layout_constraintTop_toBottomOf="@id/header_gc_game_app_comment_xin_list" />
+
+    <TextView
+        android:id="@+id/header_gc_game_app_comment_title_comment"
+        style="@style/style_wc_line_title"
+        android:layout_marginTop="21dp"
+        android:text="用户评价"
+        app:layout_constraintStart_toStartOf="@id/header_gc_game_app_comment_title_score"
+        app:layout_constraintTop_toBottomOf="@id/header_gc_game_app_comment_line" />
+</android.support.constraint.ConstraintLayout>

+ 130 - 0
app/src/main/res/layout/item_gc_game_app_comment.xml

@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <View
+        android:id="@+id/game_app_comment_line_top"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginStart="25dp"
+        android:layout_marginEnd="25dp"
+        android:background="#fff2f2f2"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/game_app_comment_user_avatar"
+        android:layout_width="40dp"
+        android:layout_height="40dp"
+        android:layout_marginStart="16dp"
+        android:layout_marginTop="20dp"
+        android:src="@drawable/icon"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="@id/game_app_comment_line_top" />
+
+    <TextView
+        android:id="@+id/game_app_comment_user_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="16dp"
+        android:layout_marginEnd="16dp"
+        android:text="栗子的菜"
+        android:textColor="#ff333333"
+        android:textSize="13sp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/game_app_comment_user_avatar"
+        app:layout_constraintTop_toTopOf="@id/game_app_comment_user_avatar" />
+
+    <android.support.v7.widget.AppCompatRatingBar
+        android:id="@+id/game_app_comment_score"
+        style="@style/style_rating_bar"
+        android:layout_width="wrap_content"
+        android:isIndicator="true"
+        android:numStars="5"
+        android:rating="0"
+        android:stepSize="0.5"
+        app:layout_constraintBottom_toBottomOf="@+id/game_app_comment_user_avatar"
+        app:layout_constraintStart_toStartOf="@id/game_app_comment_user_name" />
+
+    <TextView
+        android:id="@+id/intro_content"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:ellipsize="end"
+        android:lineSpacingMultiplier="1.3"
+        android:maxLines="3"
+        android:paddingStart="16dp"
+        android:paddingTop="13dp"
+        android:paddingEnd="16dp"
+        android:paddingBottom="10dp"
+        android:text="《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。"
+        android:textColor="#ff666666"
+        android:textSize="12sp"
+        app:layout_constraintTop_toBottomOf="@id/game_app_comment_user_avatar" />
+
+    <TextView
+        android:id="@+id/intro_show_all"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:padding="6dp"
+        android:text="显示全部"
+        android:textColor="#ff4bc1ff"
+        android:textSize="12sp"
+        android:visibility="gone"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/intro_content" />
+
+    <TextView
+        android:id="@+id/game_app_comment_num1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:paddingTop="14dp"
+        android:paddingBottom="14dp"
+        android:paddingStart="8dp"
+        android:paddingEnd="8dp"
+        android:layout_marginEnd="10dp"
+        android:layout_marginBottom="6dp"
+        android:drawableStart="@drawable/ic_but_speak"
+        android:drawablePadding="6dp"
+        android:text="54"
+        android:textColor="#ff666666"
+        android:textSize="11sp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/intro_show_all" />
+
+    <TextView
+        android:id="@+id/game_app_comment_num2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:paddingTop="14dp"
+        android:paddingBottom="14dp"
+        android:paddingStart="8dp"
+        android:paddingEnd="8dp"
+        android:drawableStart="@drawable/ic_but_up"
+        android:drawablePadding="6dp"
+        android:text="54"
+        android:textColor="#ff666666"
+        android:textSize="11sp"
+        app:layout_constraintEnd_toStartOf="@id/game_app_comment_num1"
+        app:layout_constraintTop_toTopOf="@id/game_app_comment_num1" />
+
+    <TextView
+        android:id="@+id/game_app_comment_num3"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:paddingTop="14dp"
+        android:paddingBottom="14dp"
+        android:paddingStart="8dp"
+        android:paddingEnd="8dp"
+        android:drawableStart="@drawable/ic_image_xiao"
+        android:drawablePadding="6dp"
+        android:text="54"
+        android:textColor="#ff666666"
+        android:textSize="11sp"
+        app:layout_constraintEnd_toStartOf="@id/game_app_comment_num2"
+        app:layout_constraintTop_toTopOf="@id/game_app_comment_num1" />
+
+</android.support.constraint.ConstraintLayout>

+ 4 - 4
app/src/main/res/layout/item_gc_game_app_intro.xml

@@ -7,7 +7,7 @@
     android:paddingBottom="7dp">
 
     <TextView
-        android:id="@+id/item_gc_game_app_intro_tv"
+        android:id="@+id/intro_content"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:ellipsize="end"
@@ -20,7 +20,7 @@
         android:textSize="12sp" />
 
     <TextView
-        android:id="@+id/item_gc_game_app_intro_show_all"
+        android:id="@+id/intro_show_all"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:padding="13dp"
@@ -29,9 +29,9 @@
         android:visibility="gone"
         android:textColor="#ff4bc1ff"
         android:textSize="12sp" />
-    <!--item_gc_game_app_intro_no_show_all 与 item_gc_game_app_intro_show_all两者必须显示一个,隐藏另一个-->
+    <!--item_gc_game_app_intro_no_show_all 与 intro_show_all两者必须显示一个,隐藏另一个-->
     <View
-        android:id="@+id/item_gc_game_app_intro_show_all_no"
+        android:id="@+id/intro_show_all_no"
         android:layout_width="wrap_content"
         android:layout_height="13dp"/>
 </LinearLayout>

+ 34 - 0
app/src/main/res/layout/item_xin_progress.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:gravity="center_vertical"
+    android:orientation="horizontal"
+    android:paddingTop="5dp"
+    android:paddingBottom="5dp">
+
+    <TextView
+        android:id="@+id/item_xin_progress_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="1"
+        android:textColor="@color/black_6_3"
+        android:textSize="13sp" />
+
+    <ImageView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="6dp"
+        android:src="@drawable/xin_full" />
+
+    <ProgressBar
+        android:id="@+id/item_xin_progress"
+        style="?android:attr/progressBarStyleHorizontal"
+        android:layout_width="152dp"
+        android:layout_height="10dp"
+        android:layout_marginStart="5dp"
+        android:max="100"
+        android:progress="50"
+        android:progressDrawable="@drawable/lay_list_progress_yellow" />
+
+</LinearLayout>

+ 30 - 48
app/src/main/res/layout/title.xml

@@ -13,7 +13,7 @@
         android:gravity="center_vertical"
         android:minWidth="?attr/actionBarSize"
         android:scaleType="centerInside"
-        android:src="@drawable/narrow_back_black"/>
+        android:src="@drawable/narrow_back_black" />
 
     <android.support.design.widget.TabLayout
         android:id="@+id/title_tab"
@@ -21,9 +21,10 @@
         android:layout_width="wrap_content"
         android:layout_centerInParent="true"
         android:minWidth="100dp"
-        android:visibility="gone"
-        />
-    <include layout="@layout/include_title_tab"/>
+        android:visibility="gone" />
+
+    <include layout="@layout/include_title_tab" />
+
     <TextView
         android:id="@+id/txt_baseactivity_title"
         android:layout_width="wrap_content"
@@ -31,12 +32,12 @@
         android:layout_centerInParent="true"
         android:layout_marginStart="?attr/actionBarSize"
         android:layout_marginEnd="?attr/actionBarSize"
-        android:singleLine="true"
-        android:gravity="start"
         android:ellipsize="end"
+        android:gravity="start"
+        android:singleLine="true"
         android:text="@string/app_name"
         android:textColor="@color/black_text_deep"
-        android:textSize="18sp"/>
+        android:textSize="18sp" />
 
     <!--右边按钮-->
 
@@ -52,23 +53,23 @@
             style="?android:attr/borderlessButtonStyle"
             android:layout_width="wrap_content"
             android:layout_height="@dimen/app_nav_toolbar_height"
-            android:paddingEnd="17dp"
-            android:paddingStart="17dp"
+            android:layout_alignParentTop="true"
+            android:layout_alignParentEnd="true"
             android:background="@color/translate"
             android:gravity="center_vertical|end"
             android:lines="1"
+            android:paddingStart="17dp"
+            android:paddingEnd="17dp"
             android:textColor="@color/black_text_deep"
-            android:textSize="12sp"
-            android:layout_alignParentTop="true"
-            android:layout_alignParentEnd="true" />
+            android:textSize="12sp" />
 
         <ImageView
             android:id="@+id/img_download_manager_dots"
             android:layout_width="6dp"
             android:layout_height="6dp"
             android:layout_alignParentRight="true"
-            android:layout_marginRight="10dp"
             android:layout_marginTop="10dp"
+            android:layout_marginRight="10dp"
             android:src="@drawable/sp_dot_red"
             android:visibility="gone" />
     </RelativeLayout>
@@ -82,55 +83,36 @@
         android:background="@color/translate"
         android:gravity="center"
         android:minWidth="?attr/actionBarSize"
-        android:visibility="gone"/>
+        android:visibility="gone" />
+
     <ImageButton
         android:id="@+id/ibtn_two_right"
         android:layout_width="?attr/actionBarSize"
         android:layout_height="match_parent"
+        android:layout_alignParentEnd="true"
         android:layout_centerVertical="true"
+        android:layout_marginEnd="40dp"
         android:background="@color/translate"
         android:gravity="center"
         android:minWidth="?attr/actionBarSize"
-        android:layout_alignParentEnd="true"
-        android:layout_marginEnd="40dp"
-        android:visibility="gone"/>
+        android:visibility="gone" />
 
     <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentRight="true"
-        android:layout_centerVertical="true"
-        android:layout_marginRight="10dp"
-        android:gravity="center"
-        android:text="如何做任务?"
-        android:textColor="@color/sheep_red"
-        android:visibility="gone"/>
-
-    <LinearLayout
+        android:id="@+id/title_end_tv"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
-        android:layout_alignParentRight="true"
-        android:layout_centerVertical="true"
-        android:background="@color/translate"
+        android:layout_alignParentEnd="true"
         android:gravity="center"
-        android:minWidth="?attr/actionBarSize"
-        android:orientation="horizontal"
+        android:paddingStart="10dp"
+        android:paddingEnd="10dp"
+        android:text="发表"
         android:visibility="gone"
-        android:layout_marginRight="@dimen/content_padding">
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text=""
-            android:textSize="@dimen/text_size_4"
-            android:textColor="@android:color/black"
-            android:paddingRight="5dp"/>
-        <ImageView
-            android:layout_width="12dp"
-            android:layout_height="12dp"
-            android:src="@mipmap/triangle_popup_nomal"/>
-    </LinearLayout>
-    <include layout="@layout/title_bottom_line"
+        android:textColor="#ff2ebef2"
+        android:textSize="14sp" />
+
+    <include
+        layout="@layout/title_bottom_line"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"/>
+        android:layout_alignParentBottom="true" />
 </RelativeLayout>

+ 1 - 1
app/src/main/res/values/dd_styles.xml

@@ -412,7 +412,7 @@
         <item name="android:layout_width">wrap_content</item>
         <item name="android:layout_height">wrap_content</item>
         <item name="android:drawablePadding">@dimen/content_padding_default</item>
-        <item name="android:drawableStart">?line_short</item>
+        <item name="android:drawableStart">@drawable/sp_line_vertical</item>
         <item name="android:gravity">center_vertical</item>
         <item name="android:textColor">#2c2c2c</item>
         <item name="android:textSize">15sp</item>

+ 1 - 1
settings.gradle

@@ -1 +1 @@
-include ':app', ':view', ':ucrop'//, ':Aria', ':datashare', ':AriaAnnotations'
+include ':app', ':view', ':ucrop', ':WaterWaveProgress'//, ':Aria', ':datashare', ':AriaAnnotations'