Explorar o código

Merge branch 'sheep_develop' of 10.8.230.114:xmy_android/small_sheep_android into sheep_develop

hanjing %!s(int64=7) %!d(string=hai) anos
pai
achega
8f6e5505b4
Modificáronse 27 ficheiros con 646 adicións e 313 borrados
  1. 7 0
      app/src/main/java/com/sheep/gamegroup/model/entity/DiscoveryVideo.java
  2. 2 2
      app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java
  3. 19 9
      app/src/main/java/com/sheep/gamegroup/view/activity/ActVideoDetail.java
  4. 1 1
      app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java
  5. 10 0
      media/app/build.gradle
  6. 30 4
      media/app/src/main/java/com/kfzs/cfyl/media/activity/ActEditVideo.java
  7. 23 2
      media/app/src/main/java/com/kfzs/cfyl/media/activity/MainActivity.java
  8. 30 0
      media/app/src/main/java/com/kfzs/cfyl/media/adapter/ViewPagerFragmentAdapter.java
  9. 10 0
      media/app/src/main/java/com/kfzs/cfyl/media/api/Levelble.java
  10. 5 1
      media/app/src/main/java/com/kfzs/cfyl/media/bean/BeautifyFilter.java
  11. 41 0
      media/app/src/main/java/com/kfzs/cfyl/media/customview/NoScrollViewPager.java
  12. 48 183
      media/app/src/main/java/com/kfzs/cfyl/media/fragment/FgtChooseEditList.java
  13. 213 0
      media/app/src/main/java/com/kfzs/cfyl/media/fragment/FgtChooseFilterList.java
  14. 97 0
      media/app/src/main/java/com/kfzs/cfyl/media/fragment/FgtChooseLevelList.java
  15. 6 0
      media/app/src/main/java/com/kfzs/cfyl/media/util/ViewUtil.java
  16. 9 0
      media/app/src/main/res/color/selector_color_white_black.xml
  17. 9 0
      media/app/src/main/res/drawable/selector_oval_red_white.xml
  18. 0 0
      media/app/src/main/res/drawable/shape_black_solid_rectangle_top_6.xml
  19. 7 0
      media/app/src/main/res/drawable/shape_oval_red.xml
  20. 7 0
      media/app/src/main/res/drawable/shape_oval_white.xml
  21. 2 2
      media/app/src/main/res/layout/act_edit_video.xml
  22. 0 80
      media/app/src/main/res/layout/fgt_choose_edit_list.xml
  23. 23 0
      media/app/src/main/res/layout/fgt_choose_filter_list.xml
  24. 12 0
      media/app/src/main/res/layout/fgt_choose_level_list.xml
  25. 16 0
      media/app/src/main/res/layout/item_level.xml
  26. 17 29
      app/src/main/res/layout/fgt_choose_edit_list.xml
  27. 2 0
      media/app/src/main/res/values/colors.xml

+ 7 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/DiscoveryVideo.java

@@ -229,4 +229,11 @@ public class DiscoveryVideo implements Serializable {
     public boolean equals(@Nullable Object obj) {
         return obj instanceof DiscoveryVideo && ((DiscoveryVideo) obj).getId() == id;
     }
+
+    //非通过状态
+    public boolean isInAudit() {
+        return status != 1;
+    }
+//    status:	integer ($int32)
+// * 状态(1通过,2不通过,3未审核)
 }

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

@@ -1600,8 +1600,8 @@ public class ViewUtil {
                     pictures = pictures.split(";")[0];
                 }
                 Uri uri = Uri.parse(pictures);
-                int w = NumberFormatUtils.parseInteger(uri.getQueryParameter("w"));
-                int h = NumberFormatUtils.parseInteger(uri.getQueryParameter("h"));
+                int w = (int) NumberFormatUtils.parseFloat(uri.getQueryParameter("w"));
+                int h = (int) NumberFormatUtils.parseFloat(uri.getQueryParameter("h"));
                 if (w > 0 && h > 0) {
                     LayoutParamsUtil.resetLayoutParams(imageView, new Lp().setWidth(width).setHeight((int) (width * h * 1.0f / w)));
                 }

+ 19 - 9
app/src/main/java/com/sheep/gamegroup/view/activity/ActVideoDetail.java

