Explorar o código

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

zengjiebin %!s(int64=7) %!d(string=hai) anos
pai
achega
f4a19b2b96
Modificáronse 38 ficheiros con 1788 adicións e 267 borrados
  1. 5 0
      app/build.gradle
  2. 14 1
      app/src/main/AndroidManifest.xml
  3. 3 0
      app/src/main/java/cn/finalteam/rxgalleryfinal/utils/MediaUtils.java
  4. 627 0
      app/src/main/java/com/sheep/gamegroup/find/activity/ActEditVideo.java
  5. 15 0
      app/src/main/java/com/sheep/gamegroup/find/activity/ActMediaChoose.java
  6. 182 0
      app/src/main/java/com/sheep/gamegroup/find/bean/ColorBalanceFilter.java
  7. 11 0
      app/src/main/java/com/sheep/gamegroup/find/bean/Filterble.java
  8. 11 0
      app/src/main/java/com/sheep/gamegroup/find/bean/IFilter.java
  9. 48 0
      app/src/main/java/com/sheep/gamegroup/find/bean/Size.java
  10. 106 0
      app/src/main/java/com/sheep/gamegroup/find/fragment/FgtChooseEditList.java
  11. 1 0
      app/src/main/java/com/sheep/gamegroup/find/fragment/FgtMediaPickerVideo.java
  12. 12 12
      app/src/main/java/com/sheep/gamegroup/greendao/download/DaoMaster.java
  13. 47 47
      app/src/main/java/com/sheep/gamegroup/greendao/download/DaoSession.java
  14. 1 1
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  15. 24 0
      app/src/main/java/com/sheep/gamegroup/util/BitmapUtil.java
  16. 32 0
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  17. 5 0
      app/src/main/java/com/sheep/gamegroup/util/DataUtil.java
  18. 1 1
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  19. 178 60
      app/src/main/java/com/sheep/gamegroup/util/TestUtil.java
  20. 31 0
      app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java
  21. 38 0
      app/src/main/java/com/sheep/gamegroup/util/glide/FilterTransform.java
  22. 16 0
      app/src/main/java/com/sheep/gamegroup/util/js/KFZSJs.java
  23. 9 0
      app/src/main/java/com/sheep/gamegroup/util/viewHelper/CacheImageUtil.java
  24. 6 4
      app/src/main/java/com/sheep/gamegroup/view/activity/ActCutVideo.java
  25. 0 38
      app/src/main/java/com/sheep/gamegroup/view/activity/ActEditVideo.java
  26. 13 10
      app/src/main/java/com/sheep/gamegroup/view/activity/ActPlayVideoArticle.java
  27. 1 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtArticleVideo.java
  28. 1 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtVideoComment.java
  29. 49 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java
  30. 3 0
      app/src/main/java/org/afinal/simplecache/ApiKey.java
  31. 9 0
      app/src/main/res/color/selector_color_white_40.xml
  32. 9 0
      app/src/main/res/drawable/shape_black_solid_rectangle_top_6.xml
  33. 5 0
      app/src/main/res/drawable/shape_oval_main.xml
  34. 100 1
      app/src/main/res/layout/act_cut_video.xml
  35. 67 90
      app/src/main/res/layout/act_edit_video.xml
  36. 80 0
      app/src/main/res/layout/fgt_choose_edit_list.xml
  37. 27 0
      app/src/main/res/layout/item_tv_iv.xml
  38. 1 0
      app/src/main/res/values/dd_colors.xml

+ 5 - 0
app/build.gradle

@@ -428,6 +428,11 @@ dependencies {
     implementation ('com.qiniu:qiniu-android-sdk:7.3.13') {
         exclude group: 'com.squareup.okhttp3', module: 'okhttp'
     }
+    //All arch: armeabi, armeabi-v7a, arm64-v8a, mips, x86
+    implementation 'org.wysaid:gpuimage-plus:2.5.1'
+    //Pure graphics lib without ffmpeg. (all arch for branch 'min')
+//    implementation 'org.wysaid:gpuimage-plus:2.5.1-min'
+//    implementation project(':library')
 }
 
 static def releaseTime() {

+ 14 - 1
app/src/main/AndroidManifest.xml

@@ -87,6 +87,19 @@
         android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
         tools:ignore="ProtectedPermissions" />
 
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.CAMERA"/>
+    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
+    <uses-permission android:name="android.permission.INTERNET"/>
+
+    <uses-feature android:name="android.hardware.camera"/>
+    <uses-feature android:name="android.hardware.camera.autofocus"/>
+
+    <permission
+        android:name="android.permission.FLASHLIGHT"
+        android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
+        android:protectionLevel="normal"/>
     <!-- 百度定位权限 end -->
     <application
         android:name=".SheepApp"
@@ -454,7 +467,7 @@
             android:screenOrientation="portrait"
             android:theme="@style/AppTheme.noTitleBar" />
         <activity
-            android:name="com.sheep.gamegroup.view.activity.ActEditVideo"
+            android:name="com.sheep.gamegroup.find.activity.ActEditVideo"
             android:configChanges="orientation|keyboardHidden|navigation|screenSize"
             android:screenOrientation="user"
             android:theme="@style/AppTheme.noTitleBar" />

+ 3 - 0
app/src/main/java/cn/finalteam/rxgalleryfinal/utils/MediaUtils.java

@@ -467,6 +467,9 @@ public class MediaUtils {
             Uri uri = SheepApp.getInstance().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues);
             captureIntent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
         }
+        if(!isImage){
+            captureIntent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 15000L);
+        }
         // video : 1: 高质量  0 低质量
         //        captureIntent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
         activity.startActivityForResult(captureIntent, isImage ? TAKE_IMAGE_REQUEST_CODE : TAKE_VIDEO_REQUEST_CODE);

+ 627 - 0
app/src/main/java/com/sheep/gamegroup/find/activity/ActEditVideo.java