@@ -140,13 +140,19 @@ public class ActVideoDetail extends BaseUMActivity implements MediaPlayer.OnInfo
     }
 
     private void initPlay() {
-        Uri uri = Uri.parse(SheepApp.getHttpProxyCacheServer().getProxyUrl(video_url));
         videoView.setOnInfoListener(this);
         videoView.setOnPreparedListener(this);
         videoView.setOnErrorListener(this);
         videoView.setOnCompletionListener(this);
 //        videoView.setMediaController(new MediaController(this));
-        videoView.setVideoURI(uri);
+        videoView.setVideoURI(getUri());
+    }
+    //转化地址
+    private Uri getUri(){
+        String proxyUrl = SheepApp.getHttpProxyCacheServer().getProxyUrl(video_url);
+        Uri uri = Uri.parse(proxyUrl);
+        LogUtil.println(ActVideoDetail.class.getSimpleName(),"\n", video_url, "\n", proxyUrl);
+        return uri;
     }
 
     //点赞
@@ -191,11 +197,17 @@ public class ActVideoDetail extends BaseUMActivity implements MediaPlayer.OnInfo
 
     //分享
     public void onClickVideoShare(View view) {
+        if(newVideo == null){
+            G.showToast(R.string.loading_data);
+            return;
+        }
+        if(newVideo.isInAudit()){
+            G.showToast("视频审核中");
+            return;
+        }
         if (shareLinkConfig == null)
             shareLinkConfig = new ShareLinkConfig();
-        if (newVideo != null) {
-            shareLinkConfig.setDes(newVideo.getTitle());
-        }
+        shareLinkConfig.setDes(newVideo.getTitle());
         shareLinkConfig.setShareType(ShareLinkConfig.ALL).toShare(this);
     }
     @Override
@@ -440,9 +452,8 @@ public class ActVideoDetail extends BaseUMActivity implements MediaPlayer.OnInfo
                 DiscoveryVideo item = ListUtil.getItem(videoList, position);
                 if(item != null) {
                     initVideoData(item);
-                    Uri uri = Uri.parse(SheepApp.getHttpProxyCacheServer().getProxyUrl(video_url));
                     videoView.stopPlayback();
-                    videoView.setVideoURI(uri);
+                    videoView.setVideoURI(getUri());
                     videoView.requestFocus();
                 }
             } else if (event2.getX() - event1.getX() > FLING_MIN_DISTANCE
@@ -457,9 +468,8 @@ public class ActVideoDetail extends BaseUMActivity implements MediaPlayer.OnInfo
                 DiscoveryVideo item = ListUtil.getItem(videoList, position);
                 if(item != null) {
                     initVideoData(item);
-                    Uri uri = Uri.parse(SheepApp.getHttpProxyCacheServer().getProxyUrl(video_url));
                     videoView.stopPlayback();
-                    videoView.setVideoURI(uri);
+                    videoView.setVideoURI(getUri());
                     videoView.requestFocus();
                 }
             } else if (event2.getY() - event1.getY() > FLING_MIN_DISTANCE

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

@@ -378,7 +378,7 @@ public class SheepApp extends MultiDexApplication {
     private HttpProxyCacheServer newHttpProxyCacheServer() {
         return new HttpProxyCacheServer.Builder(this)
                 .maxCacheSize(2L * 1024 * 1024 * 1024)       // 2 Gb for cache
-                .maxCacheFilesCount(20)////最多缓存个数
+                .maxCacheFilesCount(100)////最多缓存个数
                 .fileNameGenerator(new MyFileNameGenerator())
                 .build();
     }

+ 10 - 0
media/app/build.gradle

@@ -51,6 +51,16 @@ android {
 
 }
 
+configurations.all {
+    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
+        def requested = details.requested
+        if (requested.group == 'com.android.support') {
+            if (!requested.name.startsWith("multidex")) {
+                details.useVersion "$supportLibVersion"
+            }
+        }
+    }
+}
 dependencies {
     implementation fileTree(dir: 'libs', include: ['*.jar'])
 

+ 30 - 4
media/app/src/main/java/com/kfzs/cfyl/media/activity/ActEditVideo.java

@@ -16,6 +16,8 @@ import com.kfzs.cfyl.media.BaseContainerActivity;
 import com.kfzs.cfyl.media.R;
 import com.kfzs.cfyl.media.api.Filterble;
 import com.kfzs.cfyl.media.api.IFilter;
+import com.kfzs.cfyl.media.api.Levelble;
+import com.kfzs.cfyl.media.bean.BeautifyFilter;
 import com.kfzs.cfyl.media.bean.Size;
 import com.kfzs.cfyl.media.fragment.FgtChooseEditList;
 import com.kfzs.cfyl.media.util.BitmapUtil;
@@ -36,7 +38,7 @@ import java.util.Locale;
  * realicing@sina.com
  * 编辑视频
  */
-public class ActEditVideo extends BaseContainerActivity implements Filterble {
+public class ActEditVideo extends BaseContainerActivity implements Filterble, Levelble {
 
     @Override
     protected int getLayoutId() {
@@ -47,8 +49,9 @@ public class ActEditVideo extends BaseContainerActivity implements Filterble {
 
     private Video data;
 
-    private String mCurrentConfig;
+    private String mCurrentConfig;//滤镜配置
     private float mIntensity = 1.0f;
+    private int mBeautifyLevel = 0;//磨皮系数
 
     public static final int REQUEST_CODE_PICK_VIDEO = 1;
 
@@ -152,14 +155,28 @@ public class ActEditVideo extends BaseContainerActivity implements Filterble {
         return outputFilename;
     }
 
+    private IFilter filter;
     //设置滤镜
     @Override
     public void setFilter(IFilter filter) {
         if (mPlayerView != null && filter != null && filter.getConfig() != null) {
-            mCurrentConfig = filter.getConfig();
-            mPlayerView.setFilterWithConfig(mCurrentConfig);
+            this.filter = filter;
+            initCurrentConfig();
         }
     }
+    private void initCurrentConfig(){
+        StringBuilder config = new StringBuilder();
+        if(filter != null){
+            config.append(filter.getConfig());
+            config.append(" ");
+        }
+        if(mBeautifyLevel > 0){
+            config.append(BeautifyFilter.getConfig(mBeautifyLevel, G.WIDTH, G.HEIGHT));
+        }
+        mCurrentConfig = config.toString().trim();
+        LogUtil.println("initCurrentConfig", mCurrentConfig, filter.getConfig(), mBeautifyLevel);
+        mPlayerView.setFilterWithConfig(mCurrentConfig);
+    }
 
     @Override
     public void setFilterIntensity(float intensity) {
@@ -168,6 +185,14 @@ public class ActEditVideo extends BaseContainerActivity implements Filterble {
             mPlayerView.setFilterIntensity(mIntensity);
         }
     }
+    @Override
+    public void setLevel(int level) {
+        LogUtil.println(ActEditVideo.class.getSimpleName(), "setLevel", level);
+        if (mPlayerView != null) {
+            mBeautifyLevel = level;
+            initCurrentConfig();
+        }
+    }
 
     //下面为测试代码
 
@@ -319,4 +344,5 @@ public class ActEditVideo extends BaseContainerActivity implements Filterble {
     protected Fragment initFragment() {
         return new FgtChooseEditList();
     }
+
 }

+ 23 - 2
media/app/src/main/java/com/kfzs/cfyl/media/activity/MainActivity.java

@@ -2,7 +2,6 @@ package com.kfzs.cfyl.media.activity;
 
 import android.app.Activity;
 import android.content.DialogInterface;
-import android.os.Environment;
 import android.support.v7.app.AlertDialog;
 import android.view.View;
 
@@ -38,7 +37,7 @@ public class MainActivity extends BaseActivity {
         new Thread(new Runnable() {
             @Override
             public void run() {
-                List<MediaBean> mediaBeanList = MediaUtils.getMediaWithVideoList(getApplicationContext(), 1, 1);
+                List<MediaBean> mediaBeanList = MediaUtils.getMediaWithVideoList(getApplicationContext(), page++, 1);
                 MediaBean mediaBean = ListUtil.getItem(mediaBeanList, 0);
                 if(mediaBean != null) {
                     final Video video = Video.from(mediaBean);
@@ -57,6 +56,25 @@ public class MainActivity extends BaseActivity {
             }
         }).start();
     }
+    private int page = 1;
+    private void goEdit() {
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                List<MediaBean> mediaBeanList = MediaUtils.getMediaWithVideoList(getApplicationContext(), page++, 1);
+                MediaBean mediaBean = ListUtil.getItem(mediaBeanList, 0);
+                if(mediaBean != null) {
+                    final Video video = Video.from(mediaBean);
+                    runOnUiThread(new Runnable() {
+                        @Override
+                        public void run() {
+                            CallBackAPI.get().goEditVideo(MainActivity.this, video);
+                        }
+                    });
+                }
+            }
+        }).start();
+    }
 
     public void onClickHelloWorld(View view) {
         Activity activity = this;
@@ -70,6 +88,9 @@ public class MainActivity extends BaseActivity {
                             case "剪切视频":
                                 goCut();
                                 break;
+                            case "编辑视频":
+                                goEdit();
+                                break;
                         }
                     }
                 }).create();

+ 30 - 0
media/app/src/main/java/com/kfzs/cfyl/media/adapter/ViewPagerFragmentAdapter.java

@@ -0,0 +1,30 @@
+package com.kfzs.cfyl.media.adapter;
+
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentPagerAdapter;
+
+import java.util.List;
+
+/**
+ * Created by Administrator on 2017/12/25.
+ */
+
+public class ViewPagerFragmentAdapter extends FragmentPagerAdapter {
+
+    private List<Fragment> mList;
+    public ViewPagerFragmentAdapter(FragmentManager fm , List<Fragment> list) {
+        super(fm);
+        this.mList = list;
+    }
+
+    @Override
+    public Fragment getItem(int position) {
+        return mList.get(position);
+    }
+
+    @Override
+    public int getCount() {
+        return mList != null ? mList.size() : 0;
+    }
+}

+ 10 - 0
media/app/src/main/java/com/kfzs/cfyl/media/api/Levelble.java

@@ -0,0 +1,10 @@
+package com.kfzs.cfyl.media.api;
+
+/**
+ * Created by realicing on 2018/12/11.
+ * realicing@sina.com
+ * 系数调整
+ */
+public interface Levelble {
+    void setLevel(int level);
+}

+ 5 - 1
media/app/src/main/java/com/kfzs/cfyl/media/bean/BeautifyFilter.java

@@ -61,6 +61,10 @@ public class BeautifyFilter implements IFilter {
 
     @Override
     public String getConfig() {
-        return String.format(Locale.CHINA, "@beautify face %d %d %d", type, width, height);
+        return getConfig(type, width, height);
+    }
+
+    public static String getConfig(int level, int width, int height){
+        return String.format(Locale.CHINA, "@beautify face %d %d %d", level, width, height);
     }
 }

+ 41 - 0
media/app/src/main/java/com/kfzs/cfyl/media/customview/NoScrollViewPager.java

@@ -0,0 +1,41 @@
+package com.kfzs.cfyl.media.customview;
+
+import android.content.Context;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.v4.view.ViewPager;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+
+/**
+ * Created by realicing on 2018/12/11.
+ * realicing@sina.com
+ */
+public class NoScrollViewPager extends ViewPager {
+    //是否可以左右滑动?true 可以,像Android原生ViewPager一样。
+    // false 禁止ViewPager左右滑动。
+    private boolean scrollable = false;
+
+    public NoScrollViewPager(@NonNull Context context) {
+        super(context);
+    }
+
+    public NoScrollViewPager(@NonNull Context context, @Nullable AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+
+    public void setScrollable(boolean scrollable) {
+        this.scrollable = scrollable;
+    }
+
+    @Override
+    public boolean onInterceptTouchEvent(MotionEvent ev) {
+        return scrollable;
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent ev) {
+        return scrollable;
+    }
+}

+ 48 - 183
media/app/src/main/java/com/kfzs/cfyl/media/fragment/FgtChooseEditList.java

@@ -1,25 +1,14 @@
 package com.kfzs.cfyl.media.fragment;
 
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
+import android.support.v4.app.Fragment;
+import android.support.v4.view.ViewPager;
 import android.view.View;
-import android.widget.ImageView;
-import android.widget.SeekBar;
+import android.widget.CheckedTextView;
 
-import com.chad.library.adapter.base.BaseQuickAdapter;
-import com.chad.library.adapter.base.BaseViewHolder;
 import com.kfzs.cfyl.media.BaseFragment;
 import com.kfzs.cfyl.media.R;
-import com.kfzs.cfyl.media.bean.BeautifyFilter;
-import com.kfzs.cfyl.media.bean.ColorBalanceFilter;
-import com.kfzs.cfyl.media.bean.Filter;
-import com.kfzs.cfyl.media.bean.Lp;
-import com.kfzs.cfyl.media.bean.WaveFilter;
-import com.kfzs.cfyl.media.api.Filterble;
+import com.kfzs.cfyl.media.adapter.ViewPagerFragmentAdapter;
 import com.kfzs.cfyl.media.util.G;
-import com.kfzs.cfyl.media.api.IFilter;
-import com.kfzs.cfyl.media.util.LayoutParamsUtil;
-import com.kfzs.cfyl.media.util.ViewUtil;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -32,109 +21,77 @@ import java.util.List;
 public class FgtChooseEditList extends BaseFragment {
     View fgt_choose_edit_list_ll;
     View fgt_choose_edit_line_v;
-    SeekBar fgt_choose_edit_intensity_sb;
-    RecyclerView recyclerView;
+    View fgt_choose_edit_filter_tv;
+    View fgt_choose_edit_buffing_tv;
+    View fgt_choose_edit_warping_tv;
+    ViewPager fgt_choose_edit_view_pager;
 
     @Override
     public int getLayoutId() {
-        return R.layout.fgt_choose_edit_list;
+        return R.layout.media_fgt_choose_edit_list;
     }
 
     @Override
     public void onViewCreated() {
         initView();
+        initListener();
+        initData();
     }
 
-    private List<IFilter> filterList = new ArrayList<>();
-
-    private int width;
-
     private void initView() {
         fgt_choose_edit_list_ll = findViewById(R.id.fgt_choose_edit_list_ll);
         fgt_choose_edit_line_v = findViewById(R.id.fgt_choose_edit_line_v);
-        fgt_choose_edit_intensity_sb = findViewById(R.id.fgt_choose_edit_intensity_sb);
-
-        findViewById(R.id.fgt_choose_edit_filter_tv).setOnClickListener(new View.OnClickListener() {
+        fgt_choose_edit_view_pager = findViewById(R.id.fgt_choose_edit_view_pager);
+        fgt_choose_edit_filter_tv = findViewById(R.id.fgt_choose_edit_filter_tv);
+        fgt_choose_edit_buffing_tv = findViewById(R.id.fgt_choose_edit_buffing_tv);
+        fgt_choose_edit_warping_tv = findViewById(R.id.fgt_choose_edit_warping_tv);
+        lastView = fgt_choose_edit_filter_tv;
+    }
+    private void initListener() {
+        fgt_choose_edit_filter_tv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
                 onSelectFilter(view);
             }
         });
-        findViewById(R.id.fgt_choose_edit_buffing_tv).setOnClickListener(new View.OnClickListener() {
+        fgt_choose_edit_buffing_tv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
                 onSelectBuffing(view);
             }
         });
-        findViewById(R.id.fgt_choose_edit_warping_tv).setOnClickListener(new View.OnClickListener() {
+        fgt_choose_edit_warping_tv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
                 onSelectWarping(view);
             }
         });
-        recyclerView = findViewById(R.id.recyclerView);
-        filterList.add(new Filter("原图"));
-        ColorBalanceFilter.addDefaultFilterList(filterList);
-        filterList.add(new BeautifyFilter("美化").setWidth(G.WIDTH).setHeight(G.HEIGHT));
-        filterList.add(new WaveFilter("波浪").setPercent(1).setType(null));
-        filterList.add(new Filter("浮雕").setConfig("#unpack @style emboss 1 2 2"));
-        filterList.add(new Filter("半色调").setConfig("@style halftone 1.2"));
-        filterList.add(new Filter("暴光").setConfig("@adjust exposure 0.98"));
-        filterList.add(new Filter("阴影高亮").setConfig("@adjust shadowhighlight -200 200"));
-        filterList.add(new Filter("锐化").setConfig("@adjust sharpen 10 1.5"));
-        int i = 1;
-        for (String item : EFFECT_CONFIGS) {
-            filterList.add(new Filter("滤镜" + i).setConfig(item));
-            i++;
-        }
-//        filterList.add(new Filter("").setConfig(""));
-        width = (G.WIDTH - recyclerView.getPaddingStart() - recyclerView.getPaddingEnd() / 2) / 5;
-        recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
-        recyclerView.setAdapter(new BaseQuickAdapter<IFilter, BaseViewHolder>(R.layout.item_tv_iv, filterList) {
-            @Override
-            protected void convert(BaseViewHolder helper, final IFilter item) {
-                LayoutParamsUtil.resetLayoutParams(helper.itemView, new Lp().setWidth(width));
-                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) {
-
-            }
-        });
+    }
+    private void initData() {
+        List<Fragment> fragmentList = new ArrayList<>();
+        fragmentList.add(new FgtChooseFilterList());
+        fragmentList.add(new FgtChooseLevelList());
+        ViewPagerFragmentAdapter mViewPagerFragmentAdapter = new ViewPagerFragmentAdapter(getChildFragmentManager(), fragmentList);
+        try {
+            fgt_choose_edit_view_pager.setAdapter(mViewPagerFragmentAdapter);
+            fgt_choose_edit_view_pager.setOffscreenPageLimit(mViewPagerFragmentAdapter.getCount());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
     }
 
+    private View lastView;
     //选择滤镜
     public void onSelectFilter(View view) {
-
+        fgt_choose_edit_view_pager.setCurrentItem(0);
+        changeCheckedState(view);
     }
 
     //选择磨皮
     public void onSelectBuffing(View view) {
-        G.showToast(getContext(), R.string.coming_soon);
+        fgt_choose_edit_view_pager.setCurrentItem(1);
+        changeCheckedState(view);
     }
 
     //选择大眼瘦脸
@@ -142,106 +99,14 @@ public class FgtChooseEditList extends BaseFragment {
         G.showToast(getContext(), R.string.coming_soon);
     }
 
-    public static final String EFFECT_CONFIGS[] = {
-            "@curve RGB(0,255)(255,0) @style cm mapping0.jpg 80 80 8 3", // ASCII art (字符画效果)
-            "@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 ",
-            "@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 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)"
-    };
+    private void changeCheckedState(View view) {
+        if(lastView != view) {
+            if (lastView instanceof CheckedTextView) {
+                ((CheckedTextView) lastView).setChecked(false);
+            }
+            if (view instanceof CheckedTextView)
+                ((CheckedTextView) view).setChecked(true);
+            lastView = view;
+        }
+    }
 }

+ 213 - 0
media/app/src/main/java/com/kfzs/cfyl/media/fragment/FgtChooseFilterList.java

@@ -0,0 +1,213 @@
+package com.kfzs.cfyl.media.fragment;
+
+import android.support.v7.widget.LinearLayoutManager;
+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.kfzs.cfyl.media.BaseFragment;
+import com.kfzs.cfyl.media.R;
+import com.kfzs.cfyl.media.api.Filterble;
+import com.kfzs.cfyl.media.api.IFilter;
+import com.kfzs.cfyl.media.bean.BeautifyFilter;
+import com.kfzs.cfyl.media.bean.ColorBalanceFilter;
+import com.kfzs.cfyl.media.bean.Filter;
+import com.kfzs.cfyl.media.bean.Lp;
+import com.kfzs.cfyl.media.bean.WaveFilter;
+import com.kfzs.cfyl.media.util.G;
+import com.kfzs.cfyl.media.util.LayoutParamsUtil;
+import com.kfzs.cfyl.media.util.ViewUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by realicing on 2018/12/11.
+ * realicing@sina.com
+ * 滤镜选择列表
+ */
+public class FgtChooseFilterList extends BaseFragment {
+    @Override
+    public int getLayoutId() {
+        return R.layout.fgt_choose_filter_list;
+    }
+
+    @Override
+    public void onViewCreated() {
+        initView();
+        initListener();
+        initData();
+    }
+
+
+    RecyclerView recyclerView;
+    SeekBar fgt_choose_edit_intensity_sb;
+    private void initView() {
+        recyclerView = findViewById(R.id.recyclerView);
+        fgt_choose_edit_intensity_sb = findViewById(R.id.fgt_choose_edit_intensity_sb);
+    }
+
+    private int width;
+    private void initListener() {
+        width = (G.WIDTH - recyclerView.getPaddingStart() - recyclerView.getPaddingEnd() / 2) / 5;
+        recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
+        recyclerView.setAdapter(new BaseQuickAdapter<IFilter, BaseViewHolder>(R.layout.item_tv_iv, filterList) {
+            @Override
+            protected void convert(BaseViewHolder helper, final IFilter item) {
+                LayoutParamsUtil.resetLayoutParams(helper.itemView, new Lp().setWidth(width));
+                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) {
+
+            }
+        });
+    }
+    private List<IFilter> filterList = new ArrayList<>();
+    private void initData() {
+        filterList.add(new Filter("原图"));
+        ColorBalanceFilter.addDefaultFilterList(filterList);
+        filterList.add(new WaveFilter("波浪").setPercent(1).setType(null));
+        filterList.add(new Filter("浮雕").setConfig("#unpack @style emboss 1 2 2"));
+        filterList.add(new Filter("半色调").setConfig("@style halftone 1.2"));
+        filterList.add(new Filter("暴光").setConfig("@adjust exposure 0.98"));
+        filterList.add(new Filter("阴影高亮").setConfig("@adjust shadowhighlight -200 200"));
+        filterList.add(new Filter("锐化").setConfig("@adjust sharpen 10 1.5"));
+        int i = 1;
+        for (String item : EFFECT_CONFIGS) {
+            filterList.add(new Filter("滤镜" + i).setConfig(item));
+            i++;
+        }
+        ViewUtil.notifyDataSetChanged(recyclerView);
+    }
+
+    public static final String EFFECT_CONFIGS[] = {
+            "@curve RGB(0,255)(255,0) @style cm mapping0.jpg 80 80 8 3", // ASCII art (字符画效果)
+            "@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 ",
+            "@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 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)"
+    };
+}

+ 97 - 0
media/app/src/main/java/com/kfzs/cfyl/media/fragment/FgtChooseLevelList.java

@@ -0,0 +1,97 @@
+package com.kfzs.cfyl.media.fragment;
+
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+import android.widget.CheckedTextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.kfzs.cfyl.media.BaseFragment;
+import com.kfzs.cfyl.media.R;
+import com.kfzs.cfyl.media.api.Levelble;
+import com.kfzs.cfyl.media.bean.Lp;
+import com.kfzs.cfyl.media.util.G;
+import com.kfzs.cfyl.media.util.LayoutParamsUtil;
+import com.kfzs.cfyl.media.util.ViewUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by realicing on 2018/12/11.
+ * realicing@sina.com
+ * 磨皮级别选择列表
+ */
+public class FgtChooseLevelList extends BaseFragment {
+    @Override
+    public int getLayoutId() {
+        return R.layout.fgt_choose_level_list;
+    }
+
+    @Override
+    public void onViewCreated() {
+        initView();
+        initListener();
+        initData();
+    }
+
+
+    RecyclerView recyclerView;
+
+    private void initView() {
+        recyclerView = findViewById(R.id.recyclerView);
+    }
+
+
+    private int selectPosition = 0;
+
+    private void initListener() {
+        recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
+        recyclerView.setAdapter(new BaseQuickAdapter<Integer, BaseViewHolder>(R.layout.item_level, list) {
+            @Override
+            protected void convert(BaseViewHolder helper, final Integer item) {
+                CheckedTextView item_level_ctv = helper.getView(R.id.item_level_ctv);
+                switch (item) {
+                    case 0:
+                        LayoutParamsUtil.resetLayoutParams(item_level_ctv, new Lp(per).setLeftMargin(ps).setRightMargin(p));
+                        break;
+                    default:
+                        LayoutParamsUtil.resetLayoutParams(item_level_ctv, new Lp(per).setRightMargin(p));
+                        break;
+                    case count - 1:
+                        LayoutParamsUtil.resetLayoutParams(item_level_ctv, new Lp(per).setRightMargin(ps));
+                        break;
+                }
+                item_level_ctv.setChecked(item == selectPosition);
+                ViewUtil.setText(item_level_ctv, String.valueOf(item));
+                helper.itemView.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        selectPosition = item;
+                        ViewUtil.notifyDataSetChanged(recyclerView);
+                        if (getActivity() instanceof Levelble) {
+                            ((Levelble) getActivity()).setLevel(item);
+                        }
+                    }
+                });
+            }
+        });
+    }
+
+    private List<Integer> list = new ArrayList<>();
+
+    private float per;//每份距离
+    private int ps = 3;//左右的距离级别
+    private int p = 2;//中间的距离级别
+    private final int count = 6;
+
+    private void initData() {
+        for (int i = 0; i < count; i++) {
+            list.add(i);
+        }
+        ViewUtil.notifyDataSetChanged(recyclerView);
+        per = (G.WIDTH - count * G.DENSITY * 40) / (ps * 2 + (count - 1) * p);
+    }
+
+}