@@ -0,0 +1,627 @@
+package com.sheep.gamegroup.find.activity;
+
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.media.MediaPlayer;
+import android.net.Uri;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.support.v7.widget.AppCompatButton;
+import android.util.Log;
+import android.view.View;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.widget.SeekBar;
+
+import com.kfzs.duanduan.utils.StatusBarUtils;
+import com.sheep.gamegroup.absBase.AbsObserver;
+import com.sheep.gamegroup.absBase.BaseContainerActivity;
+import com.sheep.gamegroup.find.bean.Filterble;
+import com.sheep.gamegroup.find.bean.IFilter;
+import com.sheep.gamegroup.find.bean.Size;
+import com.sheep.gamegroup.find.fragment.FgtChooseEditList;
+import com.sheep.gamegroup.model.entity.Video;
+import com.sheep.gamegroup.util.BitmapUtil;
+import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.util.LogUtil;
+import com.sheep.gamegroup.util.TestUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.util.viewHelper.CacheImageUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import org.greenrobot.eventbus.EventBus;
+import org.wysaid.common.Common;
+import org.wysaid.myUtils.ImageUtil;
+import org.wysaid.nativePort.CGEFFmpegNativeLibrary;
+import org.wysaid.nativePort.CGEFrameRenderer;
+import org.wysaid.nativePort.CGENativeLibrary;
+import org.wysaid.view.VideoPlayerGLSurfaceView;
+
+import java.io.File;
+import java.util.Locale;
+
+import butterknife.BindView;
+import io.reactivex.Observable;
+import io.reactivex.ObservableEmitter;
+import io.reactivex.ObservableOnSubscribe;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+import rx.functions.Action1;
+
+/**
+ * Created by realicing on 2018/11/9.
+ * realicing@sina.com
+ * 编辑视频
+ */
+public class ActEditVideo extends BaseContainerActivity implements Filterble {
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        StatusBarUtils.setTranslucent(this);
+        super.onCreate(savedInstanceState);
+    }
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.act_edit_video;
+    }
+
+    @BindView(R.id.videoGLSurfaceView)
+    VideoPlayerGLSurfaceView mPlayerView;
+
+    private Video data;
+
+    private String mCurrentConfig;
+    private float mIntensity = 1.0f;
+
+    public static final int REQUEST_CODE_PICK_VIDEO = 1;
+
+    private VideoPlayerGLSurfaceView.PlayCompletionCallback playCompletionCallback = new VideoPlayerGLSurfaceView.PlayCompletionCallback() {
+        @Override
+        public void playComplete(MediaPlayer player) {
+            Log.i(Common.LOG_TAG, "The video playing is over, restart...");
+            player.start();
+        }
+
+        @Override
+        public boolean playFailed(MediaPlayer player, final int what, final int extra) {
+            if (TestUtil.isDev())
+                G.showToast(String.format(Locale.CHINA, "播放出错!错误码: %d, %d", what, extra));
+            else
+                G.showToast("播放出错,请稍候重试");
+            return true;
+        }
+    };
+
+    @Override
+    public void initView() {
+        if (this instanceof BaseContainerActivity) {
+            super.initView();
+        }
+        data = DataUtil.getObject(getIntent(), Video.class);
+        mPlayerView.setZOrderOnTop(false);
+        mPlayerView.setZOrderMediaOverlay(true);
+
+
+        mPlayerView.setPlayerInitializeCallback(new VideoPlayerGLSurfaceView.PlayerInitializeCallback() {
+            @Override
+            public void initPlayer(final MediaPlayer player) {
+                //针对网络视频进行进度检查
+                player.setOnBufferingUpdateListener(new MediaPlayer.OnBufferingUpdateListener() {
+                    @Override
+                    public void onBufferingUpdate(MediaPlayer mp, int percent) {
+                        Log.i(Common.LOG_TAG, "Buffer update: " + percent);
+                        if (percent == 100) {
+                            Log.i(Common.LOG_TAG, "缓冲完毕!");
+                            player.setOnBufferingUpdateListener(null);
+                        }
+                    }
+                });
+            }
+        });
+
+        mPlayerView.setVideoUri(Uri.parse(data.getFilePath()), new VideoPlayerGLSurfaceView.PlayPreparedCallback() {
+            @Override
+            public void playPrepared(MediaPlayer player) {
+                Log.i(Common.LOG_TAG, "The video is prepared to play");
+                player.start();
+            }
+        }, playCompletionCallback);
+
+        LinearLayout menuLayout = findViewById(R.id.menuLinearLayout);
+        if (ViewUtil.isVisible(menuLayout)) {
+            loadTest(menuLayout);
+        }
+    }
+
+    //点击完成
+    public void onClickCommit(View view) {
+        showProgress(false);
+        CacheImageUtil.cacheAndLoadImg(ViewUtil.getNetImgByName("sheep_logo_3"), new Action1<File>() {
+            @Override
+            public void call(final File file) {
+                Observable.create(new ObservableOnSubscribe<String>() {
+                    @Override
+                    public void subscribe(ObservableEmitter<String> emitter) throws Exception {
+                        String srcFilPath = data.getFilePath();
+                        String outputFilename = String.format(Locale.CHINA, "%s_%d_%f.mp4", srcFilPath.substring(0, srcFilPath.lastIndexOf(".")), mCurrentConfig.hashCode(), mIntensity);
+                        Bitmap bmp = BitmapFactory.decodeFile(file.getAbsolutePath());
+                        //left 30px top 60px width 750
+                        Bitmap logo = BitmapUtil.createBigLogo(bmp, new Size().setWidth(G.WIDTH).setHeight(G.HEIGHT).setX(G.WIDTH * 30 / 750).setY(G.WIDTH * 60 / 750));
+                        bmp.recycle();
+                        CGEFFmpegNativeLibrary.generateVideoWithFilter(outputFilename, srcFilPath, mCurrentConfig, mIntensity, logo, CGENativeLibrary.TextureBlendMode.CGE_BLEND_ADDREV, 1.0f, false);
+
+                        LogUtil.println(ActEditVideo.class.getSimpleName(), "Done! The file is generated at: " + outputFilename);
+                        emitter.onNext(outputFilename);
+                    }
+                }).subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new AbsObserver<String>() {
+                            @Override
+                            public void onNext(String filePath) {
+                                sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.parse("file://" + filePath)));
+                                data.setFilePath(filePath);
+                                EventBus.getDefault().post(data);
+                                ActEditVideo.this.finish();
+                            }
+
+                            @Override
+                            public void onError(Throwable e) {
+                                G.showToast(e.getMessage());
+                            }
+
+                            @Override
+                            public void onComplete() {
+                                hideProgress();
+                            }
+                        });
+            }
+        });
+    }
+
+    //设置滤镜
+    @Override
+    public void setFilter(IFilter filter) {
+        if (mPlayerView != null && filter != null && filter.getConfig() != null) {
+            mCurrentConfig = filter.getConfig();
+            mPlayerView.setFilterWithConfig(mCurrentConfig);
+        }
+    }
+
+    @Override
+    public void setFilterIntensity(float intensity) {
+        if (mPlayerView != null) {
+            mIntensity = intensity;
+            mPlayerView.setFilterIntensity(mIntensity);
+        }
+    }
+
+    //下面为测试代码
+
+    private void loadTest(LinearLayout menuLayout) {
+
+        mShapeBtn = findViewById(R.id.switchShapeBtn);
+
+        mShapeBtn.setOnClickListener(new View.OnClickListener() {
+
+            private boolean useMask = false;
+            Bitmap bmp;
+
+            @Override
+            public void onClick(View v) {
+                useMask = !useMask;
+                if (useMask) {
+                    if (bmp == null)
+                        bmp = BitmapFactory.decodeResource(getResources(), R.drawable.icon);
+
+                    if (bmp != null) {
+                        mPlayerView.setMaskBitmap(bmp, false, new VideoPlayerGLSurfaceView.SetMaskBitmapCallback() {
+                            @Override
+                            public void setMaskOK(CGEFrameRenderer renderer) {
+//                                if(mPlayerView.isUsingMask()) {
+//                                    renderer.setMaskFlipScale(1.0f, -1.0f);
+//                                }
+                                Log.i(Common.LOG_TAG, "enable mask!");
+                            }
+                        });
+                    }
+                } else {
+                    mPlayerView.setMaskBitmap(null, false);
+                }
+
+            }
+        });
+
+        mTakeshotBtn = findViewById(R.id.takeShotBtn);
+
+        mTakeshotBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                mPlayerView.takeShot(new VideoPlayerGLSurfaceView.TakeShotCallback() {
+                    @Override
+                    public void takeShotOK(Bitmap bmp) {
+                        if (bmp != null) {
+                            String s = ImageUtil.saveBitmap(bmp);
+                            ActEditVideo.this.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.parse("file://" + s)));
+                        } else {
+                            Log.e(Common.LOG_TAG, "take shot failed!");
+                        }
+                    }
+                });
+            }
+        });
+
+
+        {
+            Button btn = new Button(this);
+            menuLayout.addView(btn);
+            btn.setAllCaps(false);
+            btn.setText("Last Recorded Video");
+            btn.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+
+                    Uri lastVideoUri = Uri.parse(data.getFilePath());
+                    mPlayerView.setVideoUri(lastVideoUri, new VideoPlayerGLSurfaceView.PlayPreparedCallback() {
+                        @Override
+                        public void playPrepared(MediaPlayer player) {
+                            Log.i(Common.LOG_TAG, "The video is prepared to play");
+                            player.start();
+                        }
+                    }, playCompletionCallback);
+                }
+            });
+        }
+
+        String[] filePaths = {
+                data.getFilePath(),
+                "http://wge.wysaid.org/res/video/1.mp4",
+                "http://wysaid.org/p/test.mp4",
+        };
+
+        for (int i = 0; i != filePaths.length; ++i) {
+            MyVideoButton btn = new MyVideoButton(this);
+            btn.setText("Video" + i);
+            btn.videoUri = Uri.parse(filePaths[i]);
+            btn.videoView = mPlayerView;
+            btn.setOnClickListener(btn);
+            menuLayout.addView(btn);
+        }
+
+        for (int i = 0; i != EFFECT_CONFIGS.length; ++i) {
+            MyButtons button = new MyButtons(this, EFFECT_CONFIGS[i]);
+            button.setText("filter" + i);
+            button.setOnClickListener(mFilterSwitchListener);
+            menuLayout.addView(button);
+        }
+
+        mGalleryBtn = findViewById(R.id.galleryBtn);
+        mGalleryBtn.setOnClickListener(galleryBtnClickListener);
+
+        Button fitViewBtn = findViewById(R.id.fitViewBtn);
+        fitViewBtn.setOnClickListener(new View.OnClickListener() {
+            boolean shouldFit = false;
+
+            @Override
+            public void onClick(View v) {
+                shouldFit = !shouldFit;
+                mPlayerView.setFitFullView(shouldFit);
+            }
+        });
+
+        seekBarLl = findViewById(R.id.seekBarLl);
+        for (int i = 0; i < 6; i++) {
+            SeekBar sb = new SeekBar(SheepApp.getInstance());
+            sb.setMax(100);
+            sb.setProgress(50);
+            seekBarLl.addView(sb);
+            final int finalI = i;
+            sb.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
+                @Override
+                public void onProgressChanged(SeekBar seekBar, int progress, boolean b) {
+                    onSeek(finalI, progress);
+                }
+
+                @Override
+                public void onStartTrackingTouch(SeekBar seekBar) {
+
+                }
+
+                @Override
+                public void onStopTrackingTouch(SeekBar seekBar) {
+
+                }
+            });
+        }
+    }
+
+    Button mShapeBtn;
+    Button mTakeshotBtn;
+    Button mGalleryBtn;
+    LinearLayout seekBarLl;
+
+    class MyVideoButton extends AppCompatButton implements View.OnClickListener {
+
+        Uri videoUri;
+        VideoPlayerGLSurfaceView videoView;
+
+        public MyVideoButton(Context context) {
+            super(context);
+        }
+
+        @Override
+        public void onClick(View v) {
+
+            G.showToast("loading video: " + videoUri.getHost() + videoUri.getPath() + " If the video is from the internet, you may wait a while...");
+
+            videoView.setVideoUri(videoUri, new VideoPlayerGLSurfaceView.PlayPreparedCallback() {
+                @Override
+                public void playPrepared(MediaPlayer player) {
+                    mPlayerView.post(new Runnable() {
+                        @Override
+                        public void run() {
+                            G.showToast("Start playing " + videoUri.getHost() + videoUri.getPath());
+                        }
+                    });
+
+                    player.start();
+                }
+            }, playCompletionCallback);
+        }
+    }
+
+    public static class MyButtons extends AppCompatButton {
+
+        public String filterConfig;
+
+        public MyButtons(Context context, String config) {
+            super(context);
+            filterConfig = config;
+        }
+    }
+
+    private int[] progresses = {50, 50, 50, 50, 50, 50};
+
+    private float getPercent(int index) {
+        return (progresses[index] - 50) / 50.0f;
+    }
+
+    private int getPercent(int index, int max) {
+        return progresses[index] * max / 100;
+    }
+
+    private void onSeekHsv(int index, int progress) {
+        progresses[index] = progress;//色调(H),饱和度(S),明度(V)
+        int i = 0;
+        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust hsv %.2f %.2f %.2f %.2f %.2f %.2f", getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i)));
+    }
+
+    private void onSeekHsl(int index, int progress) {
+        progresses[index] = progress;//0,0,0 色相(H)、饱和度(S)、明度(L)
+        int i = 0;
+        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust hsl %.2f %.2f %.2f", getPercent(i++), getPercent(i++), getPercent(i)));
+    }
+
+    private void onSeekRgb(int index, int progress) {
+        progresses[index] = progress;//0,0,255,255 黑<白、反光<亮度
+        int i = 0;
+        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@curve RGB(%d, %d)(%d, %d)", getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255), getPercent(i, 255)));
+    }
+
+    private void onSeekLevel(int index, int progress) {
+        progresses[index] = progress;//0,1,1
+        int i = 0;
+        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust level %.2f %.2f %.2f ", getPercent(i++), getPercent(i++), getPercent(i)));
+    }
+
+    private void onSeekSaturation(int index, int progress) {
+        progresses[index] = progress;//1 饱和度
+        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust saturation %.2f ", getPercent(0)));
+    }
+
+    private void onSeek/*ColorBalance*/(int index, int progress) {
+        progresses[index] = progress;//0,0,0 红绿蓝
+        int i = 0;
+        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust colorbalance %.2f %.2f %.2f ", getPercent(i++), getPercent(i++), getPercent(i)));
+    }
+
+    private void onSeekHaze(int index, int progress) {
+        progresses[index] = progress;
+        int i = 0;
+        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@style haze %.2f %.2f %.2f %.2f %.2f ", getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i)));
+    }
+
+    private static String[] TYPES = {"overlay", "colordodge", "pinlight", "ol", "screen"};
+
+    private void onSeekPixBlend(int index, int progress) {
+        progresses[index] = progress;
+        int i = 0;
+        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@adjust saturation %.2f @pixblend %s %.2f %.2f %.2f %d ", getPercent(i++), TYPES[progresses[1] / 20 % TYPES.length], getPercent(i++), getPercent(i++), getPercent(i++), getPercent(i, 40)));
+    }
+
+    private void onSeekCurve(int index, int progress) {
+        progresses[index] = progress;
+        int i = 0;
+        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@curve R(%d, %d)(%d, %d)(%d, %d) ", getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255), getPercent(i++, 255)));
+    }
+
+    private void onSeekBeautify(int index, int progress) {
+        progresses[index] = progress;
+        int i = 0;
+        mPlayerView.setFilterWithConfig(String.format(Locale.CHINA, "@beautify face %d %d, %d ", getPercent(i++, 2), getPercent(i++, 1000), getPercent(i++, 1000)));
+    }
+
+    private View.OnClickListener mFilterSwitchListener = new View.OnClickListener() {
+        @Override
+        public void onClick(View v) {
+            MyButtons btn = (MyButtons) v;
+            mPlayerView.setFilterWithConfig(btn.filterConfig);
+            mCurrentConfig = btn.filterConfig;
+        }
+    };
+
+    android.view.View.OnClickListener galleryBtnClickListener = new android.view.View.OnClickListener() {
+
+        @Override
+        public void onClick(final android.view.View view) {
+            Intent videoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT);
+            videoPickerIntent.setType("video/*");
+            startActivityForResult(videoPickerIntent, REQUEST_CODE_PICK_VIDEO);
+        }
+    };
+
+    public void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
+        switch (requestCode) {
+            case REQUEST_CODE_PICK_VIDEO:
+                if (resultCode == RESULT_OK) {
+
+                    mPlayerView.setVideoUri(data.getData(), new VideoPlayerGLSurfaceView.PlayPreparedCallback() {
+                        @Override
+                        public void playPrepared(MediaPlayer player) {
+                            Log.i(Common.LOG_TAG, "The video is prepared to play");
+                            player.start();
+                        }
+                    }, playCompletionCallback);
+                }
+            default:
+                break;
+        }
+    }
+
+    @Override
+    public void onPause() {
+        super.onPause();
+        Log.i(VideoPlayerGLSurfaceView.LOG_TAG, "activity onPause...");
+        mPlayerView.release();
+        mPlayerView.onPause();
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+
+        mPlayerView.onResume();
+    }
+
+    public static final String EFFECT_CONFIGS[] = {
+            "",
+            "@curve RGB(0,255)(255,0) @style cm mapping0.jpg 80 80 8 3", // ASCII art (字符画效果)
+            "@beautify face 1 480 640", //Beautify
+            "@adjust lut edgy_amber.png",
+            "@adjust lut filmstock.png",
+            "@adjust lut foggy_night.png",
+            "@adjust lut late_sunset.png",
+            "@adjust lut soft_warming.png",
+            "@adjust lut wildbird.png",
+            "#unpack @blur lerp 0.75", //can adjust blur intensity
+            "@blur lerp 1", //can adjust blur mix
+            "#unpack @dynamic wave 1", //can adjust speed
+            "@dynamic wave 0.5",       //can adjust wave mix
+            "#unpack @style sketch 0.9",
+            "#unpack @krblend sr hehe.jpg 100 ",
+            "#unpack @krblend ol hehe.jpg 100",
+            "#unpack @krblend add hehe.jpg 100",
+            "#unpack @krblend darken hehe.jpg 100",
+            "@beautify bilateral 100 3.5 2 ",
+            "@style crosshatch 0.01 0.003 ",
+            "@style edge 1 2 ",
+            "@style edge 1 2 @curve RGB(0, 255)(255, 0) ",
+            "@style edge 1 2 @curve RGB(0, 255)(255, 0) @adjust saturation 0 @adjust level 0.33 0.71 0.93 ",
+            "@adjust level 0.31 0.54 0.13 ",
+            "#unpack @style emboss 1 2 2 ",//浮雕
+            "@style halftone 1.2 ",//半色调
+            "@vigblend overlay 255 0 0 255 100 0.12 0.54 0.5 0.5 3 ",
+            "@curve R(0, 0)(63, 101)(200, 84)(255, 255)G(0, 0)(86, 49)(180, 183)(255, 255)B(0, 0)(19, 17)(66, 41)(97, 92)(137, 156)(194, 211)(255, 255)RGB(0, 0)(82, 36)(160, 183)(255, 255) ",
+            "@adjust exposure 0.98 ",//暴光
+            "@adjust shadowhighlight -200 200 ",//阴影高亮
+            "@adjust sharpen 10 1.5 ",//锐化
+            "@adjust colorbalance 0.99 0.52 -0.31 ",//色平衡
+            "@adjust level 0.66 0.23 0.44 ",
+            "@style min",
+            "@style max",
+            "@style haze 0.5 -0.14 1 0.8 1 ",
+            "@curve R(0, 0)(71, 74)(164, 165)(255, 255) @pixblend screen 0.94118 0.29 0.29 1 20",//415
+            "@curve G(0, 0)(144, 166)(255, 255) @pixblend screen 0.94118 0.29 0.29 1 20",//416
+            "@curve B(0, 0)(68, 72)(149, 184)(255, 255) @pixblend screen 0.94118 0.29 0.29 1 20",//417
+            "@curve R(0, 0)(71, 74)(164, 165)(255, 255) @pixblend overlay 0.357 0.863 0.882 1 40",//418
+            "@curve R(0, 0)(96, 61)(154, 177)(255, 255) @pixblend overlay 0.357 0.863 0.882 1 40",//419
+            "@curve R(0, 0)(152, 183)(255, 255)G(0, 0)(161, 133)(255, 255) @pixblend overlay 0.357 0.863 0.882 1 40",//420
+            "@curve R(0, 0)(149, 145)(255, 255)G(0, 0)(149, 145)(255, 255)B(0, 0)(149, 145)(255, 255) @pixblend colordodge 0.937 0.482 0.835 1 20",//421
+            "@curve G(0, 0)(101, 127)(255, 255) @pixblend colordodge 0.937 0.482 0.835 1 20",//422
+            "@curve B(0, 0)(70, 87)(140, 191)(255, 255) @pixblend pinlight 0.247 0.49 0.894 1 20",//423
+            "@adjust saturation 0.7 @pixblend screen 0.8112 0.243 1 1 40",//425
+            "@adjust saturation 0.7 @pixblend screen 1 0.243 0.69 1 30",//426
+
+            "@curve R(0, 0)(71, 74)(164, 165)(255, 255) @pixblend screen 0.94118 0.29 0.29 1 20",//415
+            "@curve G(0, 0)(144, 166)(255, 255) @pixblend screen 0.94118 0.29 0.29 1 20",//416
+            "@curve B(0, 0)(68, 72)(149, 184)(255, 255) @pixblend screen 0.94118 0.29 0.29 1 20",//417
+            "@curve R(0, 0)(71, 74)(164, 165)(255, 255) @pixblend overlay 0.357 0.863 0.882 1 40",//418
+            "@curve R(0, 0)(96, 61)(154, 177)(255, 255) @pixblend overlay 0.357 0.863 0.882 1 40",//419
+            "@curve R(0, 0)(152, 183)(255, 255)G(0, 0)(161, 133)(255, 255) @pixblend overlay 0.357 0.863 0.882 1 40",//420
+            "@curve R(0, 0)(149, 145)(255, 255)G(0, 0)(149, 145)(255, 255)B(0, 0)(149, 145)(255, 255) @pixblend colordodge 0.937 0.482 0.835 1 20",//421
+            "@curve G(0, 0)(101, 127)(255, 255) @pixblend colordodge 0.937 0.482 0.835 1 20",//422
+            "@curve B(0, 0)(70, 87)(140, 191)(255, 255) @pixblend pinlight 0.247 0.49 0.894 1 20",//423
+            "@adjust saturation 0.7 @pixblend screen 0.8112 0.243 1 1 40",//425
+            "@adjust saturation 0.7 @pixblend screen 1 0.243 0.69 1 30",//426
+
+            "@curve R(0, 0)(117, 95)(155, 171)(179, 225)(255, 255)G(0, 0)(94, 66)(155, 176)(255, 255)B(0, 0)(48, 59)(141, 130)(255, 224)",//5
+            "@curve R(0, 0)(69, 63)(105, 138)(151, 222)(255, 255)G(0, 0)(67, 51)(135, 191)(255, 255)B(0, 0)(86, 76)(150, 212)(255, 255)",//6
+            "@curve R(0, 0)(43, 77)(56, 104)(100, 166)(255, 255)G(0, 0)(35, 53)(255, 255)B(0, 0)(110, 123)(255, 212)",//7
+            "@curve R(0, 0)(35, 71)(153, 197)(255, 255)G(0, 15)(16, 36)(109, 132)(255, 255)B(0, 23)(181, 194)(255, 230)",//8
+            "@curve R(15, 0)(92, 133)(255, 234)G(0, 20)(105, 128)(255, 255)B(0, 0)(120, 132)(255, 214)",//9
+            "@curve R(0, 4)(255, 244)G(0, 0)(255, 255)B(0, 84)(255, 194)",//10
+            "@curve R(48, 56)(82, 129)(130, 206)(214, 255)G(7, 37)(64, 111)(140, 190)(232, 220)B(2, 97)(114, 153)(229, 172)",//11
+            "@curve R(39, 0)(93, 61)(130, 136)(162, 193)(208, 255)G(41, 0)(92, 61)(128, 133)(164, 197)(200, 250)B(0, 23)(125, 127)(255, 230)",//12
+            "@curve R(40, 162)(108, 186)(142, 208)(193, 227)(239, 249)G(13, 7)(72, 87)(124, 150)(197, 206)(255, 255)B(8, 22)(57, 97)(112, 147)(184, 204)(255, 222)",//13
+            "@curve R(18, 0)(67, 63)(104, 152)(128, 255)G(23, 4)(87, 106)(132, 251)B(17, 0)(67, 63)(108, 174)(128, 251)",//14
+            "@curve R(5, 49)(85, 173)(184, 249)G(23, 35)(65, 76)(129, 145)(255, 199)B(74, 69)(158, 107)(255, 126)",//15
+            "@adjust hsv -0.7 -0.7 0.5 -0.7 -0.7 0.5 @pixblend ol 0.243 0.07059 0.59215 1 25",//17
+            "@adjust hsv -0.7 0.5 -0.7 -0.7 -0.7 0.5 @pixblend ol 0.07059 0.60391 0.57254 1 25",//18
+            "@adjust hsv -0.7 0.5 -0.7 -0.7 0 0 @pixblend ol 0.2941 0.55292 0.06665 1 25",//19
+            "@adjust hsv -0.8 0 -0.8 -0.8 0.5 -0.8 @pixblend ol 0.78036 0.70978 0.09018 1 28",//20
+
+            "@adjust hsv -0.4 -0.64 -1.0 -0.4 -0.88 -0.88 @curve R(0, 0)(119, 160)(255, 255)G(0, 0)(83, 65)(163, 170)(255, 255)B(0, 0)(147, 131)(255, 255)",//22
+            "@adjust hsv -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 @curve R(0, 0)(129, 148)(255, 255)G(0, 0)(92, 77)(175, 189)(255, 255)B(0, 0)(163, 144)(255, 255)",//23
+            "@adjust hsv 0.3 -0.5 -0.3 0 0.35 -0.2 @curve R(0, 0)(111, 163)(255, 255)G(0, 0)(72, 56)(155, 190)(255, 255)B(0, 0)(103, 70)(212, 244)(255, 255)",//24
+            "@curve R(40, 40)(86, 148)(255, 255)G(0, 28)(67, 140)(142, 214)(255, 255)B(0, 100)(103, 176)(195, 174)(255, 255) @adjust hsv 0.32 0 -0.5 -0.2 0 -0.4",//25
+            "@curve R(4, 35)(65, 82)(117, 148)(153, 208)(206, 255)G(13, 5)(74, 78)(109, 144)(156, 201)(250, 250)B(6, 37)(93, 104)(163, 184)(238, 222)(255, 237) @adjust hsv -0.2 -0.2 -0.44 -0.2 -0.2 -0.2",//26
+            "@adjust hsv -1 -1 -1 -1 -1 -1",//27
+            "@colormul mat 0.34 0.48 0.22 0.34 0.48 0.22 0.34 0.48 0.22 @curve R(0, 29)(20, 48)(83, 103)(164, 166)(255, 239)G(0, 30)(30, 61)(66, 94)(151, 160)(255, 241)B(2, 48)(82, 93)(166, 143)(255, 199)",//119
+            "@colormul mat 0.34 0.48 0.22 0.34 0.48 0.22 0.34 0.48 0.22 @curve R(0, 0)(9, 10)(47, 38)(87, 69)(114, 92)(134, 116)(175, 167)(218, 218)(255, 255)G(40, 0)(45, 14)(58, 34)(74, 55)(125, 118)(192, 205)(255, 255)B(0, 0)(15, 16)(37, 31)(71, 55)(108, 88)(159, 151)(204, 201)(255, 255)",//120
+            "@curve R(3, 0)(23, 29)(83, 116)(167, 206)(255, 255)G(5, 0)(56, 64)(160, 189)(255, 255)B(3, 0)(48, 49)(142, 167)(248, 255)",//160
+            "@curve R(15, 0)(45, 37)(92, 103)(230, 255)G(19, 0)(34, 22)(138, 158)(228, 252)B(19, 0)(74, 63)(159, 166)(230, 255)",//161
+            "@curve R(0, 4)(39, 103)(134, 223)(242, 255)G(0, 3)(31, 85)(68, 155)(131, 255)(219, 255)B(0, 3)(42, 110)(114, 207)(255, 255)",//162
+            "@curve R(17, 0)(37, 18)(75, 52)(238, 255)G(16, 0)(53, 32)(113, 92)(236, 255)B(16, 0)(80, 57)(171, 164)(235, 255)",//163
+            "@curve R(33, 0)(70, 32)(146, 143)(185, 204)(255, 255)G(22, 0)(103, 71)(189, 219)(255, 252)B(10, 0)(54, 29)(93, 66)(205, 220)(255, 255)",//164
+            "@curve R(4, 4)(38, 38)(146, 146)(201, 202)(255, 255)G(0, 0)(80, 74)(192, 187)(255, 255)B(0, 0)(58, 58)(183, 184)(255, 255)",//165
+            "@curve R(5, 8)(36, 51)(115, 145)(201, 220)(255, 255)G(6, 9)(67, 83)(169, 190)(255, 255)B(3, 3)(55, 60)(177, 190)(255, 255)",//166
+            "@curve R(14, 0)(51, 42)(135, 138)(191, 202)(234, 255)G(11, 6)(78, 77)(178, 185)(242, 250)B(11, 0)(22, 10)(72, 60)(171, 162)(217, 209)(255, 255)",//167
+            "@curve R(9, 0)(26, 7)(155, 108)(194, 159)(255, 253)G(9, 0)(50, 19)(218, 194)(255, 255)B(0, 0)(29, 9)(162, 116)(218, 194)(255, 255)",//168
+            "@curve R(0, 0)(69, 93)(126, 160)(210, 232)(255, 255)G(0, 0)(36, 47)(135, 169)(250, 254)B(0, 0)(28, 30)(107, 137)(147, 206)(255, 255)",//169
+            "@curve R(2, 2)(16, 30)(72, 112)(135, 185)(252, 255)G(2, 1)(30, 42)(55, 84)(157, 207)(238, 249)B(1, 0)(26, 17)(67, 106)(114, 165)(231, 250)",//170
+            "@curve R(16, 0)(60, 45)(124, 124)(214, 255)G(18, 2)(91, 81)(156, 169)(213, 255)B(16, 0)(85, 74)(158, 171)(211, 255) @curve R(17, 0)(144, 150)(214, 255)G(16, 0)(61, 47)(160, 172)(215, 255)B(21, 2)(131, 135)(213, 255)",//171
+            "@curve R(0, 0)(120, 96)(165, 255)G(90, 0)(131, 145)(172, 255)B(77, 0)(165, 167)(255, 255)",//172
+            "@curve R(9, 0)(49, 62)(124, 155)(218, 255)G(10, 0)(30, 33)(137, 169)(223, 255)B(10, 0)(37, 45)(96, 122)(150, 182)(221, 255)",//173
+            "@curve R(81, 3)(161, 129)(232, 253)G(91, 0)(164, 136)(255, 225)B(76, 0)(196, 162)(255, 225)",//174
+            "@curve R(0, 0)(135, 147)(255, 255)G(0, 0)(135, 147)(255, 255)B(0, 0)(135, 147)(255, 255)  @adjust saturation 0.71 @adjust brightness -0.05 @curve R(19, 0)(45, 36)(88, 90)(130, 125)(200, 170)(255, 255)G(18, 0)(39, 26)(71, 74)(147, 160)(255, 255)B(0, 0)(77, 58)(136, 132)(255, 204)",//300
+            "@adjust saturation 0 @curve R(9, 13)(37, 13)(63, 23)(81, 43)(91, 58)(103, 103)(159, 239)(252, 242)G(3, 20)(29, 20)(56, 19)(77, 37)(107, 108)(126, 184)(137, 217)(150, 248)(182, 284)(255, 255)B(45, 17)(78, 51)(96, 103)(131, 202)(255, 255)",//301
+            "@curve R(42, 2)(53, 52)(80, 102)(100, 123)(189, 196)(255, 255)G(55, 74)(75, 98)(95, 114)(177, 197)(203, 212)(221, 220)(229, 234)(240, 249)B(0, 132)(81, 188)(180, 251)",//303
+            "@adjust saturation 0 @curve R(0, 68)(10, 72)(42, 135)(72, 177)(98, 201)(220, 255)G(0, 29)(12, 30)(57, 127)(119, 203)(212, 255)(254, 239)B(0, 36)(54, 118)(66, 141)(119, 197)(155, 215)(255, 254)",//304
+            "@curve R(0, 64)(16, 13)(58, 128)(108, 109)(162, 223)(255, 255)G(0, 30)(22, 35)(42, 58)(56, 86)(70, 119)(130, 184)(189, 212)B(6, 36)(76, 157)(107, 192)(173, 229)(255, 255)", //306
+            "@vigblend mix 10 10 30 255 91 0 1.0 0.5 0.5 3 @curve R(0, 31)(35, 75)(81, 139)(109, 174)(148, 207)(255, 255)G(0, 24)(59, 88)(105, 146)(130, 171)(145, 187)(180, 214)(255, 255)B(0, 96)(63, 130)(103, 157)(169, 194)(255, 255)",
+            "@adjust saturation 0 @curve R(0, 49)(16, 44)(34, 56)(74, 120)(120, 185)(151, 223)(255, 255)G(0, 46)(34, 73)(85, 129)(111, 164)(138, 192)(170, 215)(255, 255)B(0, 77)(51, 101)(105, 143)(165, 182)(210, 213)(250, 229)",
+            "@adjust saturation 0 @adjust level 0 0.83921 0.8772",
+            "@adjust hsl 0.02 -0.31 -0.17 @curve R(0, 28)(23, 45)(117, 148)(135, 162)G(0, 8)(131, 152)(255, 255)B(0, 17)(58, 80)(132, 131)(127, 131)(255, 225)"
+    };
+
+
+    @Override
+    protected Fragment initFragment() {
+        return new FgtChooseEditList();
+    }
+}