+ 6 - 0
media/app/src/main/java/com/kfzs/cfyl/media/util/ViewUtil.java

@@ -1,6 +1,7 @@
 package com.kfzs.cfyl.media.util;
 
 import android.support.annotation.StringRes;
+import android.support.v7.widget.RecyclerView;
 import android.text.TextUtils;
 import android.view.View;
 import android.widget.ImageView;
@@ -103,4 +104,9 @@ public class ViewUtil {
     public static String getNetImgByNameAndSuffix(String name) {
         return String.format(Locale.CHINA, "http://cdngame.kuaifazs.com/%s", name);
     }
+    //刷新RecyclerView的adapter
+    public static void notifyDataSetChanged(RecyclerView recyclerView) {
+        if (recyclerView != null && recyclerView.getAdapter() != null)
+            recyclerView.getAdapter().notifyDataSetChanged();
+    }
 }

+ 9 - 0
media/app/src/main/res/color/selector_color_white_black.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/black"/>
+</selector>

+ 9 - 0
media/app/src/main/res/drawable/selector_oval_red_white.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_enabled="false" android:drawable="@drawable/shape_oval_white" />
+  <item android:state_focused="true" android:drawable="@drawable/shape_oval_red" />
+  <item android:state_checked="true" android:drawable="@drawable/shape_oval_red"/>
+  <item android:state_selected="true" android:drawable="@drawable/shape_oval_red"/>
+  <item android:state_pressed="true" android:drawable="@drawable/shape_oval_red"/>
+  <item android:drawable="@drawable/shape_oval_white"/>
+</selector>

media/app/src/main/res/drawable-v24/shape_black_solid_rectangle_top_6.xml → media/app/src/main/res/drawable/shape_black_solid_rectangle_top_6.xml


+ 7 - 0
media/app/src/main/res/drawable/shape_oval_red.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <corners android:radius="20dp" />
+
+    <solid android:color="@color/red" />
+</shape>

+ 7 - 0
media/app/src/main/res/drawable/shape_oval_white.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <corners android:radius="20dp" />
+
+    <solid android:color="@color/white" />
+</shape>

+ 2 - 2
media/app/src/main/res/layout/act_edit_video.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    xmlns:tools="http://schemas.android.com/tools"
     tools:context=".activity.ActEditVideo">
 
     <FrameLayout
@@ -77,10 +77,10 @@
         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:onClick="onClickCommit"
         android:padding="5dp"
         android:src="@drawable/qiandao" />
 </RelativeLayout>

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

@@ -1,80 +0,0 @@
-<?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>

+ 23 - 0
media/app/src/main/res/layout/fgt_choose_filter_list.xml

@@ -0,0 +1,23 @@
+<?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="match_parent"
+    android:gravity="center"
+    android:orientation="vertical">
+
+    <SeekBar
+        android:id="@+id/fgt_choose_edit_intensity_sb"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:visibility="gone"
+        android:max="100"
+        android:progress="100" />
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/recyclerView"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:paddingStart="11dp"
+        android:paddingEnd="11dp" />
+
+</LinearLayout>