+ 15 - 0
app/src/main/java/com/sheep/gamegroup/find/activity/ActMediaChoose.java

@@ -12,14 +12,18 @@ import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.absBase.IRefresh;
 import com.sheep.gamegroup.find.fragment.FgtMediaPickerImg;
 import com.sheep.gamegroup.find.fragment.FgtMediaPickerVideo;
+import com.sheep.gamegroup.model.entity.Video;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
+import org.greenrobot.eventbus.Subscribe;
+
 import butterknife.BindView;
 import cn.finalteam.rxgalleryfinal.api.CameraCallBack;
 import cn.finalteam.rxgalleryfinal.utils.MediaUtils;
@@ -116,4 +120,15 @@ public class ActMediaChoose extends BaseActivity {
             });
         }
     }
+    @Override
+    protected boolean needRegisterEventBus() {
+        return true;
+    }
+
+    @Subscribe
+    public void onEventMainThread(Video data) {
+        if(data != null){
+            finish();
+        }
+    }
 }

+ 182 - 0
app/src/main/java/com/sheep/gamegroup/find/bean/ColorBalanceFilter.java

@@ -0,0 +1,182 @@
+package com.sheep.gamegroup.find.bean;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * Created by realicing on 2018/12/3.
+ * realicing@sina.com
+ * ColorBalance滤镜
+ */
+public class ColorBalanceFilter implements IFilter {
+    private String name;
+    private float red;//范围-1 到 1
+    private float green;//范围-1 到 1
+    private float blue;//范围-1 到 1
+
+    public ColorBalanceFilter(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public float getRed() {
+        return red;
+    }
+
+    public ColorBalanceFilter setRed(float red) {
+        this.red = red;
+        return this;
+    }
+
+    public float getGreen() {
+        return green;
+    }
+
+    public ColorBalanceFilter setGreen(float green) {
+        this.green = green;
+        return this;
+    }
+
+    public float getBlue() {
+        return blue;
+    }
+
+    public ColorBalanceFilter setBlue(float blue) {
+        this.blue = blue;
+        return this;
+    }
+
+    @Override
+    public String getConfig() {
+        return String.format(Locale.CHINA, "@adjust colorbalance %.2f %.2f %.2f ", red, green, blue);
+    }
+
+
+
+    public IFilter setYellow(int yellow) {
+        this.red = yellow;
+        this.green = yellow;
+        return this;
+    }
+    //添加默认滤镜列表
+    public static void addDefaultFilterList(List<IFilter> filterList) {
+        filterList.addAll(getDefaultFilterList());
+    }
+    //添加默认滤镜列表
+    public static List<IFilter> getDefaultFilterList() {
+        List<IFilter> filterList = new ArrayList<>();
+        filterList.add(new ColorBalanceFilter("原图"));
+        filterList.add(new ColorBalanceFilter("蓝色").setBlue(255));
+        filterList.add(new ColorBalanceFilter("红色").setRed(255));
+        filterList.add(new ColorBalanceFilter("黄色").setYellow(255));
+        filterList.add(new ColorBalanceFilter("绿色").setGreen(255));
+        return filterList;
+    }
+}
+//    name("", "@adjust hsl 0.02 -0.31 -0.17 @curve R(0, 28)(23, 45)(117, 148)(135, 162)G(0, 8)(131, 152)(255, 255)B(0, 17)(58, 80)(132, 131)(127, 131)(255, 225)"),
+//    name("", "@adjust saturation 0 @adjust level 0 0.83921 0.8772"),
+//    name("", "@adjust saturation 0 @curve R(0, 49)(16, 44)(34, 56)(74, 120)(120, 185)(151, 223)(255, 255)G(0, 46)(34, 73)(85, 129)(111, 164)(138, 192)(170, 215)(255, 255)B(0, 77)(51, 101)(105, 143)(165, 182)(210, 213)(250, 229)"),
+//    name("", "@vigblend mix 10 10 30 255 91 0 1.0 0.5 0.5 3 @curve R(0, 31)(35, 75)(81, 139)(109, 174)(148, 207)(255, 255)G(0, 24)(59, 88)(105, 146)(130, 171)(145, 187)(180, 214)(255, 255)B(0, 96)(63, 130)(103, 157)(169, 194)(255, 255)"),
+//    name("", "@curve R(0, 64)(16, 13)(58, 128)(108, 109)(162, 223)(255, 255)G(0, 30)(22, 35)(42, 58)(56, 86)(70, 119)(130, 184)(189, 212)B(6, 36)(76, 157)(107, 192)(173, 229)(255, 255)"),
+//    name("", "@adjust saturation 0 @curve R(0, 68)(10, 72)(42, 135)(72, 177)(98, 201)(220, 255)G(0, 29)(12, 30)(57, 127)(119, 203)(212, 255)(254, 239)B(0, 36)(54, 118)(66, 141)(119, 197)(155, 215)(255, 254)"),
+//    name("", "@curve R(42, 2)(53, 52)(80, 102)(100, 123)(189, 196)(255, 255)G(55, 74)(75, 98)(95, 114)(177, 197)(203, 212)(221, 220)(229, 234)(240, 249)B(0, 132)(81, 188)(180, 251)"),
+//    name("", "@adjust saturation 0 @curve R(9, 13)(37, 13)(63, 23)(81, 43)(91, 58)(103, 103)(159, 239)(252, 242)G(3, 20)(29, 20)(56, 19)(77, 37)(107, 108)(126, 184)(137, 217)(150, 248)(182, 284)(255, 255)B(45, 17)(78, 51)(96, 103)(131, 202)(255, 255)"),
+//    name("", "@curve R(0, 0)(135, 147)(255, 255)G(0, 0)(135, 147)(255, 255)B(0, 0)(135, 147)(255, 255)  @adjust saturation 0.71 @adjust brightness -0.05 @curve R(19, 0)(45, 36)(88, 90)(130, 125)(200, 170)(255, 255)G(18, 0)(39, 26)(71, 74)(147, 160)(255, 255)B(0, 0)(77, 58)(136, 132)(255, 204)"),
+//    name("", "@curve R(81, 3)(161, 129)(232, 253)G(91, 0)(164, 136)(255, 225)B(76, 0)(196, 162)(255, 225)"),
+//    name("", "@curve R(9, 0)(49, 62)(124, 155)(218, 255)G(10, 0)(30, 33)(137, 169)(223, 255)B(10, 0)(37, 45)(96, 122)(150, 182)(221, 255)"),
+//    name("", "@curve R(0, 0)(120, 96)(165, 255)G(90, 0)(131, 145)(172, 255)B(77, 0)(165, 167)(255, 255)"),
+//    name("", "@curve R(16, 0)(60, 45)(124, 124)(214, 255)G(18, 2)(91, 81)(156, 169)(213, 255)B(16, 0)(85, 74)(158, 171)(211, 255) @curve R(17, 0)(144, 150)(214, 255)G(16, 0)(61, 47)(160, 172)(215, 255)B(21, 2)(131, 135)(213, 255)"),
+//    name("", "@curve R(2, 2)(16, 30)(72, 112)(135, 185)(252, 255)G(2, 1)(30, 42)(55, 84)(157, 207)(238, 249)B(1, 0)(26, 17)(67, 106)(114, 165)(231, 250)"),
+//    name("", "@curve R(0, 0)(69, 93)(126, 160)(210, 232)(255, 255)G(0, 0)(36, 47)(135, 169)(250, 254)B(0, 0)(28, 30)(107, 137)(147, 206)(255, 255)"),
+//    name("", "@curve R(9, 0)(26, 7)(155, 108)(194, 159)(255, 253)G(9, 0)(50, 19)(218, 194)(255, 255)B(0, 0)(29, 9)(162, 116)(218, 194)(255, 255)"),
+//    name("", "@curve R(14, 0)(51, 42)(135, 138)(191, 202)(234, 255)G(11, 6)(78, 77)(178, 185)(242, 250)B(11, 0)(22, 10)(72, 60)(171, 162)(217, 209)(255, 255)"),
+//    name("", "@curve R(5, 8)(36, 51)(115, 145)(201, 220)(255, 255)G(6, 9)(67, 83)(169, 190)(255, 255)B(3, 3)(55, 60)(177, 190)(255, 255)"),
+//    name("", "@curve R(4, 4)(38, 38)(146, 146)(201, 202)(255, 255)G(0, 0)(80, 74)(192, 187)(255, 255)B(0, 0)(58, 58)(183, 184)(255, 255)"),
+//    name("", "@curve R(33, 0)(70, 32)(146, 143)(185, 204)(255, 255)G(22, 0)(103, 71)(189, 219)(255, 252)B(10, 0)(54, 29)(93, 66)(205, 220)(255, 255)"),
+//    name("", "@curve R(17, 0)(37, 18)(75, 52)(238, 255)G(16, 0)(53, 32)(113, 92)(236, 255)B(16, 0)(80, 57)(171, 164)(235, 255)"),
+//    name("", "@curve R(0, 4)(39, 103)(134, 223)(242, 255)G(0, 3)(31, 85)(68, 155)(131, 255)(219, 255)B(0, 3)(42, 110)(114, 207)(255, 255)"),
+//    name("", "@curve R(15, 0)(45, 37)(92, 103)(230, 255)G(19, 0)(34, 22)(138, 158)(228, 252)B(19, 0)(74, 63)(159, 166)(230, 255)"),
+//    name("", "@curve R(3, 0)(23, 29)(83, 116)(167, 206)(255, 255)G(5, 0)(56, 64)(160, 189)(255, 255)B(3, 0)(48, 49)(142, 167)(248, 255)"),
+//    name("", "@colormul mat 0.34 0.48 0.22 0.34 0.48 0.22 0.34 0.48 0.22 @curve R(0, 0)(9, 10)(47, 38)(87, 69)(114, 92)(134, 116)(175, 167)(218, 218)(255, 255)G(40, 0)(45, 14)(58, 34)(74, 55)(125, 118)(192, 205)(255, 255)B(0, 0)(15, 16)(37, 31)(71, 55)(108, 88)(159, 151)(204, 201)(255, 255)"),
+//    name("", "@colormul mat 0.34 0.48 0.22 0.34 0.48 0.22 0.34 0.48 0.22 @curve R(0, 29)(20, 48)(83, 103)(164, 166)(255, 239)G(0, 30)(30, 61)(66, 94)(151, 160)(255, 241)B(2, 48)(82, 93)(166, 143)(255, 199)"),
+//    name("", "@adjust hsv -1 -1 -1 -1 -1 -1"),
+//    name("", "@curve R(4, 35)(65, 82)(117, 148)(153, 208)(206, 255)G(13, 5)(74, 78)(109, 144)(156, 201)(250, 250)B(6, 37)(93, 104)(163, 184)(238, 222)(255, 237) @adjust hsv -0.2 -0.2 -0.44 -0.2 -0.2 -0.2"),
+//    name("", "@curve R(40, 40)(86, 148)(255, 255)G(0, 28)(67, 140)(142, 214)(255, 255)B(0, 100)(103, 176)(195, 174)(255, 255) @adjust hsv 0.32 0 -0.5 -0.2 0 -0.4"),
+//    name("", "@adjust hsv 0.3 -0.5 -0.3 0 0.35 -0.2 @curve R(0, 0)(111, 163)(255, 255)G(0, 0)(72, 56)(155, 190)(255, 255)B(0, 0)(103, 70)(212, 244)(255, 255)"),
+//    name("", "@adjust hsv -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 @curve R(0, 0)(129, 148)(255, 255)G(0, 0)(92, 77)(175, 189)(255, 255)B(0, 0)(163, 144)(255, 255)"),
+//    name("", "@adjust hsv -0.4 -0.64 -1.0 -0.4 -0.88 -0.88 @curve R(0, 0)(119, 160)(255, 255)G(0, 0)(83, 65)(163, 170)(255, 255)B(0, 0)(147, 131)(255, 255)"),
+//    name("", "@adjust hsv -0.8 0 -0.8 -0.8 0.5 -0.8 @pixblend ol 0.78036 0.70978 0.09018 1 28"),
+//    name("", "@adjust hsv -0.7 0.5 -0.7 -0.7 0 0 @pixblend ol 0.2941 0.55292 0.06665 1 25"),
+//    name("", "@adjust hsv -0.7 0.5 -0.7 -0.7 -0.7 0.5 @pixblend ol 0.07059 0.60391 0.57254 1 25"),
+//    name("", "@adjust hsv -0.7 -0.7 0.5 -0.7 -0.7 0.5 @pixblend ol 0.243 0.07059 0.59215 1 25"),
+//    name("", "@curve R(5, 49)(85, 173)(184, 249)G(23, 35)(65, 76)(129, 145)(255, 199)B(74, 69)(158, 107)(255, 126)"),
+//    name("", "@curve R(18, 0)(67, 63)(104, 152)(128, 255)G(23, 4)(87, 106)(132, 251)B(17, 0)(67, 63)(108, 174)(128, 251)"),
+//    name("", "@curve R(40, 162)(108, 186)(142, 208)(193, 227)(239, 249)G(13, 7)(72, 87)(124, 150)(197, 206)(255, 255)B(8, 22)(57, 97)(112, 147)(184, 204)(255, 222)"),
+//    name("", "@curve R(39, 0)(93, 61)(130, 136)(162, 193)(208, 255)G(41, 0)(92, 61)(128, 133)(164, 197)(200, 250)B(0, 23)(125, 127)(255, 230)"),
+//    name("", "@curve R(48, 56)(82, 129)(130, 206)(214, 255)G(7, 37)(64, 111)(140, 190)(232, 220)B(2, 97)(114, 153)(229, 172)"),
+//    name("", "@curve R(0, 4)(255, 244)G(0, 0)(255, 255)B(0, 84)(255, 194)"),
+//    name("", "@curve R(15, 0)(92, 133)(255, 234)G(0, 20)(105, 128)(255, 255)B(0, 0)(120, 132)(255, 214)"),
+//    name("", "@curve R(0, 0)(35, 71)(153, 197)(255, 255)G(0, 15)(16, 36)(109, 132)(255, 255)B(0, 23)(181, 194)(255, 230)"),
+//    name("", "@curve R(0, 0)(43, 77)(56, 104)(100, 166)(255, 255)G(0, 0)(35, 53)(255, 255)B(0, 0)(110, 123)(255, 212)"),
+//    name("", "@curve R(0, 0)(69, 63)(105, 138)(151, 222)(255, 255)G(0, 0)(67, 51)(135, 191)(255, 255)B(0, 0)(86, 76)(150, 212)(255, 255)"),
+//    name("", "@adjust saturation 0.7 @pixblend screen 1 0.243 0.69 1 30"),
+//    name("", "@adjust saturation 0.7 @pixblend screen 0.8112 0.243 1 1 40"),
+//    name("", "@curve B(0, 0)(70, 87)(140, 191)(255, 255) @pixblend pinlight 0.247 0.49 0.894 1 20"),
+//    name("", "@curve G(0, 0)(101, 127)(255, 255) @pixblend colordodge 0.937 0.482 0.835 1 20"),
+//    name("", "@curve R(0, 0)(149, 145)(255, 255)G(0, 0)(149, 145)(255, 255)B(0, 0)(149, 145)(255, 255) @pixblend colordodge 0.937 0.482 0.835 1 20"),
+//    name("", "@curve R(0, 0)(152, 183)(255, 255)G(0, 0)(161, 133)(255, 255) @pixblend overlay 0.357 0.863 0.882 1 40"),
+//    name("", "@curve R(0, 0)(96, 61)(154, 177)(255, 255) @pixblend overlay 0.357 0.863 0.882 1 40"),
+//    name("", "@curve R(0, 0)(71, 74)(164, 165)(255, 255) @pixblend overlay 0.357 0.863 0.882 1 40"),
+//    name("", "@curve B(0, 0)(68, 72)(149, 184)(255, 255) @pixblend screen 0.94118 0.29 0.29 1 20"),
+//    name("", "@curve G(0, 0)(144, 166)(255, 255) @pixblend screen 0.94118 0.29 0.29 1 20"),
+//    name("", "@curve R(0, 0)(71, 74)(164, 165)(255, 255) @pixblend screen 0.94118 0.29 0.29 1 20"),
+//    name("", "@adjust saturation 0.7 @pixblend screen 1 0.243 0.69 1 30"),
+//    name("", "@adjust saturation 0.7 @pixblend screen 0.8112 0.243 1 1 40"),
+//    name("", "@curve B(0, 0)(70, 87)(140, 191)(255, 255) @pixblend pinlight 0.247 0.49 0.894 1 20"),
+//    name("", "@curve G(0, 0)(101, 127)(255, 255) @pixblend colordodge 0.937 0.482 0.835 1 20"),
+//    name("", "@curve R(0, 0)(149, 145)(255, 255)G(0, 0)(149, 145)(255, 255)B(0, 0)(149, 145)(255, 255) @pixblend colordodge 0.937 0.482 0.835 1 20"),
+//    name("", "@curve R(0, 0)(152, 183)(255, 255)G(0, 0)(161, 133)(255, 255) @pixblend overlay 0.357 0.863 0.882 1 40"),
+//    name("", "@curve R(0, 0)(96, 61)(154, 177)(255, 255) @pixblend overlay 0.357 0.863 0.882 1 40"),
+//    name("", "@curve R(0, 0)(71, 74)(164, 165)(255, 255) @pixblend overlay 0.357 0.863 0.882 1 40"),
+//    name("", "@curve B(0, 0)(68, 72)(149, 184)(255, 255) @pixblend screen 0.94118 0.29 0.29 1 20"),
+//    name("", "@curve G(0, 0)(144, 166)(255, 255) @pixblend screen 0.94118 0.29 0.29 1 20"),
+//    name("", "@curve R(0, 0)(71, 74)(164, 165)(255, 255) @pixblend screen 0.94118 0.29 0.29 1 20"),
+//    name("", "@style haze 0.5 -0.14 1 0.8 1"),
+//    name("", "@style max"),
+//    name("", "@style min"),
+//    name("", "@adjust level 0.66 0.23 0.44"),
+//    name("", "@adjust colorbalance 0.99 0.52 -0.31"),
+//    name("", "@adjust sharpen 10 1.5"),
+//    name("", "@adjust shadowhighlight -200 200"),
+//    name("", "@adjust exposure 0.98"),
+//    name("", "@curve R(0, 0)(63, 101)(200, 84)(255, 255)G(0, 0)(86, 49)(180, 183)(255, 255)B(0, 0)(19, 17)(66, 41)(97, 92)(137, 156)(194, 211)(255, 255)RGB(0, 0)(82, 36)(160, 183)(255, 255)"),
+//    name("", "@vigblend overlay 255 0 0 255 100 0.12 0.54 0.5 0.5 3"),
+//    name("", "@style halftone 1.2"),
+//    name("", "#unpack @style emboss 1 2 2"),
+//    name("", "@adjust level 0.31 0.54 0.13"),
+//    name("", "@style edge 1 2 @curve RGB(0, 255)(255, 0) @adjust saturation 0 @adjust level 0.33 0.71 0.93"),
+//    name("", "@style edge 1 2 @curve RGB(0, 255)(255, 0)"),
+//    name("", "@style edge 1 2"),
+//    name("", "@style crosshatch 0.01 0.003"),
+//    name("", "@beautify bilateral 100 3.5 2"),
+//    name("", "#unpack @krblend darken hehe.jpg 100"),
+//    name("", "#unpack @krblend add hehe.jpg 100"),
+//    name("", "#unpack @krblend ol hehe.jpg 100"),
+//    name("", "#unpack @krblend sr hehe.jpg 100"),
+//    name("", "#unpack @style sketch 0.9"),
+//    name("", "@dynamic wave 0.5"),
+//    name("", "#unpack @dynamic wave 1"),
+//    name("", "@blur lerp 1"),
+//    name("", "#unpack @blur lerp 0.75"),
+//    name("", "@adjust lut wildbird.png"),
+//    name("", "@adjust lut soft_warming.png"),
+//    name("", "@adjust lut late_sunset.png"),
+//    name("", "@adjust lut foggy_night.png"),
+//    name("", "@adjust lut filmstock.png"),
+//    name("", "@adjust lut edgy_amber.png"),
+//    name("", "@beautify face 1 480 640"),
+//    name("", "@curve RGB(0,255)(255,0) @style cm mapping0.jpg 80 80 8 3"),

+ 11 - 0
app/src/main/java/com/sheep/gamegroup/find/bean/Filterble.java

@@ -0,0 +1,11 @@
+package com.sheep.gamegroup.find.bean;
+
+/**
+ * Created by realicing on 2018/12/4.
+ * realicing@sina.com
+ * 可以选择滤镜
+ */
+public interface Filterble {
+    void setFilter(IFilter item);
+    void setFilterIntensity(float intensity);
+}

+ 11 - 0
app/src/main/java/com/sheep/gamegroup/find/bean/IFilter.java

@@ -0,0 +1,11 @@
+package com.sheep.gamegroup.find.bean;
+
+/**
+ * Created by realicing on 2018/12/3.
+ * realicing@sina.com
+ * 滤镜
+ */
+public interface IFilter {
+    String getName();//滤镜名称
+    String getConfig();//滤镜的配置
+}

+ 48 - 0
app/src/main/java/com/sheep/gamegroup/find/bean/Size.java

@@ -0,0 +1,48 @@
+package com.sheep.gamegroup.find.bean;
+
+/**
+ * Created by realicing on 2018/12/4.
+ * realicing@sina.com
+ */
+public class Size {
+    private int width;
+    private int height;
+    private int x;
+    private int y;
+
+    public int getWidth() {
+        return width;
+    }
+
+    public Size setWidth(int width) {
+        this.width = width;
+        return this;
+    }
+
+    public int getHeight() {
+        return height;
+    }
+
+    public Size setHeight(int height) {
+        this.height = height;
+        return this;
+    }
+
+    public int getX() {
+        return x;
+    }
+
+    public Size setX(int x) {
+        this.x = x;
+        return this;
+    }
+
+    public int getY() {
+        return y;
+    }
+
+    public Size setY(int y) {
+        this.y = y;
+        return this;
+    }
+}

+ 106 - 0
app/src/main/java/com/sheep/gamegroup/find/fragment/FgtChooseEditList.java

@@ -0,0 +1,106 @@
+package com.sheep.gamegroup.find.fragment;
+
+import android.support.v7.widget.GridLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.SeekBar;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.sheep.gamegroup.find.bean.ColorBalanceFilter;
+import com.sheep.gamegroup.find.bean.Filterble;
+import com.sheep.gamegroup.find.bean.IFilter;
+import com.sheep.gamegroup.util.ViewUtil;
+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.ArrayList;
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.OnClick;
+
+/**
+ * Created by realicing on 2018/12/3.
+ * realicing@sina.com
+ * 可在该界面选择滤镜、磨皮、大眼瘦脸的效果
+ */
+public class FgtChooseEditList extends BaseFragment {
+    @BindView(R.id.fgt_choose_edit_list_ll)
+    View fgt_choose_edit_list_ll;
+    @BindView(R.id.fgt_choose_edit_line_v)
+    View fgt_choose_edit_line_v;
+    @BindView(R.id.fgt_choose_edit_intensity_sb)
+    SeekBar fgt_choose_edit_intensity_sb;
+    @BindView(R.id.recyclerView)
+    RecyclerView recyclerView;
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.fgt_choose_edit_list;
+    }
+
+    @Override
+    public void onViewCreated() {
+        initView();
+    }
+
+    private List<IFilter> filterList = new ArrayList<>();
+
+    private void initView() {
+        ColorBalanceFilter.addDefaultFilterList(filterList);
+        recyclerView.setLayoutManager(new GridLayoutManager(SheepApp.getInstance(), filterList.size()));
+        recyclerView.setAdapter(new BaseQuickAdapter<IFilter, BaseViewHolder>(R.layout.item_tv_iv, filterList) {
+            @Override
+            protected void convert(BaseViewHolder helper, final IFilter item) {
+                helper.setText(R.id.item_tv, item.getName());
+                ImageView item_iv = helper.getView(R.id.item_iv);
+                ViewUtil.setImage(item_iv, item);
+                helper.itemView.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        if (getActivity() instanceof Filterble) {
+                            ((Filterble) getActivity()).setFilter(item);
+                            ((Filterble) getActivity()).setFilterIntensity(fgt_choose_edit_intensity_sb.getProgress() / 100.0f);
+                        }
+                    }
+                });
+            }
+        });
+        fgt_choose_edit_intensity_sb.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
+            @Override
+            public void onProgressChanged(SeekBar seekBar, int progress, boolean b) {
+                if (getActivity() instanceof Filterble)
+                    ((Filterble) getActivity()).setFilterIntensity(progress / 100.0f);
+            }
+
+            @Override
+            public void onStartTrackingTouch(SeekBar seekBar) {
+
+            }
+
+            @Override
+            public void onStopTrackingTouch(SeekBar seekBar) {
+
+            }
+        });
+    }
+    //选择滤镜
+    @OnClick({R.id.fgt_choose_edit_filter_tv})
+    public void onSelectFilter(View view){
+
+    }
+    //选择磨皮
+    @OnClick({R.id.fgt_choose_edit_buffing_tv})
+    public void onSelectBuffing(View view){
+        G.showToast(R.string.coming_soon);
+    }
+    //选择大眼瘦脸
+    @OnClick({R.id.fgt_choose_edit_warping_tv})
+    public void onSelectWarping(View view){
+        G.showToast(R.string.coming_soon);
+    }
+}

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/find/fragment/FgtMediaPickerVideo.java