+ 12 - 0
media/app/src/main/res/layout/fgt_choose_level_list.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/recyclerView"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_centerInParent="true" />
+
+</RelativeLayout>

+ 16 - 0
media/app/src/main/res/layout/item_level.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content">
+
+    <CheckedTextView
+        android:id="@+id/item_level_ctv"
+        android:layout_width="40dp"
+        android:layout_height="40dp"
+        android:background="@drawable/selector_oval_red_white"
+        android:gravity="center"
+        android:text="0"
+        android:textAlignment="center"
+        android:textColor="@color/selector_color_white_black"
+        android:textSize="12sp" />
+</RelativeLayout>

+ 17 - 29
app/src/main/res/layout/fgt_choose_edit_list.xml

@@ -1,16 +1,27 @@
 <?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"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:background="@drawable/shape_black_solid_rectangle_top_6">
+    android:background="@drawable/shape_black_solid_rectangle_top_6"
+    android:orientation="vertical">
+
+    <com.kfzs.cfyl.media.customview.NoScrollViewPager
+        android:id="@+id/fgt_choose_edit_view_pager"
+        android:layout_width="match_parent"
+        android:layout_height="122dp"/>
+
+    <View
+        android:id="@+id/fgt_choose_edit_line_v"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="#545454" />
 
     <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">
+        android:gravity="center"
+        android:orientation="horizontal">
 
         <CheckedTextView
             android:id="@+id/fgt_choose_edit_filter_tv"
@@ -53,28 +64,5 @@
             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>
+</LinearLayout>

+ 2 - 0
media/app/src/main/res/values/colors.xml

@@ -12,6 +12,8 @@
     <color name="theme_app_info_dark">#3b93e5</color>
     <color name="white_40">#66ffffff</color>
     <color name="white">#ffffff</color>
+    <color name="red">#ff0000</color>
+    <color name="black">#000000</color>
     <color name="white_ededed">#ededed</color>
     <color name="white_FFF7F7F7">#FFF7F7F7</color>
     <color name="black_text_deep">#333333</color>