@@ -65,6 +65,7 @@ public class FgtMediaPickerVideo extends BaseListFragment6<MediaBean> {
 
             @Override
             protected void convert(BaseViewHolder helper, MediaBean item) {
+                helper.setVisible(R.id.item_video_play_no_tv, false);
                 ImageView item_video_cover = helper.getView(R.id.item_video_cover);
                 TextView item_video_time_tv = helper.itemView.findViewById(R.id.item_video_time_tv);
                 ViewUtil.setViewWH(item_video_cover, width, item.getHeight() * 1.0f / item.getWidth());

+ 12 - 12
app/src/main/java/com/sheep/gamegroup/greendao/download/DaoMaster.java

@@ -22,25 +22,25 @@ public class DaoMaster extends AbstractDaoMaster {
 
     /** Creates underlying database table using DAOs. */
     public static void createAllTables(Database db, boolean ifNotExists) {
-        ProcessRecordDao.createTable(db, ifNotExists);
+        AcceptTaskRecordDao.createTable(db, ifNotExists);
         AppdownloadBeanDao.createTable(db, ifNotExists);
-        SdkLoginUserDao.createTable(db, ifNotExists);
+        DownLoadInfoDao.createTable(db, ifNotExists);
+        ProcessRecordDao.createTable(db, ifNotExists);
         ScreenShotRecordDao.createTable(db, ifNotExists);
-        AcceptTaskRecordDao.createTable(db, ifNotExists);
+        SdkLoginUserDao.createTable(db, ifNotExists);
         SearchRecordDao.createTable(db, ifNotExists);
-        DownLoadInfoDao.createTable(db, ifNotExists);
         AccountDao.createTable(db, ifNotExists);
     }
 
     /** Drops underlying database table using DAOs. */
     public static void dropAllTables(Database db, boolean ifExists) {
-        ProcessRecordDao.dropTable(db, ifExists);
+        AcceptTaskRecordDao.dropTable(db, ifExists);
         AppdownloadBeanDao.dropTable(db, ifExists);
-        SdkLoginUserDao.dropTable(db, ifExists);
+        DownLoadInfoDao.dropTable(db, ifExists);
+        ProcessRecordDao.dropTable(db, ifExists);
         ScreenShotRecordDao.dropTable(db, ifExists);
-        AcceptTaskRecordDao.dropTable(db, ifExists);
+        SdkLoginUserDao.dropTable(db, ifExists);
         SearchRecordDao.dropTable(db, ifExists);
-        DownLoadInfoDao.dropTable(db, ifExists);
         AccountDao.dropTable(db, ifExists);
     }
 
@@ -60,13 +60,13 @@ public class DaoMaster extends AbstractDaoMaster {
 
     public DaoMaster(Database db) {
         super(db, SCHEMA_VERSION);
-        registerDaoClass(ProcessRecordDao.class);
+        registerDaoClass(AcceptTaskRecordDao.class);
         registerDaoClass(AppdownloadBeanDao.class);
-        registerDaoClass(SdkLoginUserDao.class);
+        registerDaoClass(DownLoadInfoDao.class);
+        registerDaoClass(ProcessRecordDao.class);
         registerDaoClass(ScreenShotRecordDao.class);
-        registerDaoClass(AcceptTaskRecordDao.class);
+        registerDaoClass(SdkLoginUserDao.class);
         registerDaoClass(SearchRecordDao.class);
-        registerDaoClass(DownLoadInfoDao.class);
         registerDaoClass(AccountDao.class);
     }
 

+ 47 - 47
app/src/main/java/com/sheep/gamegroup/greendao/download/DaoSession.java

@@ -8,22 +8,22 @@ import org.greenrobot.greendao.database.Database;
 import org.greenrobot.greendao.identityscope.IdentityScopeType;
 import org.greenrobot.greendao.internal.DaoConfig;
 
-import com.sheep.gamegroup.greendao.download.ProcessRecord;
+import com.sheep.gamegroup.greendao.download.AcceptTaskRecord;
 import com.sheep.gamegroup.greendao.download.AppdownloadBean;
-import com.sheep.gamegroup.greendao.download.SdkLoginUser;
+import com.sheep.gamegroup.greendao.download.DownLoadInfo;
+import com.sheep.gamegroup.greendao.download.ProcessRecord;
 import com.sheep.gamegroup.greendao.download.ScreenShotRecord;
-import com.sheep.gamegroup.greendao.download.AcceptTaskRecord;
+import com.sheep.gamegroup.greendao.download.SdkLoginUser;
 import com.sheep.gamegroup.greendao.download.SearchRecord;
-import com.sheep.gamegroup.greendao.download.DownLoadInfo;
 import com.sheep.gamegroup.module.login.model.Account;
 
-import com.sheep.gamegroup.greendao.download.ProcessRecordDao;
+import com.sheep.gamegroup.greendao.download.AcceptTaskRecordDao;
 import com.sheep.gamegroup.greendao.download.AppdownloadBeanDao;
-import com.sheep.gamegroup.greendao.download.SdkLoginUserDao;
+import com.sheep.gamegroup.greendao.download.DownLoadInfoDao;
+import com.sheep.gamegroup.greendao.download.ProcessRecordDao;
 import com.sheep.gamegroup.greendao.download.ScreenShotRecordDao;
-import com.sheep.gamegroup.greendao.download.AcceptTaskRecordDao;
+import com.sheep.gamegroup.greendao.download.SdkLoginUserDao;
 import com.sheep.gamegroup.greendao.download.SearchRecordDao;
-import com.sheep.gamegroup.greendao.download.DownLoadInfoDao;
 import com.sheep.gamegroup.module.login.model.AccountDao;
 
 // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
@@ -35,110 +35,110 @@ import com.sheep.gamegroup.module.login.model.AccountDao;
  */
 public class DaoSession extends AbstractDaoSession {
 
-    private final DaoConfig processRecordDaoConfig;
+    private final DaoConfig acceptTaskRecordDaoConfig;
     private final DaoConfig appdownloadBeanDaoConfig;
-    private final DaoConfig sdkLoginUserDaoConfig;
+    private final DaoConfig downLoadInfoDaoConfig;
+    private final DaoConfig processRecordDaoConfig;
     private final DaoConfig screenShotRecordDaoConfig;
-    private final DaoConfig acceptTaskRecordDaoConfig;
+    private final DaoConfig sdkLoginUserDaoConfig;
     private final DaoConfig searchRecordDaoConfig;
-    private final DaoConfig downLoadInfoDaoConfig;
     private final DaoConfig accountDaoConfig;
 
-    private final ProcessRecordDao processRecordDao;
+    private final AcceptTaskRecordDao acceptTaskRecordDao;
     private final AppdownloadBeanDao appdownloadBeanDao;
-    private final SdkLoginUserDao sdkLoginUserDao;
+    private final DownLoadInfoDao downLoadInfoDao;
+    private final ProcessRecordDao processRecordDao;
     private final ScreenShotRecordDao screenShotRecordDao;
-    private final AcceptTaskRecordDao acceptTaskRecordDao;
+    private final SdkLoginUserDao sdkLoginUserDao;
     private final SearchRecordDao searchRecordDao;
-    private final DownLoadInfoDao downLoadInfoDao;
     private final AccountDao accountDao;
 
     public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
             daoConfigMap) {
         super(db);
 
-        processRecordDaoConfig = daoConfigMap.get(ProcessRecordDao.class).clone();
-        processRecordDaoConfig.initIdentityScope(type);
+        acceptTaskRecordDaoConfig = daoConfigMap.get(AcceptTaskRecordDao.class).clone();
+        acceptTaskRecordDaoConfig.initIdentityScope(type);
 
         appdownloadBeanDaoConfig = daoConfigMap.get(AppdownloadBeanDao.class).clone();
         appdownloadBeanDaoConfig.initIdentityScope(type);
 
-        sdkLoginUserDaoConfig = daoConfigMap.get(SdkLoginUserDao.class).clone();
-        sdkLoginUserDaoConfig.initIdentityScope(type);
+        downLoadInfoDaoConfig = daoConfigMap.get(DownLoadInfoDao.class).clone();
+        downLoadInfoDaoConfig.initIdentityScope(type);
+
+        processRecordDaoConfig = daoConfigMap.get(ProcessRecordDao.class).clone();
+        processRecordDaoConfig.initIdentityScope(type);
 
         screenShotRecordDaoConfig = daoConfigMap.get(ScreenShotRecordDao.class).clone();
         screenShotRecordDaoConfig.initIdentityScope(type);
 
-        acceptTaskRecordDaoConfig = daoConfigMap.get(AcceptTaskRecordDao.class).clone();
-        acceptTaskRecordDaoConfig.initIdentityScope(type);
+        sdkLoginUserDaoConfig = daoConfigMap.get(SdkLoginUserDao.class).clone();
+        sdkLoginUserDaoConfig.initIdentityScope(type);
 
         searchRecordDaoConfig = daoConfigMap.get(SearchRecordDao.class).clone();
         searchRecordDaoConfig.initIdentityScope(type);
 
-        downLoadInfoDaoConfig = daoConfigMap.get(DownLoadInfoDao.class).clone();
-        downLoadInfoDaoConfig.initIdentityScope(type);
-
         accountDaoConfig = daoConfigMap.get(AccountDao.class).clone();
         accountDaoConfig.initIdentityScope(type);
 
-        processRecordDao = new ProcessRecordDao(processRecordDaoConfig, this);
+        acceptTaskRecordDao = new AcceptTaskRecordDao(acceptTaskRecordDaoConfig, this);
         appdownloadBeanDao = new AppdownloadBeanDao(appdownloadBeanDaoConfig, this);
-        sdkLoginUserDao = new SdkLoginUserDao(sdkLoginUserDaoConfig, this);
+        downLoadInfoDao = new DownLoadInfoDao(downLoadInfoDaoConfig, this);
+        processRecordDao = new ProcessRecordDao(processRecordDaoConfig, this);
         screenShotRecordDao = new ScreenShotRecordDao(screenShotRecordDaoConfig, this);
-        acceptTaskRecordDao = new AcceptTaskRecordDao(acceptTaskRecordDaoConfig, this);
+        sdkLoginUserDao = new SdkLoginUserDao(sdkLoginUserDaoConfig, this);
         searchRecordDao = new SearchRecordDao(searchRecordDaoConfig, this);
-        downLoadInfoDao = new DownLoadInfoDao(downLoadInfoDaoConfig, this);
         accountDao = new AccountDao(accountDaoConfig, this);
 
-        registerDao(ProcessRecord.class, processRecordDao);
+        registerDao(AcceptTaskRecord.class, acceptTaskRecordDao);
         registerDao(AppdownloadBean.class, appdownloadBeanDao);
-        registerDao(SdkLoginUser.class, sdkLoginUserDao);
+        registerDao(DownLoadInfo.class, downLoadInfoDao);
+        registerDao(ProcessRecord.class, processRecordDao);
         registerDao(ScreenShotRecord.class, screenShotRecordDao);
-        registerDao(AcceptTaskRecord.class, acceptTaskRecordDao);
+        registerDao(SdkLoginUser.class, sdkLoginUserDao);
         registerDao(SearchRecord.class, searchRecordDao);
-        registerDao(DownLoadInfo.class, downLoadInfoDao);
         registerDao(Account.class, accountDao);
     }
     
     public void clear() {
-        processRecordDaoConfig.clearIdentityScope();
+        acceptTaskRecordDaoConfig.clearIdentityScope();
         appdownloadBeanDaoConfig.clearIdentityScope();
-        sdkLoginUserDaoConfig.clearIdentityScope();
+        downLoadInfoDaoConfig.clearIdentityScope();
+        processRecordDaoConfig.clearIdentityScope();
         screenShotRecordDaoConfig.clearIdentityScope();
-        acceptTaskRecordDaoConfig.clearIdentityScope();
+        sdkLoginUserDaoConfig.clearIdentityScope();
         searchRecordDaoConfig.clearIdentityScope();
-        downLoadInfoDaoConfig.clearIdentityScope();
         accountDaoConfig.clearIdentityScope();
     }
 
-    public ProcessRecordDao getProcessRecordDao() {
-        return processRecordDao;
+    public AcceptTaskRecordDao getAcceptTaskRecordDao() {
+        return acceptTaskRecordDao;
     }
 
     public AppdownloadBeanDao getAppdownloadBeanDao() {
         return appdownloadBeanDao;
     }
 
-    public SdkLoginUserDao getSdkLoginUserDao() {
-        return sdkLoginUserDao;
+    public DownLoadInfoDao getDownLoadInfoDao() {
+        return downLoadInfoDao;
+    }
+
+    public ProcessRecordDao getProcessRecordDao() {
+        return processRecordDao;
     }
 
     public ScreenShotRecordDao getScreenShotRecordDao() {
         return screenShotRecordDao;
     }
 
-    public AcceptTaskRecordDao getAcceptTaskRecordDao() {
-        return acceptTaskRecordDao;
+    public SdkLoginUserDao getSdkLoginUserDao() {
+        return sdkLoginUserDao;
     }
 
     public SearchRecordDao getSearchRecordDao() {
         return searchRecordDao;
     }
 
-    public DownLoadInfoDao getDownLoadInfoDao() {
-        return downLoadInfoDao;
-    }
-
     public AccountDao getAccountDao() {
         return accountDao;
     }

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

@@ -1510,7 +1510,7 @@ public interface ApiService {
      * 小绵羊3.4.5新增 -- 查询视频列表
      */
     @GET(ApiKey.getVideoList)
-    Observable<BaseMessage> getVideoList(@Query("page") int page, @Query("per_page") int per_page);
+    Observable<BaseMessage> getVideoList(@Query("page_no") int page, @Query("page_size") int per_page);
     /**
      * 小绵羊3.4.5新增 -- 查询音乐列表
      */

+ 24 - 0
app/src/main/java/com/sheep/gamegroup/util/BitmapUtil.java

@@ -0,0 +1,24 @@
+package com.sheep.gamegroup.util;
+
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Matrix;
+import android.graphics.Paint;
+
+import com.sheep.gamegroup.find.bean.Size;
+
+/**
+ * Created by realicing on 2018/12/4.
+ * realicing@sina.com
+ */
+public class BitmapUtil {
+    public static Bitmap createBigLogo(Bitmap bmp, Size size) {
+        Bitmap result = Bitmap.createBitmap(size.getWidth(), size.getHeight(), Bitmap.Config.ARGB_4444);
+        Canvas canvas = new Canvas(result);
+        Paint paint = new Paint();
+        Matrix matrix = new Matrix();
+        matrix.setTranslate(size.getX(), size.getY());
+        canvas.drawBitmap(bmp, matrix, paint);
+        return result;
+    }
+}

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

@@ -30,6 +30,7 @@ import com.alipay.sdk.app.PayTask;
 import com.kfzs.duanduan.utils.ApkUtils;
 import com.mdad.sdk.mdsdk.AdManager;
 import com.mdad.sdk.mdsdk.common.AdData;
+import com.sheep.gamegroup.absBase.AbsObserver;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.absBase.IJump;
 import com.sheep.gamegroup.absBase.IJumpWeb;
@@ -101,6 +102,10 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
+import io.reactivex.Observable;
+import io.reactivex.ObservableEmitter;
+import io.reactivex.ObservableOnSubscribe;
+import io.reactivex.Observer;
 import io.reactivex.android.schedulers.AndroidSchedulers;
 import io.reactivex.schedulers.Schedulers;
 import okhttp3.Call;
@@ -988,6 +993,33 @@ public class CommonUtil {
         Thread payThread = new Thread(payRunnable);
         payThread.start();
     }
+    /**
+     * 支付宝支付
+     *
+     * @param payInfo
+     */
+    public void alipay(final String payInfo, final boolean b, Observer<String> observer) {
+        Observable.create(new ObservableOnSubscribe<String>() {
+            @Override
+            public void subscribe(ObservableEmitter<String> emitter) throws Exception {
+                Activity activity = ActivityManager.getInstance().currentActivity();
+                PayTask alipay = new PayTask(activity);
+                // 调用支付接口,获取支付结果
+                String result = alipay.pay(payInfo, b);
+                PayResult payResult = new PayResult(result);
+                /**
+                 * 同步返回的结果必须放置到服务端进行验证(验证的规则请看https://doc.open.alipay.com/doc2/
+                 * detail.htm?spm=0.0.0.0.xdvAU6&treeId=59&articleId=103665&
+                 * docType=1) 建议商户依赖异步通知
+                 */
+//						String resultInfo = payResult.getResult();// 同步返回需要验证的信息
+                String resultStatus = payResult.getResultStatus();
+                emitter.onNext(resultStatus);
+            }
+        }).subscribeOn(Schedulers.io())
+        .observeOn(AndroidSchedulers.mainThread())
+        .subscribe(observer);
+    }
 
     /**
      * ACache.get(context).put("url_config", (JSONObject) urlConfig);

+ 5 - 0
app/src/main/java/com/sheep/gamegroup/util/DataUtil.java

@@ -120,6 +120,11 @@ public class DataUtil {
         return uid;
     }
 
+    //该用户id是当前登录用户的id
+    public boolean isMe(int user_id) {
+        return user_id == NumberFormatUtils.parseInteger(getUserId(), -1);
+    }
+
     public String getToken() {
         return token;
     }

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

@@ -57,7 +57,7 @@ import com.sheep.gamegroup.view.activity.ActCreditCardTaskList;
 import com.sheep.gamegroup.view.activity.ActCreditCardWeb;
 import com.sheep.gamegroup.view.activity.ActCutVideo;
 import com.sheep.gamegroup.view.activity.ActDownloadWelfareList;
-import com.sheep.gamegroup.view.activity.ActEditVideo;
+import com.sheep.gamegroup.find.activity.ActEditVideo;
 import com.sheep.gamegroup.view.activity.ActEntertainmentLuckDraw;
 import com.sheep.gamegroup.view.activity.ActEveryDayShare;
 import com.sheep.gamegroup.view.activity.ActExchangeCMCC;

+ 178 - 60
app/src/main/java/com/sheep/gamegroup/util/TestUtil.java

@@ -7,6 +7,13 @@ import android.app.NotificationManager;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.pm.PackageInfo;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
+import android.graphics.Matrix;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.graphics.RectF;
 import android.net.Uri;
 import android.os.Build;
 import android.os.Bundle;
@@ -24,14 +31,19 @@ import com.alibaba.fastjson.JSON;
 import com.bumptech.glide.Glide;
 import com.kfzs.duanduan.utils.ApkUtils;
 import com.kfzs.duanduan.view.DialogStorageLow;
+import com.sheep.gamegroup.absBase.AbsObserver;
+import com.sheep.gamegroup.find.bean.ColorBalanceFilter;
+import com.sheep.gamegroup.find.bean.IFilter;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.CreditCard;
 import com.sheep.gamegroup.model.entity.DialogConfig;
 import com.sheep.gamegroup.model.entity.LoginEntity;
 import com.sheep.gamegroup.model.entity.LoginUser;
 import com.sheep.gamegroup.model.entity.UserEntity;
+import com.sheep.gamegroup.model.entity.Video;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.usage.AppUsageManager;
+import com.sheep.gamegroup.util.viewHelper.CacheImageUtil;
 import com.sheep.gamegroup.view.activity.ActInstallApkList;
 import com.sheep.gamegroup.view.activity.ActMain;
 import com.sheep.gamegroup.view.activity.ActSheepApkList;
@@ -46,6 +58,7 @@ import com.sheep.gamegroup.view.dialog.DialogProgress;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
 import com.sheep.jiuyan.samllsheep.utils.DeviceUtils;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
@@ -58,6 +71,9 @@ import com.zhy.http.okhttp.OkHttpUtils;
 import com.zhy.http.okhttp.callback.FileCallBack;
 import com.zhy.http.okhttp.callback.StringCallback;
 
+import org.wysaid.myUtils.ImageUtil;
+import org.wysaid.nativePort.CGENativeLibrary;
+
 import java.io.File;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -65,8 +81,15 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
+import cn.finalteam.rxgalleryfinal.bean.MediaBean;
+import cn.finalteam.rxgalleryfinal.utils.MediaUtils;
 import cn.jpush.android.api.JPushInterface;
+import io.reactivex.Observable;
+import io.reactivex.ObservableEmitter;
+import io.reactivex.ObservableOnSubscribe;
+import io.reactivex.ObservableSource;
 import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.functions.Function;
 import io.reactivex.schedulers.Schedulers;
 import okhttp3.Call;
 import rx.functions.Action1;
@@ -83,8 +106,8 @@ import static com.sheep.jiuyan.samllsheep.utils.ClassFileHelper.DIR;
 public class TestUtil {
     private static TestUtil textUtils;
 
-    public static TestUtil getInstance(){
-        if(textUtils == null)
+    public static TestUtil getInstance() {
+        if (textUtils == null)
             textUtils = new TestUtil();
         return textUtils;
     }
@@ -111,6 +134,7 @@ public class TestUtil {
             });
         }
     }
+
     public static void testChangeUser(final Activity activity, TextView test_change) {
         if (isTest() && !ConfigUtil.getInstance().isFileExists()) {
 
@@ -120,26 +144,27 @@ public class TestUtil {
                 @Override
                 public void onClick(View view) {
                     final List<LoginUser> loginUserList = MyDbManager.getInstance().getAllLoginUser();
-                    if(ListUtil.isEmpty(loginUserList)){//无用户
+                    if (ListUtil.isEmpty(loginUserList)) {//无用户
                         return;
                     }
                     final List<Object> list = ListUtil.emptyList();
+                    list.add("test");
                     list.add("清理清除aCache");
                     list.add("清理图片");
                     list.add("下载小绵羊");
                     ListUtil.addAll(list, loginUserList);
                     AlertDialog dialog = new AlertDialog.Builder(activity).setTitle("选择要登录的账号")
-                            .setAdapter(new ArrayAdapter<>(activity, android.R.layout.simple_list_item_1, list),  new DialogInterface.OnClickListener() {
+                            .setAdapter(new ArrayAdapter<>(activity, android.R.layout.simple_list_item_1, list), new DialogInterface.OnClickListener() {
 
                                 @Override
                                 public void onClick(DialogInterface dialogInterface, int which) {
                                     Object object = ListUtil.getItem(list, which);
-                                    if(object instanceof LoginUser){
+                                    if (object instanceof LoginUser) {
                                         SpUtils.saveToken(SheepApp.getInstance(), ((LoginUser) object).getToken());
                                         CommonUtil.getInstance().updateUserInfo(new Action1<UserEntity>() {
                                             @Override
                                             public void call(UserEntity userEntity) {
-                                                if(userEntity != null)
+                                                if (userEntity != null)
                                                     DataUtil.getInstance().initUserEntity(userEntity);
                                             }
                                         });
@@ -147,8 +172,8 @@ public class TestUtil {
                                         Intent intent = new Intent(SheepApp.getInstance(), ActMain.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                                         intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                                         SheepApp.getInstance().startActivity(intent);
-                                    } else if(object instanceof String){
-                                        switch (object.toString()){
+                                    } else if (object instanceof String) {
+                                        switch (object.toString()) {
                                             case "清理图片":
                                                 new Thread(new Runnable() {
                                                     @Override
@@ -163,6 +188,9 @@ public class TestUtil {
                                             case "清理清除aCache":
                                                 DataUtil.getInstance().clearACache();
                                                 break;
+                                            case "test":
+                                                test(activity);
+                                                break;
                                         }
                                     }
                                 }
@@ -178,7 +206,7 @@ public class TestUtil {
             if (loginEty != null && loginEty.getUser() != null) {
                 LoginUser loginUser = new LoginUser();
                 loginUser.setServiceName(SheepApp.getInstance().getConnectAddress().getName());
-                loginUser.setId(loginEty.getUser().getOpen_id()+loginUser.getServiceName());
+                loginUser.setId(loginEty.getUser().getOpen_id() + loginUser.getServiceName());
                 loginUser.setToken(loginEty.getToken());
                 loginUser.setNickname(loginEty.getUser().getNickname());
                 MyDbManager.getInstance().saveOrUpdate(loginUser);
@@ -208,41 +236,44 @@ public class TestUtil {
                     });
         }
     }
-    public static boolean isSheep(){
+
+    public static boolean isSheep() {
         return TextUtils.equals("sheep", BuildConfig.FLAVOR) && !BuildConfig.DEBUG;
     }
-    public static boolean isTest(){
+
+    public static boolean isTest() {
         return BuildConfig.DEBUG || !"sheep".equals(BuildConfig.FLAVOR);
     }
-    public static void downloadApkFromJenkins(){
+
+    public static void downloadApkFromJenkins() {
         Jump2View.getInstance().goWeb(ActivityManager.getInstance().currentActivity(), "http://10.8.210.20:8080/jenkins/job/android_small_sheep/", "从jenkins下载小绵羊安装包");
     }
 
     /**
      * 交通
-     http://mobi.yixiaozhao.jiyuonline.com/bank/10
-     http://10.8.210.172:8095/BCM_Insert.js
-
-     浦发
-     https://ecentre.spdbccc.com.cn/creditcard/indexActivity.htm?data=P754372&itemcode=2017000032
-     http://10.8.210.172:8095/SPDB_Insert.js
-
+     * http://mobi.yixiaozhao.jiyuonline.com/bank/10
+     * http://10.8.210.172:8095/BCM_Insert.js
+     * <p>
+     * 浦发
+     * https://ecentre.spdbccc.com.cn/creditcard/indexActivity.htm?data=P754372&itemcode=2017000032
+     * http://10.8.210.172:8095/SPDB_Insert.js
+     *
      * @param activity
      */
     public static void test(final Activity activity) {
-        final String[] items = {"复制token","复制打点数据","从jenkins下载小绵羊安装包","测试表情包",
-                "游戏搜索","我的关注","足迹",
-                "测试联通卡","测试联通卡2","测试签名1","测试签名2","测试孔剑秋faq正式服",
-                "跳转QQ1","跳转QQ2","跳转QQ3","跳转白白QQ","龙猫竞猜","龙猫竞猜-scheme",
-                "有米科技","手机型号测试","测试通知栏", "测试自定义通知栏","测试自定义通知栏2",
-                "开启通知栏权限0","开启通知栏权限1","开启通知栏权限2","开启通知栏权限3",
-                "开启通知栏权限","通知栏权限1","通知栏权限2","通知栏权限8.0","测试支付","测试内部h5", "测试外部h5",
-                "会长推广游戏","移动积分兑换","审核中心","检查正版","crc32","loading","progress","查看截图",
-                "复制IMEI","小米游戏","测试可用金额","测试定位信息","测试apk的渠道","幂动科技",
-                "游戏帐号","游戏代充","尝试开启第三方应用使用情况","测试代理页面","第三方应用使用情况",
-                "开启第三方应用使用情况","h5跳转","新手对话框","md5","空间不足提示框",
-                "显示已经安装应用列表","复制faq地址","复制代理地址","复制世界杯地址","任务游戏列表","世界杯活动","交通银行信用卡测试",
-                "浦发银行信用卡测试", "测试游戏模块","打卡成功提示","定向货币详情","进入绑定身份认证界面时的提示","提交身份认证时的提示", "检查标签",
+        final String[] items = {"复制token", "复制打点数据", "从jenkins下载小绵羊安装包", "测试表情包",
+                "游戏搜索", "测试bitmap", "根据原始图片生成滤镜图片", "编辑视频", "我的关注", "足迹",
+                "测试联通卡", "测试联通卡2", "测试签名1", "测试签名2", "测试孔剑秋faq正式服",
+                "跳转QQ1", "跳转QQ2", "跳转QQ3", "跳转白白QQ", "龙猫竞猜", "龙猫竞猜-scheme",
+                "有米科技", "手机型号测试", "测试通知栏", "测试自定义通知栏", "测试自定义通知栏2",
+                "开启通知栏权限0", "开启通知栏权限1", "开启通知栏权限2", "开启通知栏权限3",
+                "开启通知栏权限", "通知栏权限1", "通知栏权限2", "通知栏权限8.0", "测试支付", "测试内部h5", "测试外部h5",
+                "会长推广游戏", "移动积分兑换", "审核中心", "检查正版", "crc32", "loading", "progress", "查看截图",
+                "复制IMEI", "小米游戏", "测试可用金额", "测试定位信息", "测试apk的渠道", "幂动科技",
+                "游戏帐号", "游戏代充", "尝试开启第三方应用使用情况", "测试代理页面", "第三方应用使用情况",
+                "开启第三方应用使用情况", "h5跳转", "新手对话框", "md5", "空间不足提示框",
+                "显示已经安装应用列表", "复制faq地址", "复制代理地址", "复制世界杯地址", "任务游戏列表", "世界杯活动", "交通银行信用卡测试",
+                "浦发银行信用卡测试", "测试游戏模块", "打卡成功提示", "定向货币详情", "进入绑定身份认证界面时的提示", "提交身份认证时的提示", "检查标签",
                 "友盟分享", "了解小绵羊", "提现成功"};
         AlertDialog dialog = new AlertDialog.Builder(activity).setTitle("请选择测试项目")
                 .setItems(items, new DialogInterface.OnClickListener() {
@@ -250,6 +281,15 @@ public class TestUtil {
                     @Override
                     public void onClick(DialogInterface dialog, int which) {
                         switch (items[which]) {
+                            case "测试bitmap":
+                                testBitmap();
+                                break;
+                            case "根据原始图片生成滤镜图片":
+                                testCreateFilterbleImg(ViewUtil.getNetImgByName("alter_original"));
+                                break;
+                            case "编辑视频":
+                                testEditVideo();
+                                break;
                             case "足迹":
                                 Jump2View.getInstance().goActFootPrint();
                                 break;
@@ -293,7 +333,7 @@ public class TestUtil {
                                 Intent bdIntent = new Intent();
                                 bdIntent.setAction(JPushInterface.ACTION_MESSAGE_RECEIVED);
                                 Bundle bundle = new Bundle();
-                                bundle.putString(JPushInterface.EXTRA_MESSAGE, "测试"+JPushInterface.EXTRA_MESSAGE);
+                                bundle.putString(JPushInterface.EXTRA_MESSAGE, "测试" + JPushInterface.EXTRA_MESSAGE);
                                 Map<String, Object> map = new HashMap<>();
                                 map.put("title", "测试title");
                                 map.put("msg", "测试msgggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg");
@@ -307,7 +347,7 @@ public class TestUtil {
                                 Intent bdIntent2 = new Intent();
                                 bdIntent2.setAction(JPushInterface.ACTION_MESSAGE_RECEIVED);
                                 Bundle bundle2 = new Bundle();
-                                bundle2.putString(JPushInterface.EXTRA_MESSAGE, "测试"+JPushInterface.EXTRA_MESSAGE);
+                                bundle2.putString(JPushInterface.EXTRA_MESSAGE, "测试" + JPushInterface.EXTRA_MESSAGE);
                                 Map<String, Object> map2 = new HashMap<>();
                                 map2.put("title", "测试title");
                                 map2.put("type", 71);
@@ -338,13 +378,13 @@ public class TestUtil {
                                 NotificationsUtils.goToNotificationSetting3(activity);
                                 break;
                             case "通知栏权限1":
-                                G.showToast(""+NotificationManagerCompat.from(activity).areNotificationsEnabled());
+                                G.showToast("" + NotificationManagerCompat.from(activity).areNotificationsEnabled());
                                 break;
                             case "通知栏权限2":
-                                G.showToast(""+NotificationsUtils.isNotificationEnabled(activity));
+                                G.showToast("" + NotificationsUtils.isNotificationEnabled(activity));
                                 break;
                             case "通知栏权限8.0":
-                                G.showToast(""+NotificationsUtils.isEnableV26(activity));
+                                G.showToast("" + NotificationsUtils.isEnableV26(activity));
                                 break;
                             case "测试支付":
                                 Jump2View.getInstance().goActPay(activity, "6460393611589586944", SpUtils.getToken(activity));
@@ -397,7 +437,7 @@ public class TestUtil {
                                 break;
                             case "查看截图":
                                 File root = DataUtil.getScreenShotsDir();
-                                if(!root.exists() || root.listFiles().length <= 0){
+                                if (!root.exists() || root.listFiles().length <= 0) {
                                     G.showToast("暂无截图");
                                 } else {
                                     File dir = DataUtil.getScreenShotsDir().listFiles()[0];
@@ -425,7 +465,7 @@ public class TestUtil {
                                 break;
                             case "测试可用金额":
                                 CommonUtil.getInstance()
-                                        .getVoucherAndRatio(activity, 115+"", new Action1<BaseMessage>() {
+                                        .getVoucherAndRatio(activity, 115 + "", new Action1<BaseMessage>() {
                                             @Override
                                             public void call(BaseMessage baseMessage) {
 
@@ -448,7 +488,7 @@ public class TestUtil {
                                 Jump2View.getInstance().goGameSearch(activity, null);
                                 break;
                             case "测试代理页面":
-                                CommonUtil.getInstance().initUrlConfigByNet("agenturl", new Action1<String>(){
+                                CommonUtil.getInstance().initUrlConfigByNet("agenturl", new Action1<String>() {
                                     @Override
                                     public void call(String url) {
                                         Jump2View.getInstance().goWeb(activity, url, "代理服务");
@@ -486,7 +526,7 @@ public class TestUtil {
                                 break;
                             case "复制IMEI":
                                 StringUtils.CopyText(new DeviceUtils(activity).getIMEI());
-                                G.showToast(TimeUtil.newInstance().getDayBegin() + "|" + TimeUtil.newInstance().big2Today("2018-07-27",TimeUtil.FORMAT_DD_LINE));
+                                G.showToast(TimeUtil.newInstance().getDayBegin() + "|" + TimeUtil.newInstance().big2Today("2018-07-27", TimeUtil.FORMAT_DD_LINE));
                                 break;
                             case "复制faq地址":
                                 copyUrl("faqurl");
@@ -537,7 +577,7 @@ public class TestUtil {
                                         .setMsgGravity(Gravity.START).setMsgIndent(2).setBtnLeftText("确定"));
                                 break;
                             case "提交身份认证时的提示":
-                                ViewUtil.showMsgDialog(activity, new DialogConfig().setTitle("重要提示").setMsgMore(String.format(Locale.CHINA,"你已执行%d次实名认证操作", 0))
+                                ViewUtil.showMsgDialog(activity, new DialogConfig().setTitle("重要提示").setMsgMore(String.format(Locale.CHINA, "你已执行%d次实名认证操作", 0))
                                         .setMsg("实名认证首次免费。请务必确认您所提交的认证信息真实有效。若因信息填写错误造成认证失败。再次申请认证时需扣除您0.5绵羊币/次作为认证费用,请务必谨慎填写认证信息。")
                                         .setMsgColor("0.5绵羊币/次", "#FF0000")
                                         .setMsgIndent(2)
@@ -573,6 +613,82 @@ public class TestUtil {
         dialog.show();
     }
 
+    //根据原始图片生成滤镜图片
+    private static void testBitmap() {
+        Bitmap bmp = BitmapFactory.decodeResource(SheepApp.getInstance().getResources(), R.drawable.icon_lj);
+        Bitmap result = Bitmap.createBitmap(G.WIDTH, G.HEIGHT, Bitmap.Config.ARGB_4444);
+        Canvas canvas = new Canvas(result);
+        Paint paint = new Paint();
+        Matrix matrix = new Matrix();
+        matrix.setTranslate(G.getRealPix(100), G.getRealPix(100));
+        canvas.drawBitmap(bmp, matrix, paint);
+        ViewUtil.saveImage(result, ClassFileHelper.DIR, String.valueOf(System.currentTimeMillis()) + ".png");
+    }
+
+    //根据原始图片生成滤镜图片
+    private static void testCreateFilterbleImg(String url) {
+        CacheImageUtil.cacheAndLoadImg(url, new Action1<File>() {
+            @Override
+            public void call(File file) {
+                Observable.just(file)
+                        .flatMap(new Function<File, ObservableSource<Bitmap>>() {
+                            @Override
+                            public ObservableSource<Bitmap> apply(File file) throws Exception {
+                                Bitmap src = BitmapFactory.decodeFile(file.getAbsolutePath());
+//                                ViewUtil.saveImage(src, ClassFileHelper.DIR, String.valueOf(System.currentTimeMillis()) + ".png");
+                                return Observable.just(src);
+                            }
+                        })
+                        .subscribeOn(Schedulers.io())
+                        .flatMap(new Function<Bitmap, Observable<Integer>>() {
+                            @Override
+                            public Observable<Integer> apply(final Bitmap src) throws Exception {
+                                List<IFilter> list = ColorBalanceFilter.getDefaultFilterList();
+                                ListUtil.forEach(list, new Action1<IFilter>() {
+                                    @Override
+                                    public void call(IFilter filter) {
+                                        Bitmap dstImage = CGENativeLibrary.filterImage_MultipleEffects(src, filter.getConfig(), 1.0f);
+                                        ViewUtil.saveImage(dstImage, ClassFileHelper.DIR, String.valueOf(System.currentTimeMillis()) + ".png");
+                                        dstImage.recycle();
+                                    }
+                                });
+                                src.recycle();
+                                return Observable.just(list.size());
+                            }
+                        })
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new AbsObserver<Integer>() {
+                            @Override
+                            public void onNext(Integer integer) {
+                                G.showToast(String.valueOf(integer));
+                            }
+                        });
+            }
+        });
+
+    }
+
+    private static void testEditVideo() {
+        Observable.create(new ObservableOnSubscribe<MediaBean>() {
+            @Override
+            public void subscribe(ObservableEmitter<MediaBean> emitter) throws Exception {
+                List<MediaBean> mediaBeanList = MediaUtils.getMediaWithVideoList(SheepApp.getInstance(), 1, 1);
+                MediaBean item = ListUtil.getItem(mediaBeanList, 0);
+                emitter.onNext(item);
+            }
+        })
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new AbsObserver<MediaBean>() {
+                    @Override
+                    public void onNext(MediaBean mediaBean) {
+                        Jump2View.getInstance().goActEditVideo(Video.from(mediaBean));
+                    }
+                });
+
+    }
+
     private static void testApkSign2() {
         LogUtil.println("测试签名", ApkUtils.getApkSignMd5StrByPath(new File(DIR, "559E2C4A81182E2674570B4AE3C9C440.apk").getAbsolutePath(), null));
     }
@@ -587,7 +703,7 @@ public class TestUtil {
         String id = "my_channel_01";
         String name = activity.getString(R.string.app_name);
         NotificationManager notificationManager = (NotificationManager) activity.getSystemService(NOTIFICATION_SERVICE);
-        if(notificationManager != null) {
+        if (notificationManager != null) {
             Notification notification;
             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
                 NotificationChannel mChannel = new NotificationChannel(id, name, NotificationManager.IMPORTANCE_HIGH);
@@ -610,7 +726,7 @@ public class TestUtil {
 
 
     private static void copyUrl(final String name) {
-        CommonUtil.getInstance().initUrlConfigByNet(name, new Action1<String>(){
+        CommonUtil.getInstance().initUrlConfigByNet(name, new Action1<String>() {
             @Override
             public void call(String url) {
                 StringUtils.CopyText(ActWeb.addUrlToken(url));
@@ -631,7 +747,7 @@ public class TestUtil {
     /**
      * umen 分享
      */
-    private void testUmen(Activity context){
+    private void testUmen(Activity context) {
         UMImage umImage = new UMImage(context, R.mipmap.icon);
         new ShareAction(context)
                 .withText("hehe")
@@ -642,29 +758,30 @@ public class TestUtil {
                 .setCallback(new UMShareListener() {
                     @Override
                     public void onStart(SHARE_MEDIA share_media) {
-                        Log.e("start---"+share_media.getName(), share_media.getName());
+                        Log.e("start---" + share_media.getName(), share_media.getName());
                     }
 
                     @Override
                     public void onResult(SHARE_MEDIA share_media) {
-                        Log.e("result---"+share_media.getName(), share_media.getName());
+                        Log.e("result---" + share_media.getName(), share_media.getName());
                     }
 
                     @Override
                     public void onError(SHARE_MEDIA share_media, Throwable throwable) {
-                        Log.e("error---"+share_media.getName(), share_media.getName()+
-                                ",msg:"+ throwable.getMessage());
+                        Log.e("error---" + share_media.getName(), share_media.getName() +
+                                ",msg:" + throwable.getMessage());
                     }
 
                     @Override
                     public void onCancel(SHARE_MEDIA share_media) {
-                        Log.e("delete---"+share_media.getName(), share_media.getName());
+                        Log.e("delete---" + share_media.getName(), share_media.getName());
                     }
                 })
                 .open();
     }
 
     private static final String URL_START = "http://10.8.210.20:8080/jenkins/job/android_small_sheep/";
+
     //通过jenkins服务器打包结果进行检查更新
     public static void checkUpdateFromJenkins(final Activity activity, final String ignoreMd5, final Action1<Integer> action1) {
         //加载jenkins信息来判断是否当前安装的是最新的安装包
@@ -688,7 +805,7 @@ public class TestUtil {
                         }
                     });
                     int index = 0;
-                    switch (BuildConfig.FLAVOR){
+                    switch (BuildConfig.FLAVOR) {
                         case "developSheeptest":
                             index = BuildConfig.DEBUG ? 0 : 1;
                             break;
@@ -712,20 +829,20 @@ public class TestUtil {
     //下载apk文件后检查是否是最新的
     private static void downloadApkAndCheckInstall(final String url, final Action1<Integer> action1) {
         String name = Uri.parse(url).getLastPathSegment();
-        if(name == null){
+        if (name == null) {
             name = url.hashCode() + ".apk";
         }
         PackageInfo packageInfo = ApkUtils.getPackageInfo(BuildConfig.APPLICATION_ID);
-        if(packageInfo == null)
+        if (packageInfo == null)
             return;
         final File myApkFile = new File(packageInfo.applicationInfo.sourceDir);
         final File file = new File(DIR, name);
         if (file.exists()) {
             if (Md5Util.checkMD5(myApkFile, file)) {
-                if(action1 == null)
+                if (action1 == null)
                     G.showToast("应用已经是最新版本");
             } else {
-                if(action1 == null)
+                if (action1 == null)
                     G.showToast("文件已经存在,正在安装");
                 ApkUtils.installApk(SheepApp.getInstance(), file.getAbsolutePath());
             }
@@ -734,25 +851,25 @@ public class TestUtil {
         OkHttpUtils.get().url(url).build().execute(new FileCallBack(DIR, name) {
             @Override
             public void inProgress(float progress, long total, int id) {
-                if(action1 == null)
+                if (action1 == null)
                     G.showToast(String.format(Locale.CHINA, "%d%%", Math.round(progress * 100)));
             }
 
             @Override
             public void onError(Call call, Exception e, int id) {
-                if(action1 == null)
+                if (action1 == null)
                     G.showToast("下载失败");
             }
 
             @Override
             public void onResponse(File response, int id) {
-                if(action1 == null)
+                if (action1 == null)
                     G.showToast("下载完成");
                 if (response.exists()) {
-                    if(action1 == null)
+                    if (action1 == null)
                         G.showToast("文件已经是最新");
                     if (Md5Util.checkMD5(myApkFile, response)) {
-                        if(action1 == null)
+                        if (action1 == null)
                             G.showToast("应用已经是最新");
                     } else {
                         ApkUtils.installApk(SheepApp.getInstance(), response.getAbsolutePath());
@@ -761,6 +878,7 @@ public class TestUtil {
             }
         });
     }
+
     //开启后可 测试充值与绑定微信和身份信息逻辑 等
     public static boolean isDev() {
         return BuildConfig.DEBUG;

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

@@ -10,6 +10,7 @@ import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
 import android.graphics.Canvas;
 import android.graphics.Color;
 import android.graphics.drawable.BitmapDrawable;
@@ -19,6 +20,7 @@ import android.net.Uri;
 import android.os.Build;
 import android.provider.MediaStore;
 import android.support.annotation.LayoutRes;
+import android.support.annotation.Nullable;
 import android.support.annotation.StringRes;
 import android.support.v4.app.FragmentActivity;
 import android.support.v7.app.AlertDialog;
@@ -52,6 +54,9 @@ import android.widget.VideoView;
 import com.bumptech.glide.Glide;
 import com.bumptech.glide.RequestBuilder;
 import com.bumptech.glide.request.RequestOptions;
+import com.bumptech.glide.request.target.ImageViewTarget;
+import com.bumptech.glide.request.target.SimpleTarget;
+import com.bumptech.glide.request.transition.Transition;
 import com.jcodecraeer.xrecyclerview.CustomFooterViewCallBack;
 import com.jcodecraeer.xrecyclerview.XRecyclerView;
 import com.kfzs.duanduan.utils.NumberFormatUtils;
@@ -62,6 +67,8 @@ import com.sheep.gamegroup.absBase.IContentTypeContainer;
 import com.sheep.gamegroup.absBase.ITag;
 import com.sheep.gamegroup.dateview.DatePickerDialog;
 import com.sheep.gamegroup.dateview.DateUtil;
+import com.sheep.gamegroup.find.bean.ColorBalanceFilter;
+import com.sheep.gamegroup.find.bean.IFilter;
 import com.sheep.gamegroup.model.entity.Advertising;
 import com.sheep.gamegroup.model.entity.Container;
 import com.sheep.gamegroup.model.entity.DialogConfig;
@@ -71,8 +78,10 @@ import com.sheep.gamegroup.model.entity.Lp;
 import com.sheep.gamegroup.model.entity.PayEntity;
 import com.sheep.gamegroup.model.entity.RobTask;
 import com.sheep.gamegroup.model.entity.TaskEty;
+import com.sheep.gamegroup.util.glide.FilterTransform;
 import com.sheep.gamegroup.util.glide.RoundedCornersTransformation;
 import com.sheep.gamegroup.util.share.ShareLinkConfig;
+import com.sheep.gamegroup.util.viewHelper.CacheImageUtil;
 import com.sheep.gamegroup.util.viewHelper.LayoutParamsUtil;
 import com.sheep.gamegroup.view.activity.ActMain;
 import com.sheep.gamegroup.view.activity.PersonalInfoAct;
@@ -101,6 +110,7 @@ import com.umeng.socialize.media.UMImage;
 import com.umeng.socialize.media.UMWeb;
 
 import org.afinal.simplecache.ACache;
+import org.wysaid.nativePort.CGENativeLibrary;
 
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -112,8 +122,11 @@ import java.util.Map;
 import java.util.Random;
 import java.util.concurrent.TimeUnit;
 
+import io.reactivex.Observable;
+import io.reactivex.ObservableSource;
 import io.reactivex.Observer;
 import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.functions.Function;
 import io.reactivex.schedulers.Schedulers;
 import rx.functions.Action1;
 
@@ -1577,6 +1590,21 @@ public class ViewUtil {
         }
     }
 
+    //加载默认原图滤镜效果
+    public static void setImage(ImageView imageView, final IFilter filter) {
+        if (imageView != null && filter != null && filter.getConfig() != null) {
+            String url = getNetImgByName("alter_original");
+            if(filter.getConfig().isEmpty()){
+                setImage(imageView, url);
+                return;
+            }
+            Glide.with(SheepApp.getInstance())
+                    .load(url)
+                    .apply(new RequestOptions().transform(new FilterTransform(filter)))
+                    .into(imageView);
+        }
+    }
+
     public static void setImage(ImageView imageView, String pictures) {
         if (imageView != null) {
             if (TextUtils.isEmpty(pictures)) {
@@ -2057,6 +2085,9 @@ public class ViewUtil {
     public static String getNetImgByName(String name) {
         return String.format(Locale.CHINA, "http://cdngame.kuaifazs.com/%s.png", name);
     }
+    public static String getNetImgByNameAndSuffix(String name) {
+        return String.format(Locale.CHINA, "http://cdngame.kuaifazs.com/%s", name);
+    }
 
     /**
      * 标签类型(0无,1热门,2最新,3现金,4活跃,5福利,6红包)

+ 38 - 0
app/src/main/java/com/sheep/gamegroup/util/glide/FilterTransform.java

@@ -0,0 +1,38 @@
+package com.sheep.gamegroup.util.glide;
+
+import android.graphics.Bitmap;
+import android.support.annotation.NonNull;
+
+import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
+import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
+import com.sheep.gamegroup.find.bean.IFilter;
+
+import org.wysaid.nativePort.CGENativeLibrary;
+
+import java.security.MessageDigest;
+
+/**
+ * Created by realicing on 2018/12/4.
+ * realicing@sina.com
+ * 图片滤镜转化
+ */
+public class FilterTransform extends BitmapTransformation {
+
+    private IFilter filter;
+
+    public FilterTransform(IFilter filter) {
+        super();
+        this.filter = filter;
+    }
+
+    @Override
+    protected Bitmap transform(@NonNull BitmapPool pool, @NonNull Bitmap toTransform, int outWidth, int outHeight) {
+//        Bitmap dstImage = CGENativeLibrary.filterImage_MultipleEffects(toTransform, filter.getConfig(), 1.0f);
+        return CGENativeLibrary.filterImage_MultipleEffects(toTransform, filter.getConfig(), 1.0f);
+    }
+
+    @Override
+    public void updateDiskCacheKey(MessageDigest messageDigest) {
+        messageDigest.update((filter.getConfig().hashCode() + filter.getName()).getBytes(CHARSET));
+    }
+}

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

@@ -3,6 +3,7 @@ package com.sheep.gamegroup.util.js;
 import android.text.TextUtils;
 import android.webkit.JavascriptInterface;
 
+import com.sheep.gamegroup.absBase.AbsObserver;
 import com.sheep.gamegroup.util.ApiUtil;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataUtil;
@@ -220,4 +221,19 @@ public class KFZSJs {
             }
         });
     }
+
+    @JavascriptInterface
+    public void alipay(String payInfo, boolean b){
+        CommonUtil.getInstance().alipay(payInfo, b, new AbsObserver<String>() {
+            @Override
+            public void onNext(String result) {
+                activity.loadJs(String.format(Locale.CHINA, "onAlipayResult('%s')", result));
+            }
+
+            @Override
+            public void onError(Throwable e) {
+                activity.loadJs(String.format(Locale.CHINA, "onAlipayResult('%s')", e.getMessage()));
+            }
+        });
+    }
 }

+ 9 - 0
app/src/main/java/com/sheep/gamegroup/util/viewHelper/CacheImageUtil.java

@@ -18,6 +18,15 @@ import rx.functions.Action1;
  * 缓存图片工具类
  */
 public class CacheImageUtil {
+    //缓存并加载图片
+    public static void cacheAndLoadImg(String link, final Action1<File> action1){
+        String path = CacheImageUtil.getCacheImg(link);
+        if(path == null){
+            CacheImageUtil.cacheImg(link, action1);
+        } else {
+            action1.call(new File(path));
+        }
+    }
 
     //已经缓存图片
     public static String getCacheImg(String link) {

+ 6 - 4
app/src/main/java/com/sheep/gamegroup/view/activity/ActCutVideo.java

@@ -2,6 +2,7 @@ package com.sheep.gamegroup.view.activity;
 
 import android.annotation.SuppressLint;
 import android.content.Context;
+import android.content.Intent;
 import android.media.AudioManager;
 import android.media.MediaPlayer;
 import android.net.Uri;
@@ -66,7 +67,7 @@ public class ActCutVideo extends BaseContainerActivity implements MediaPlayer.On
 
     @Override
     protected int getLayoutId() {
-        return R.layout.act_edit_video;
+        return R.layout.act_cut_video;
     }
 
     public static final long MAX_VIDEO_DURATION = 15_000L;//视频最大时长,超过需要剪切
@@ -112,10 +113,10 @@ public class ActCutVideo extends BaseContainerActivity implements MediaPlayer.On
 
     //检查有没有设置剪切视频的时长
     private void checkDuration(long duration) {
-        if ((data.getDuration() - duration) >= 1000) {
-            ViewUtil.setText(edit_video_sure_tv, BTN_TEXT_FINISH);
-        } else {
+        if ((data.getDuration() - duration) >= 500) {
             ViewUtil.setText(edit_video_sure_tv, BTN_TEXT_CUT);
+        } else {
+            ViewUtil.setText(edit_video_sure_tv, BTN_TEXT_FINISH);
         }
     }
 
@@ -490,6 +491,7 @@ public class ActCutVideo extends BaseContainerActivity implements MediaPlayer.On
                         data.setWidth(video.getWidth());
                         data.setHeight(video.getHeight());
                         data.setDuration(video.getDuration());
+                        sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.parse("file://" + video.getFilePath())));
                         G.showToast("完成剪切");
                         goEditVideo();
                     }

+ 0 - 38
app/src/main/java/com/sheep/gamegroup/view/activity/ActEditVideo.java

@@ -1,38 +0,0 @@
-package com.sheep.gamegroup.view.activity;
-
-import android.net.Uri;
-import android.os.Bundle;
-import android.support.annotation.Nullable;
-
-import com.kfzs.duanduan.utils.StatusBarUtils;
-import com.sheep.gamegroup.absBase.BaseActivity;
-import com.sheep.gamegroup.model.entity.Video;
-import com.sheep.gamegroup.util.DataUtil;
-import com.sheep.jiuyan.samllsheep.R;
-
-/**
- * Created by realicing on 2018/11/9.
- * realicing@sina.com
- * 编辑视频
- */
-public class ActEditVideo extends BaseActivity {
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        StatusBarUtils.setTranslucent(this);
-        super.onCreate(savedInstanceState);
-    }
-
-    @Override
-    protected int getLayoutId() {
-        return R.layout.act_cut_video;
-    }
-
-    private Video data;
-
-    @Override
-    public void initView() {
-        data = DataUtil.getObject(getIntent(), Video.class);
-        Uri uri = Uri.parse(data.getFilePath());
-    }
-}

+ 13 - 10
app/src/main/java/com/sheep/gamegroup/view/activity/ActPlayVideoArticle.java

@@ -19,6 +19,7 @@ import android.widget.MediaController;
 import android.widget.TextView;
 import android.widget.VideoView;
 
+import com.kfzs.duanduan.utils.NumberFormatUtils;
 import com.kfzs.duanduan.utils.StatusBarUtils;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.absBase.IRefresh;
@@ -111,21 +112,23 @@ public class ActPlayVideoArticle extends BaseActivity implements MediaPlayer.OnI
         ViewUtil.setImage(video_camera_iv, ViewUtil.getNetImgByName("add_article_camera"));
     }
 
-    private void loadVideoData(DiscoveryVideo video) {
-        if (video == null) {
+    private void loadVideoData(DiscoveryVideo discoveryVideo) {
+        if (discoveryVideo == null) {
             ViewUtil.setText(video_like_tv, ViewUtil.BLOCK);
             ViewUtil.setText(video_comment_tv, ViewUtil.BLOCK);
             ViewUtil.setText(video_title_tv, ViewUtil.BLOCK);
             ViewUtil.setText(video_share_tv, ViewUtil.BLOCK);
+            ViewUtil.setVisibility2(video_focus_iv, false);
             return;
         }
-        ViewUtil.setAvatar(video_avatar_iv, video.getAvatar());
-        ViewUtil.setText(video_like_tv, video.getLike());
-        ViewUtil.setText(video_comment_tv, video.getComment());
-        ViewUtil.setText(video_title_tv, video.getTitle());
-        ViewUtil.setText(video_share_tv, video.getShare());
-        ViewUtil.setChecked(video_like_tv, video.getIs_like());
-        ViewUtil.setChecked(video_focus_iv, video.getIs_like());
+        ViewUtil.setAvatar(video_avatar_iv, discoveryVideo.getAvatar());
+        ViewUtil.setText(video_like_tv, discoveryVideo.getLike());
+        ViewUtil.setText(video_comment_tv, discoveryVideo.getComment());
+        ViewUtil.setText(video_title_tv, discoveryVideo.getTitle());
+        ViewUtil.setText(video_share_tv, discoveryVideo.getShare());
+        ViewUtil.setChecked(video_like_tv, discoveryVideo.getIs_like());
+        ViewUtil.setVisibility2(video_focus_iv, !DataUtil.getInstance().isMe(discoveryVideo.getUser_id()));
+        ViewUtil.setChecked(video_focus_iv, discoveryVideo.getIs_like());
     }
 
     private void initPlay() {
@@ -186,7 +189,7 @@ public class ActPlayVideoArticle extends BaseActivity implements MediaPlayer.OnI
         if (newVideo != null) {
             shareLinkConfig.setDes(newVideo.getTitle());
         }
-        shareLinkConfig.toShare(this, new CommonUMShareListener() {
+        shareLinkConfig.setShareType(ShareLinkConfig.ALL).toShare(this, new CommonUMShareListener() {
             @Override
             public void onResult(SHARE_MEDIA share_media) {
                 ApiUtil.postVideoShare(video_id);

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

@@ -43,7 +43,7 @@ public class FgtArticleVideo extends BaseListFragment2<DiscoveryVideo> {
 
     @Override
     protected String getKey(int page, int per_page) {
-        return ApiKey.pageKeyUrl(ApiKey.getVideoList, page, per_page);
+        return ApiKey.pageKeyUrl2(ApiKey.getVideoList, page, per_page);
     }
 
     @Override

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

@@ -37,7 +37,7 @@ import io.reactivex.Observable;
 /**
  * Created by realicing on 2018/11/2.
  * realicing@sina.com
- * 用户评论列表界面
+ * 小绵羊3.4.5新增 -- 视频详情--用户评论列表界面
  */
 public class FgtVideoComment extends BaseListFragment4<UserComment> {
 

+ 49 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java

@@ -3,6 +3,9 @@ package com.sheep.jiuyan.samllsheep;
 import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
+import android.content.res.AssetManager;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.StrictMode;
@@ -10,6 +13,7 @@ import android.support.multidex.MultiDex;
 import android.support.multidex.MultiDexApplication;
 import android.text.TextUtils;
 import android.util.DisplayMetrics;
+import android.util.Log;
 
 import com.baidu.location.BDAbstractLocationListener;
 import com.baidu.location.BDLocation;
@@ -37,7 +41,10 @@ import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.MyFileNameGenerator;
 import com.sheep.gamegroup.util.RefreshUtil;
 import com.sheep.gamegroup.util.SysAppUtil;
+import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.UMConfigUtils;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.util.viewHelper.CacheImageUtil;
 import com.sheep.gamegroup.view.activity.GameCertificationActivity;
 import com.sheep.gamegroup.view.activity.LoginAct;
 import com.sheep.jiuyan.samllsheep.service.AutoCheckService;
@@ -55,8 +62,13 @@ import com.umeng.socialize.PlatformConfig;
 import com.umeng.socialize.UMShareAPI;
 import com.youmi.android.offer.YmConfig;
 
+import org.wysaid.common.Common;
+import org.wysaid.nativePort.CGENativeLibrary;
 import org.xutils.x;
 
+import java.io.IOException;
+import java.io.InputStream;
+
 import cn.jpush.android.api.JPushInterface;
 
 /**
@@ -259,7 +271,44 @@ public class SheepApp extends MultiDexApplication {
         DownloadDispatcher.setMaxParallelRunningCount(1000);//在这里,下载框架好像有个bug,如果设置为5,第一个下载会占4个,第二个下载就只有一个在下载,就会失败
 
 //        RemitStoreOnSQLite.setRemitToDBDelayMillis(3000);
+        if(TestUtil.isDev())
+            initCgeLibrary();
+    }
+
+    private void initCgeLibrary() {
+        //The second param will be passed as the second arg of the callback function.
+        //第二个参数根据自身需要设置, 将作为 loadImage 第二个参数回传
+        CGENativeLibrary.setLoadImageCallback(mLoadImageCallback, null);
+        for (String name : CGE_FILTER_IMGS) {
+            CacheImageUtil.cacheImg(ViewUtil.getNetImgByNameAndSuffix(name), null);
+        }
     }
+    public static final String[] CGE_FILTER_IMGS = {"edgy_amber.png", "filmstock.png", "foggy_night.png", "late_sunset.png", "soft_warming.png", "wildbird.png", "hehe.jpg", "mapping0.jpg"};
+    public CGENativeLibrary.LoadImageCallback mLoadImageCallback = new CGENativeLibrary.LoadImageCallback() {
+
+        //Notice: the 'name' passed in is just what you write in the rule, e.g: 1.jpg
+        //注意, 这里回传的name不包含任何路径名, 仅为具体的图片文件名如 1.jpg
+        @Override
+        public Bitmap loadImage(String name, Object arg) {
+            String path = CacheImageUtil.getCacheImg(ViewUtil.getNetImgByNameAndSuffix(name));
+            if (path != null) {
+                return BitmapFactory.decodeFile(path);
+            }
+            return null;
+        }
+
+        @Override
+        public void loadImageOK(Bitmap bmp, Object arg) {
+            Log.i(Common.LOG_TAG, "Loading bitmap over, you can choose to recycle or cache");
+
+            //The bitmap is which you returned at 'loadImage'.
+            //You can call recycle when this function is called, or just keep it for further usage.
+            //唯一不需要马上recycle的应用场景为 多个不同的滤镜都使用到相同的bitmap
+            //那么可以选择缓存起来。
+            bmp.recycle();
+        }
+    };
+
     private void initBdLocationOption() {
         mLocationClient = new LocationClient(getApplicationContext());
         //声明LocationClient类

+ 3 - 0
app/src/main/java/org/afinal/simplecache/ApiKey.java

@@ -73,6 +73,9 @@ public class ApiKey {
     public static final String pageKeyUrl(String baseUrl, int page, int per_page){
         return String.format(Locale.CHINA, "%s?page=%d&per_page=%d", baseUrl, page, per_page);
     }
+    public static final String pageKeyUrl2(String baseUrl, int page, int per_page){
+        return String.format(Locale.CHINA, "%s?page_no=%d&page_size=%d", baseUrl, page, per_page);
+    }
 
     public static String release_task(int page, int per_page, int about_to_begin, String task_type, int is_succession) {
         task_type = task_type.replaceAll(",", "%2C");

+ 9 - 0
app/src/main/res/color/selector_color_white_40.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_activated="true" android:color="@color/white" />
+    <item android:state_focused="true" android:color="@color/white" />
+    <item android:state_checked="true" android:color="@color/white"/>
+    <item android:state_selected="true" android:color="@color/white"/>
+    <item android:state_pressed="true" android:color="@color/white"/>
+    <item android:color="@color/white_40"/>
+</selector>

+ 9 - 0
app/src/main/res/drawable/shape_black_solid_rectangle_top_6.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <corners
+        android:topLeftRadius="6dp"
+        android:topRightRadius="6dp" />
+    <solid android:color="#000000" />
+
+</shape>

+ 5 - 0
app/src/main/res/drawable/shape_oval_main.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="oval">
+    <solid android:color="@color/btn_color_main_stroke" />
+</shape>

+ 100 - 1
app/src/main/res/layout/act_cut_video.xml

@@ -5,6 +5,105 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="#000000"
-    tools:context="com.sheep.gamegroup.view.activity.ActEditVideo">
+    tools:context="com.sheep.gamegroup.view.activity.ActCutVideo">
 
+    <VideoView
+        android:id="@+id/videoView"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="#99000000" />
+
+    <com.github.ybq.android.spinkit.SpinKitView
+        android:id="@+id/video_loading"
+        style="@style/SpinKitView.Large.ThreeBounce"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        app:SpinKit_Color="@color/colorAccent"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <ImageView
+        android:id="@+id/video_back_iv"
+        android:layout_width="?attr/actionBarSize"
+        android:layout_height="?attr/actionBarSize"
+        android:layout_marginTop="20dp"
+        android:onClick="onClickBackImg"
+        android:scaleType="centerInside"
+        android:src="@drawable/narrow_back_white"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/edit_video_topic_tv"
+        android:layout_width="0dp"
+        android:layout_height="30dp"
+        android:background="@drawable/shape_white_20_solid_rectangle_15"
+        android:gravity="center|start"
+        android:maxLength="100"
+        android:onClick="onClickTopic"
+        android:paddingStart="18dp"
+        android:paddingEnd="18dp"
+        android:text="#添加话题#"
+        android:textColor="#FEFFFF"
+        android:textSize="13sp"
+        app:layout_constraintBottom_toBottomOf="@id/video_back_iv"
+        app:layout_constraintEnd_toStartOf="@id/edit_video_sure_tv"
+        app:layout_constraintStart_toEndOf="@id/video_back_iv"
+        app:layout_constraintTop_toTopOf="@id/video_back_iv" />
+
+    <TextView
+        android:id="@+id/edit_video_sure_tv"
+        android:layout_width="75dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="31dp"
+        android:layout_marginEnd="16dp"
+        android:background="@drawable/selector_button_full_main"
+        android:gravity="center"
+        android:onClick="onClickSure"
+        android:paddingTop="6dp"
+        android:paddingBottom="6dp"
+        android:text="下一步"
+        android:textColor="#FEFFFF"
+        android:textSize="15sp"
+        app:layout_constraintBottom_toBottomOf="@id/video_back_iv"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/edit_video_topic_tv"
+        app:layout_constraintTop_toTopOf="@id/video_back_iv" />
+
+    <FrameLayout
+        android:id="@+id/frame_container"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_marginTop="27dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/edit_video_topic_tv" />
+
+    <com.sheep.gamegroup.view.customview.VideoFramesView
+        android:id="@+id/videoFramesView"
+        android:layout_width="match_parent"
+        android:layout_height="69dp"
+        android:layout_marginStart="36dp"
+        android:layout_marginEnd="36dp"
+        android:layout_marginBottom="17dp"
+        app:layout_constraintBottom_toBottomOf="parent" />
+
+    <TextView
+        android:id="@+id/edit_video_time_tv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="15dp"
+        android:layout_marginBottom="100dp"
+        android:text="@string/has_choose_x_second"
+        android:textColor="#ffffffff"
+        android:textSize="12sp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintStart_toStartOf="parent" />
 </android.support.constraint.ConstraintLayout>

+ 67 - 90
app/src/main/res/layout/act_edit_video.xml

@@ -1,109 +1,86 @@
 <?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"
-    xmlns:tools="http://schemas.android.com/tools"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="#000000"
-    tools:context="com.sheep.gamegroup.view.activity.ActEditVideo">
+    xmlns:tools="http://schemas.android.com/tools"
+    tools:context="com.sheep.gamegroup.find.activity.ActEditVideo">
 
-    <VideoView
-        android:id="@+id/videoView"
+    <FrameLayout
+        android:id="@+id/glviewFrameLayout"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
+        android:layout_height="match_parent">
 
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="#99000000" />
+        <org.wysaid.view.VideoPlayerGLSurfaceView
+            android:id="@+id/videoGLSurfaceView"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+    </FrameLayout>
 
-    <com.github.ybq.android.spinkit.SpinKitView
-        android:id="@+id/video_loading"
-        style="@style/SpinKitView.Large.ThreeBounce"
-        android:layout_width="wrap_content"
+    <HorizontalScrollView
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        app:SpinKit_Color="@color/colorAccent"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
+        android:layout_alignParentBottom="true"
+        android:visibility="gone">
 
-    <ImageView
-        android:id="@+id/video_back_iv"
-        android:layout_width="?attr/actionBarSize"
-        android:layout_height="?attr/actionBarSize"
-        android:layout_marginTop="20dp"
-        android:onClick="onClickBackImg"
-        android:scaleType="centerInside"
-        android:src="@drawable/narrow_back_white"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
+        <LinearLayout
+            android:id="@+id/menuLinearLayout"
+            android:layout_width="wrap_content"
+            android:layout_height="50dp"
+            android:visibility="gone">
 
-    <TextView
-        android:id="@+id/edit_video_topic_tv"
-        android:layout_width="0dp"
-        android:layout_height="30dp"
-        android:background="@drawable/shape_white_20_solid_rectangle_15"
-        android:gravity="center|start"
-        android:maxLength="100"
-        android:onClick="onClickTopic"
-        android:paddingStart="18dp"
-        android:paddingEnd="18dp"
-        android:text="#添加话题#"
-        android:textColor="#FEFFFF"
-        android:textSize="13sp"
-        app:layout_constraintBottom_toBottomOf="@id/video_back_iv"
-        app:layout_constraintEnd_toStartOf="@id/edit_video_sure_tv"
-        app:layout_constraintStart_toEndOf="@id/video_back_iv"
-        app:layout_constraintTop_toTopOf="@id/video_back_iv" />
+            <Button
+                android:id="@+id/galleryBtn"
+                android:layout_width="100dp"
+                android:layout_height="50dp"
+                android:text="Gallery" />
 
-    <TextView
-        android:id="@+id/edit_video_sure_tv"
-        android:layout_width="75dp"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="31dp"
-        android:layout_marginEnd="16dp"
-        android:background="@drawable/selector_button_full_main"
-        android:gravity="center"
-        android:onClick="onClickSure"
-        android:paddingTop="6dp"
-        android:paddingBottom="6dp"
-        android:text="下一步"
-        android:textColor="#FEFFFF"
-        android:textSize="15sp"
-        app:layout_constraintBottom_toBottomOf="@id/video_back_iv"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toEndOf="@id/edit_video_topic_tv"
-        app:layout_constraintTop_toTopOf="@id/video_back_iv" />
+            <Button
+                android:id="@+id/takeShotBtn"
+                android:layout_width="100dp"
+                android:layout_height="match_parent"
+                android:text="TakeShot" />
+
+            <Button
+                android:id="@+id/switchShapeBtn"
+                android:layout_width="100dp"
+                android:layout_height="match_parent"
+                android:text="Border" />
+
+            <Button
+                android:id="@+id/fitViewBtn"
+                android:layout_width="100dp"
+                android:layout_height="match_parent"
+                android:text="FitScreen" />
+
+        </LinearLayout>
+    </HorizontalScrollView>
 
     <FrameLayout
         android:id="@+id/frame_container"
         android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_marginTop="27dp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintTop_toBottomOf="@id/edit_video_topic_tv" />
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true" />
 
-    <com.sheep.gamegroup.view.customview.VideoFramesView
-        android:id="@+id/videoFramesView"
-        android:layout_width="match_parent"
-        android:layout_height="69dp"
-        android:layout_marginStart="36dp"
-        android:layout_marginEnd="36dp"
-        android:layout_marginBottom="17dp"
-        app:layout_constraintBottom_toBottomOf="parent" />
 
-    <TextView
-        android:id="@+id/edit_video_time_tv"
+    <LinearLayout
+        android:id="@+id/seekBarLl"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginStart="15dp"
-        android:layout_marginBottom="100dp"
-        android:text="@string/has_choose_x_second"
-        android:textColor="#ffffffff"
-        android:textSize="12sp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="parent" />
-</android.support.constraint.ConstraintLayout>
+        android:layout_alignParentBottom="true"
+        android:layout_marginBottom="40dp"
+        android:orientation="vertical"
+        android:visibility="gone" />
+
+    <ImageView
+        android:id="@+id/act_edit_video_commit_iv"
+        android:layout_width="30dp"
+        android:layout_height="30dp"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentEnd="true"
+        android:onClick="onClickCommit"
+        android:layout_marginTop="27dp"
+        android:layout_marginEnd="16dp"
+        android:background="@drawable/shape_oval_main"
+        android:padding="5dp"
+        android:src="@drawable/qiandao" />
+</RelativeLayout>

+ 80 - 0
app/src/main/res/layout/fgt_choose_edit_list.xml

@@ -0,0 +1,80 @@
+<?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"
+    android:background="@drawable/shape_black_solid_rectangle_top_6">
+
+    <LinearLayout
+        android:id="@+id/fgt_choose_edit_list_ll"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintBottom_toBottomOf="parent">
+
+        <CheckedTextView
+            android:id="@+id/fgt_choose_edit_filter_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:checked="true"
+            android:gravity="center"
+            android:paddingTop="18dp"
+            android:paddingBottom="18dp"
+            android:text="滤镜"
+            android:textAlignment="center"
+            android:textColor="@color/selector_color_white_40"
+            android:textSize="15sp" />
+
+        <CheckedTextView
+            android:id="@+id/fgt_choose_edit_buffing_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:gravity="center"
+            android:paddingTop="18dp"
+            android:paddingBottom="18dp"
+            android:text="磨皮"
+            android:textAlignment="center"
+            android:textColor="@color/selector_color_white_40"
+            android:textSize="15sp" />
+
+        <CheckedTextView
+            android:id="@+id/fgt_choose_edit_warping_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:gravity="center"
+            android:paddingTop="18dp"
+            android:paddingBottom="18dp"
+            android:text="大眼瘦脸"
+            android:textAlignment="center"
+            android:textColor="@color/selector_color_white_40"
+            android:textSize="15sp" />
+    </LinearLayout>
+
+    <View
+        android:id="@+id/fgt_choose_edit_line_v"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="#545454"
+        app:layout_constraintBottom_toTopOf="@id/fgt_choose_edit_list_ll" />
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/recyclerView"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingStart="11dp"
+        android:paddingEnd="11dp"
+        app:layout_constraintBottom_toTopOf="@id/fgt_choose_edit_line_v" />
+
+    <SeekBar
+        android:id="@+id/fgt_choose_edit_intensity_sb"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
+        android:max="100"
+        android:progress="100"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintBottom_toTopOf="@id/recyclerView"/>
+</android.support.constraint.ConstraintLayout>

+ 27 - 0
app/src/main/res/layout/item_tv_iv.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+
+    <TextView
+        android:id="@+id/item_tv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:paddingTop="20dp"
+        android:paddingBottom="10dp"
+        android:text="@string/app_name"
+        android:textColor="#ffffffff"
+        android:textSize="12sp" />
+
+    <ImageView
+        android:id="@+id/item_iv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingStart="5dp"
+        android:paddingEnd="5dp"
+        android:adjustViewBounds="true"
+        android:paddingBottom="20dp"
+        android:scaleType="fitXY" />
+</LinearLayout>

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

@@ -10,5 +10,6 @@
     <color name="B">#000000</color>
     <color name="main_tab_activated">#32b2ed</color>
     <color name="main_tab">#AFAFAF</color>
+    <color name="white_40">#66ffffff</color>
 
 </resources>