app/src/main/java/com/keephealth/app/entity/SearchBean.java
public class SearchBean {
    private String title;
    private String intro;
    private String date;
    private String type;
    private String click;
    private String href;

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getClick() {
        return click;
    }

    public void setClick(String click) {
        this.click = click;
    }
}
app/src/main/java/com/keephealth/app/ui/adapter/CookBookAdapter.java
public class CookBookAdapter extends BaseQuickAdapter<SearchBean, BaseViewHolder> {
    Context context;
    int page=0;

    public void setPage(int page) {
        this.page = page;
    }
    public CookBookAdapter(Context context, List<SearchBean> homeNewsBeans) {
        super(R.layout.cook_book_item);
        this.context = context;
    }
    @Override
    protected void convert(BaseViewHolder helper, final SearchBean item) {
        helper.setText(R.id.cookTitleTxt, item.getTitle())
                .setText(R.id.cookcontent, item.getIntro())
                .setText(R.id.cookMaskType, "类型: "+item.getType())
                .setText(R.id.cookDate, "日期: "+item.getDate());
        ImageView img=(ImageView)helper.getView(R.id.cookImg);
        App.getInstance().loadImage(context, item.getClick(), img);
        helper.getConvertView().setOnClickListener(new View.OnClickListener() {
           @Override
           public void onClick(View v) {
               Intent intent = new Intent();
               if (page == 1) {
                   VideoWebviewActivity.runActivity(context,item.getTitle(),item.getHref());
               }else{
                   intent.putExtra("title", item.getTitle());
                   intent.putExtra("url", item.getHref());
                   intent.setClass(context, CookDetailActivity.class);
                   context.startActivity(intent);
               }
           }
       });
    }
}
filter-lib/src/main/java/com/baiiu/filter/DropDownMenu.java
public class DropDownMenu extends RelativeLayout implements View.OnClickListener, FixedTabIndicator.OnItemClickListener {

    private FixedTabIndicator fixedTabIndicator;
    private FrameLayout frameLayoutContainer;

    private View currentView;

    private Animation dismissAnimation;
    private Animation occurAnimation;
    private Animation alphaDismissAnimation;
    private Animation alphaOccurAnimation;

    private MenuAdapter mMenuAdapter;

    public DropDownMenu(Context context) {
        this(context, null);
    }

    public DropDownMenu(Context context, AttributeSet attrs) {
        super(context, attrs);
        init(context);
    }

    public DropDownMenu(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context);
    }

    private void init(Context context) {
        setBackgroundColor(Color.WHITE);
    }

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        setContentView(findViewById(R.id.mFilterContentView));
    }

    public void setContentView(View contentView) {
        removeAllViews();

        /*
         * 1.顶部筛选条
         */
        fixedTabIndicator = new FixedTabIndicator(getContext());
        fixedTabIndicator.setId(R.id.fixedTabIndicator);
        addView(fixedTabIndicator, -1, UIUtil.dp(getContext(), 50));

        LayoutParams params = new LayoutParams(-1, -1);
        params.addRule(BELOW, R.id.fixedTabIndicator);

        /*
         * 2.添加contentView,内容界面
         */
        addView(contentView, params);

        /*
         * 3.添加展开页面,装载筛选器list
         */
        frameLayoutContainer = new FrameLayout(getContext());
        frameLayoutContainer.setBackgroundColor(getResources().getColor(R.color.black_p50));
        addView(frameLayoutContainer, params);

        frameLayoutContainer.setVisibility(GONE);

        initListener();
        initAnimation();
    }

    public void setMenuAdapter(MenuAdapter adapter) {
        verifyContainer();

        mMenuAdapter = adapter;
        verifyMenuAdapter();

        //1.设置title
        fixedTabIndicator.setTitles(mMenuAdapter);

        //2.添加view
        setPositionView();
    }

    /**
     * 可以提供两种方式:
     * 1.缓存所有view,
     * 2.只保存当前view
     * <p/>
     * 此处选择第二种
     */
    public void setPositionView() {
        int count = mMenuAdapter.getMenuCount();
        for (int position = 0; position < count; ++position) {
            setPositionView(position, findViewAtPosition(position), mMenuAdapter.getBottomMargin(position));
        }
    }

    public View findViewAtPosition(int position) {
        verifyContainer();

        View view = frameLayoutContainer.getChildAt(position);
        if (view == null) {
            view = mMenuAdapter.getView(position, frameLayoutContainer);
        }

        return view;
    }

    private void setPositionView(int position, View view, int bottomMargin) {
        verifyContainer();
        if (view == null || position > mMenuAdapter.getMenuCount() || position < 0) {
            throw new IllegalStateException("the view at " + position + " cannot be null");
        }

        FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(-1, -2);
        params.bottomMargin = bottomMargin;//添加距离底部高度
        frameLayoutContainer.addView(view, position, params);
        view.setVisibility(GONE);
    }


    public boolean isShowing() {
        verifyContainer();
        return frameLayoutContainer.isShown();
    }

    public boolean isClosed() {
        return !isShowing();
    }

    public void close() {
        if (isClosed()) {
            return;
        }

        frameLayoutContainer.startAnimation(alphaDismissAnimation);
        fixedTabIndicator.resetCurrentPos();

        if (currentView != null) {
            currentView.startAnimation(dismissAnimation);
        }
    }


    public void setPositionIndicatorText(int position, String text) {
        verifyContainer();
        fixedTabIndicator.setPositionText(position, text);
    }

    public void setCurrentIndicatorText(String text) {
        verifyContainer();
        fixedTabIndicator.setCurrentText(text);
    }

    //=======================之上对外暴漏方法=======================================
    private void initListener() {
        frameLayoutContainer.setOnClickListener(this);
        fixedTabIndicator.setOnItemClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if (isShowing()) {
            close();
        }
    }

    @Override
    public void onItemClick(View v, int position, boolean open) {
        if (open) {
            close();
        } else {


            currentView = frameLayoutContainer.getChildAt(position);

            if (currentView == null) {
                return;
            }


            frameLayoutContainer.getChildAt(fixedTabIndicator.getLastIndicatorPosition()).setVisibility(View.GONE);
            frameLayoutContainer.getChildAt(position).setVisibility(View.VISIBLE);


            if (isClosed()) {
                frameLayoutContainer.setVisibility(VISIBLE);
                frameLayoutContainer.startAnimation(alphaOccurAnimation);

                //可移出去,进行每次展出
                currentView.startAnimation(occurAnimation);
            }


        }
    }


    private void initAnimation() {
        occurAnimation = AnimationUtils.loadAnimation(getContext(), R.anim.top_in);

        SimpleAnimationListener listener = new SimpleAnimationListener() {
            @Override
            public void onAnimationEnd(Animation animation) {
                frameLayoutContainer.setVisibility(GONE);
            }
        };

        dismissAnimation = AnimationUtils.loadAnimation(getContext(), R.anim.top_out);
        dismissAnimation.setAnimationListener(listener);


        alphaDismissAnimation = AnimationUtils.loadAnimation(getContext(), R.anim.alpha_to_zero);
        alphaDismissAnimation.setDuration(300);
        alphaDismissAnimation.setAnimationListener(listener);

        alphaOccurAnimation = AnimationUtils.loadAnimation(getContext(), R.anim.alpha_to_one);
        alphaOccurAnimation.setDuration(300);
    }

    private void verifyMenuAdapter() {
        if (mMenuAdapter == null) {
            throw new IllegalStateException("the menuAdapter is null");
        }
    }

    private void verifyContainer() {
        if (frameLayoutContainer == null) {
            throw new IllegalStateException("you must initiation setContentView() before");
        }
    }


}
app/src/main/java/com/keephealth/app/utils/DividerItemDecoration.java
public class DividerItemDecoration extends RecyclerView.ItemDecoration {
    private Paint mPaint;
    private Drawable mDivider;
    private int mDividerHeight = 2;//分割线高度，默认为1px
    private int mOrientation;//列表的方向：LinearLayoutManager.VERTICAL或LinearLayoutManager.HORIZONTAL
    private static final int[] ATTRS = new int[]{android.R.attr.listDivider};

    /**
     * 默认分割线：高度为2px，颜色为灰色
     * @param context
     * @param orientation 列表方向
     */
    public DividerItemDecoration(Context context, int orientation) {
        if (orientation != LinearLayoutManager.VERTICAL && orientation != LinearLayoutManager.HORIZONTAL) {
            throw new IllegalArgumentException("请输入正确的参数！");
        }
        mOrientation = orientation;
        final TypedArray a = context.obtainStyledAttributes(ATTRS);
        mDivider = a.getDrawable(0);
        a.recycle();
    }

    /**
     * 自定义分割线
     *
     * @param context
     * @param orientation 列表方向
     * @param drawableId  分割线图片
     */
    public DividerItemDecoration(Context context, int orientation, int drawableId) {
        this(context, orientation);
        mDivider = ContextCompat.getDrawable(context, drawableId);
        mDividerHeight = mDivider.getIntrinsicHeight();
    }

    /**
     * 自定义分割线
     *
     * @param context
     * @param orientation   列表方向
     * @param dividerHeight 分割线高度
     * @param dividerColor  分割线颜色
     */
    public DividerItemDecoration(Context context, int orientation, int dividerHeight, int dividerColor) {
        this(context, orientation);
        mDividerHeight = dividerHeight;
        mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
        mPaint.setColor(dividerColor);
        mPaint.setStyle(Paint.Style.FILL);
    }


    //获取分割线尺寸
    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
        super.getItemOffsets(outRect, view, parent, state);
        outRect.set(0, 0, 0, mDividerHeight);
    }

    //绘制分割线
    @Override
    public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) {
        super.onDraw(c, parent, state);
        if (mOrientation == LinearLayoutManager.VERTICAL) {
            drawHorizontal(c, parent);
        } else {
            drawHorizontal(c, parent);
        }
    }

    //绘制横向 item 分割线
    private void drawHorizontal(Canvas canvas, RecyclerView parent) {
        final int left = parent.getPaddingLeft();
        final int right = parent.getMeasuredWidth() - parent.getPaddingRight();
        final int childSize = parent.getChildCount();
        for (int i = 0; i < childSize; i++) {
            final View child = parent.getChildAt(i);
            RecyclerView.LayoutParams layoutParams = (RecyclerView.LayoutParams) child.getLayoutParams();
            final int top = child.getBottom() + layoutParams.bottomMargin;
            final int bottom = top + mDividerHeight;
            if (mDivider != null) {
                mDivider.setBounds(left, top, right, bottom);
                mDivider.draw(canvas);
            }
            if (mPaint != null) {
                canvas.drawRect(left, top, right, bottom, mPaint);
            }
        }
    }

    //绘制纵向 item 分割线
    private void drawVertical(Canvas canvas, RecyclerView parent) {
        final int top = parent.getPaddingTop();
        final int bottom = parent.getMeasuredHeight() - parent.getPaddingBottom();
        final int childSize = parent.getChildCount();
        for (int i = 0; i < childSize; i++) {
            final View child = parent.getChildAt(i);
            RecyclerView.LayoutParams layoutParams = (RecyclerView.LayoutParams) child.getLayoutParams();
            final int left = child.getRight() + layoutParams.rightMargin;
            final int right = left + mDividerHeight;
            if (mDivider != null) {
                mDivider.setBounds(left, top, right, bottom);
                mDivider.draw(canvas);
            }
            if (mPaint != null) {
                canvas.drawRect(left, top, right, bottom, mPaint);
            }
        }
    }
}
app/src/main/java/com/keephealth/app/common/Config.java
public class Config {
  public static final String CRAWLER_URL="http://www.cpoha.com.cn";
  public static final String LZYYSW="http://www.lzyysw.com";
  public static final String YANGSHENGWANG="http://www.6681.com";
  public static final String XLY="http://www.6681.com/xinliyangsheng/";
  public static final String REMARK="REMARK";

  public List<TagBean> jkList;
  public List<TagBean> lifeList;
  public List<TagBean> studyList;
  public List<TagBean> testList;
  public List<TagBean> constelList;
  public List<TagBean> animalsList;
  public List<TagBean> geomancyList;

  public List<TagBean> getStudyList() {
    studyList=new ArrayList();
    for(int i=0;i<Study.length;i++){
      TagBean tagBean=new TagBean();
      tagBean.setHref(StudyUrl[i]);
      tagBean.setTagname(Study[i]);
      jkList.add(tagBean);
    }
    return studyList;
  }

  public List getJkList() {
    jkList=new ArrayList();
    for(int i=0;i<mentalJK.length;i++){
      TagBean tagBean=new TagBean();
      tagBean.setHref(mentalJKUrl[i]);
      tagBean.setTagname(mentalJK[i]);
      jkList.add(tagBean);
    }
    return jkList;
  }

  public List getLifeList() {
    lifeList=new ArrayList();
    for(int i=0;i<Life.length;i++){
      TagBean tagBean=new TagBean();
      tagBean.setHref(LifeUrl[i]);
      tagBean.setTagname(Life[i]);
      jkList.add(tagBean);
    }
    return lifeList;
  }

  public List getTestList() {
    testList=new ArrayList();
    for(int i=0;i<Test.length;i++){
      TagBean tagBean=new TagBean();
      tagBean.setHref(TestUrl[i]);
      tagBean.setTagname(Test[i]);
      jkList.add(tagBean);
    }
    return testList;
  }

  public List getConstelList() {
    constelList=new ArrayList();
    for(int i=0;i<Constel.length;i++){
      TagBean tagBean=new TagBean();
      tagBean.setHref(ConstelUrl[i]);
      tagBean.setTagname(Constel[i]);
      jkList.add(tagBean);
    }
    return constelList;
  }

  public List getAnimalsList() {
    animalsList=new ArrayList();
    for(int i=0;i<Animals.length;i++){
      TagBean tagBean=new TagBean();
      tagBean.setHref(AnimalsUrl[i]);
      tagBean.setTagname(Animals[i]);
      jkList.add(tagBean);
    }
    return animalsList;
  }

  public List getGeomancyList() {
    geomancyList=new ArrayList();
    for(int i=0;i<Geomancy.length;i++){
      TagBean tagBean=new TagBean();
      tagBean.setHref(GeomancyUrl[i]);
      tagBean.setTagname(Geomancy[i]);
      jkList.add(tagBean);
    }
    return geomancyList;
  }

  public String[] tytitle = new String[]{"心理健康", "心理学与生活", "心理测试", "心理学", "星座查询", "生肖配对", "风水学"};
  public String[] titleUlr1 = new String[]{XLY+"xinlijb/",XLY+"shenghuo/",XLY+"ceshi/",XLY+"xinlixue/",
          XLY+"xingzuo/",XLY+"shengxiao/",XLY+"fengshui/", XLY+"huangdaojiri/"};

  public  String []mentalJK={"恐惧症","强迫症","自闭症","焦虑症","多动症","失语症","躁狂症","妄想症","恐高症","社交恐惧症","密集恐惧症"};
  public String []mentalJKUrl={XLY+"kongjuzheng/",XLY+"qpz/",XLY+"zbz/",XLY+"jlz/",
          XLY+"ddz/",XLY+"xinlijb/syz/",XLY+"xinlijb/zkz/",XLY+"xinlijb/wxz/",XLY+"xinlijb/kgz/",
          XLY+"xinlijb/sjkjz/",XLY+"xinlijb/mjkjz/"};

  public String []Life={"职场法则","人际交往","家庭生活","自我认知","心灵鸡汤","成长心理","健康减压"};
  public String []LifeUrl={XLY+"zhichang/",XLY+"rjjw/",XLY+"jtsh/",XLY+"zwrz/",
          XLY+"xljt/",XLY+"chengchangxinli/",XLY+"jkjy/"};

  public String []Test={"爱情测试","性格测试","事业测试","趣味测试","其他测试","财富测试","智商测试","社交测试"};
  public String []TestUrl={XLY+"aqcs/",XLY+"xgcs/",XLY+"sycs/",XLY+"qwcs/",
          XLY+"qita/",XLY+"caifuceshi/",XLY+"zhishangceshi/",XLY+"shejiaoceshi/",};

  public String []Study={"色彩心理学","微表情","儿童心理学","生活心理学","犯罪心理学","行为心理学","社会心理学","人格心理学","恋爱心理学","销售心理学"};
  public String []StudyUrl={XLY+"secai/",XLY+"wbq/",XLY+"ertong/",XLY+"xinlixue/shenghuo/",
          XLY+"xinlixue/fzxlx/",XLY+"xinlixue/xwxlx/",XLY+"xinlixue/shxlx/",XLY+"xinlixue/rgxlx/",YANGSHENGWANG+"/xinlixue/laxlx/",YANGSHENGWANG+"/xinlixue/xsxlx/"};

  public String []Constel={"天蝎座","双鱼座","狮子座","摩羯座","天秤座","双子座","白羊座","金牛座","巨蟹座","处女座","水瓶座","射手座"};
  public String []ConstelUrl={XLY+"tianxiezuo/",XLY+"shuangyuzuo/",XLY+"shizizuo/",XLY+"mojiezuo/",XLY+"tianchengzuo/",YANGSHENGWANG+"/shuangzizuo/"
          ,XLY+"baiyangzuo/",XLY+"jinniuzuo/",XLY+"juxiezuo/",XLY+"chunvzuo/",XLY+"shuipingzuo/",XLY+"sheshouzuo/"};

  public String []Animals={"属鼠","属牛","属虎","属龙","属蛇","属马","属羊","属猴","属鸡","属狗","属兔","属猪"};
  public String []AnimalsUrl={XLY+"shengxiao/shu/",XLY+"shengxiao/niu/",XLY+"shengxiao/hu/",XLY+"shengxiao/long/",XLY+"shengxiao/she/",XLY+"/shengxiao/ma/"
          ,XLY+"shengxiao/yang/",XLY+"shengxiao/hou/",XLY+"shengxiao/ji/",XLY+"shengxiao/gou/",XLY+"shengxiao/tu/",XLY+"shengxiao/zhu/"};

  public String []Geomancy={"解梦","风水学","黄道吉日","血型","塔罗牌","面相学","手相学"};
  public String []GeomancyUrl={XLY+"jiemeng/",XLY+"fengshui/",XLY+"huangdaojiri/",XLY+"xxml/xuexing/",XLY+"taluopai",XLY+"mianxiangxue/"
          ,XLY+"shouxiangxue/"};
}
filter-lib/src/main/java/com/baiiu/filter/interfaces/OnFilterDoneListener.java
public interface OnFilterDoneListener {
    void onFilterDone(int position, String positionTitle, String urlValue);
}
app/src/main/java/com/keephealth/app/utils/FilterType.java
public class FilterType {
    public String desc;
    public List<String> child;
}
app/src/main/java/com/keephealth/app/ui/adapter/DropMenuAdapter.java
public class DropMenuAdapter implements MenuAdapter {
    private final Context mContext;
    private OnFilterDoneListener onFilterDoneListener;
    private String[] titles;
    private List<FilterType> list;
    HashMap<String, Object> mapValue;
    public DropMenuAdapter(Context context, String[] titles, OnFilterDoneListener onFilterDoneListener, HashMap<String, Object> mapValue) {
        this.mContext = context;
        this.titles = titles;
        this.onFilterDoneListener = onFilterDoneListener;
        this.mapValue = mapValue;
        this.list=(List<FilterType>)mapValue.get(titles[1]);
    }

    @Override
    public int getMenuCount() {
        return titles.length;
    }

    @Override
    public String getMenuTitle(int position) {
        return titles[position];
    }

    @Override
    public int getBottomMargin(int position) {
//        if (position == 1) {
//            return 0;
//        }
        return UIUtil.dp(mContext, 140);
    }

    @Override
    public View getView(int position, FrameLayout parentContainer) {
        View view = parentContainer.getChildAt(position);

        switch (position) {
            case 0:
                view = createSingleListView(0,(List<String>) mapValue.get(titles[0]));
                break;
            case 1:
                view = createDoubleListView(1,list);
                break;
        }
        return view;
    }

    private View createSingleListView(final int i,List<String> list) {
        SingleListView<String> singleListView = new SingleListView<String>(mContext)
                .adapter(new SimpleTextAdapter<String>(null, mContext) {
                    @Override
                    public String provideText(String string) {
                        return string;
                    }
                    @Override
                    protected void initCheckedTextView(FilterCheckedTextView checkedTextView) {
                        int dp = UIUtil.dp(mContext, 15);
                        checkedTextView.setPadding(dp, dp, 0, dp);
                    }
                })
                .onItemClick(new OnFilterItemClickListener<String>() {
                    @Override
                    public void onItemClick(String item) {
                        FilterUrl.instance().singleListPosition = item;
                        FilterUrl.instance().titleUrl = item;
                        FilterUrl.instance().position = i;
                        FilterUrl.instance().positionTitle = item;
                        onFilterDone();
                    }
                });

        singleListView.setList(list, -1);
        return singleListView;
    }

    private View createDoubleListView(final int i,List<FilterType> list) {
        List<String> child=new ArrayList<>();
        if (list!=null&&list.size()>0) {
            child = list.get(0).child;
        }
        DoubleListView<FilterType, String> comTypeDoubleListView = new DoubleListView<FilterType, String>(mContext)
                .leftAdapter(new SimpleTextAdapter<FilterType>(null, mContext) {
                    @Override
                    public String provideText(FilterType filterType) {
                        return filterType.desc;
                    }

                    @Override
                    protected void initCheckedTextView(FilterCheckedTextView checkedTextView) {
                        int dp = UIUtil.dp(mContext, 15);
                        checkedTextView.setPadding(dp, dp, 0, dp);
                    }
                })
                .rightAdapter(new SimpleTextAdapter<String>(null, mContext) {
                    @Override
                    public String provideText(String s) {
                        return s;
                    }

                    @Override
                    protected void initCheckedTextView(FilterCheckedTextView checkedTextView) {
                        checkedTextView.setPadding(UIUtil.dp(mContext, 15), UIUtil.dp(mContext, 15), 0, UIUtil.dp(mContext, 15));
                        checkedTextView.setBackgroundResource(android.R.color.white);
                    }
                })
                .onLeftItemClickListener(new DoubleListView.OnLeftItemClickListener<FilterType, String>() {
                    @Override
                    public List<String> provideRightList(FilterType item, int position) {
                        List<String> childList = item.child;
                        if (CommonUtil.isEmpty(childList)) {
                            FilterUrl.instance().doubleListLeft = item.desc;
                            FilterUrl.instance().doubleListRight = "";
                            FilterUrl.instance().position = i;
                            FilterUrl.instance().positionTitle = item.desc;
                            onFilterDone();
                        }
                        return childList;
                    }
                })
                .onRightItemClickListener(new DoubleListView.OnRightItemClickListener<FilterType, String>() {
                    @Override
                    public void onRightItemClick(FilterType item, String string) {
                        FilterUrl.instance().doubleListLeft = item.desc;
                        FilterUrl.instance().doubleListRight = string;
                        FilterUrl.instance().position = i;
                        FilterUrl.instance().positionTitle = string;
                        onFilterDone();
                    }
                });
        //初始化选中.
        comTypeDoubleListView.setLeftList(list, 0);
        comTypeDoubleListView.setRightList(child, -1);
        comTypeDoubleListView.getLeftListView().setBackgroundColor(mContext.getResources().getColor(R.color.b_c_fafafa));
        return comTypeDoubleListView;
    }

    private void onFilterDone() {
        if (onFilterDoneListener != null) {
            onFilterDoneListener.onFilterDone(0, "", "");
        }
    }
}
app/src/main/java/com/keephealth/app/utils/OkhttpManager.java
public class OkhttpManager {
    private static final String FILE_PREFIX="keephealth_";
    //OKhttp对象实例
    private OkHttpClient client;
    private static OkhttpManager okhttpManager;
    private Handler handler;

    private static OkhttpManager getInstance(){
        if(okhttpManager==null){
            okhttpManager=new OkhttpManager();
        }
        return  okhttpManager;
    }
    private OkhttpManager(){
        client=new OkHttpClient();
        handler=new Handler(Looper.getMainLooper());
    }
    /**
     * 同步Get请求方法
     * @param url
     * @return
     * @throws IOException
     */
    private Response p_getSync(String url)throws  IOException{
        final Request request = new Request.Builder()
                .url(url)
                .build();
        Call call = client.newCall(request);
        Response response = call.execute();
        return response;
    }

    /**
     * 进行发送同步GET请求，并且返回String类型数据
     * @param url
     * @return
     * @throws IOException
     */
    private String p_getSyncAsString(String url)throws  IOException{
        Response response=p_getSync(url);
        return response.body().string();
    }

    /**
     * 进行GET异步请求
     * @param url
     * @param callBack
     */
    private void p_getAsync(String url, final DataCallBack callBack){
        final Request request=new Request.Builder().url(url).build();
        client.newCall(request).enqueue(new Callback() {
            @Override
            public void onFailure(Request request, IOException e) {
                deliverFailure(request, e, callBack);
            }
            /**
             * 异步返回数据
             * @param response
             * @throws IOException
             */
            @Override
            public void onResponse(Response response) throws IOException {
                try {
                    deliverSuccess(response.body().string(), callBack);
                }catch (IOException e){
                    deliverFailure(request,e,callBack);
                }
            }
        });
    }
    /**
     *
     * @param url
     * @param params
     * @param callBack
     */
    private void p_postAsyncParams(String url,Map<String,String> params,final DataCallBack callBack){
        RequestBody requestBody=null;
        if(params==null){
            params=new HashMap<String,String>();
        }
            FormEncodingBuilder builder=new FormEncodingBuilder();
           for (Map.Entry<String,String> entry:params.entrySet()) {
                  String key=entry.getKey().toString();
                  String value=null;
                  if(entry.getValue()==null){
                      value="";
                  }else {
                      value=entry.getValue();
                  }
               builder.add(key,value);
           }
           requestBody=builder.build();
           final Request request=new Request.Builder().url(url).post(requestBody).build();
           client.newCall(request).enqueue(new Callback() {
            @Override
            public void onFailure(Request request, IOException e) {
                deliverFailure(request, e, callBack);
            }

            @Override
            public void onResponse(Response response) throws IOException {
                try {
                    deliverSuccess(response.body().string(), callBack);
                }catch (IOException e){
                    deliverFailure(request,e,callBack);
                }
            }
        });
    }
    /**
     * 进行异步下载文件
     * @param url  文件的地址
     * @param destDir  文件存储的绝对路径
     * @param callBack
     */
    private void p_downloadAsync(final String url, final String destDir,final DataCallBack callBack){
        final Request request=new Request.Builder().url(url).build();
        client.newCall(request).enqueue(new Callback() {
            @Override
            public void onFailure(Request request, IOException e) {
                  deliverFailure(request,e,callBack);
            }
            @Override
            public void onResponse(Response response) throws IOException {
                   //开始进行写入文件
                InputStream inputStream=null;
                FileOutputStream fileOutputStream=null;
                try {
                    inputStream=response.body().byteStream();
                    byte[] buffer=new byte[2048];
                    int len=0;
                    File file= new File(destDir,getFileName(url));
                    fileOutputStream=new FileOutputStream(file);
                    while((len=inputStream.read(buffer))!=-1){
                        fileOutputStream.write(buffer,0,len);
                    }
                    fileOutputStream.flush();
                    deliverSuccess(file.getAbsolutePath(),callBack);
                }catch (IOException e)
                {
                     deliverFailure(request,e,callBack);
                }finally {
                    if(fileOutputStream!=null){
                        fileOutputStream.close();
                    }
                    if(inputStream!=null){
                        inputStream.close();;
                    }
                }
            }
        });
    }

    /**
     * 根据文件URL地址获取文件的路径文件名
     * @param pUrl
     * @return
     */
    private String getFileName(String pUrl){
        int separatorIndex = pUrl.lastIndexOf("/");
        String path=(separatorIndex < 0) ? pUrl : pUrl.substring(separatorIndex + 1, pUrl.length());
        return FILE_PREFIX+path;
    }
    //*************************数据请求成功或者失败分发方法**********************
    /**
     * 进行分发请求失败的数据情况
     * @param request
     * @param e
     * @param callBack
     */
    private void deliverFailure(final Request request,final IOException e, final DataCallBack callBack){
        handler.post(new Runnable() {
            @Override
            public void run() {
                if (callBack != null) {
                    callBack.requestFailure(request, e);
                }
            }
        });
    }

    /**
     * 请求分发请求成功的数据情况
     * @param result
     * @param callBack
     */
    private void deliverSuccess(final String result, final DataCallBack callBack){
        handler.post(new Runnable() {
            @Override
            public void run() {
                if (callBack != null) {
                    callBack.requestSuccess(result);
                }
            }
        });
    }

    //*************对外公布的方法********************

    /**
     * 根据请求地址，进行发起GET同步请求,并且返回Response信息
     * @param url
     * @return
     * @throws IOException
     */
    public static Response getSync(String url) throws IOException{
        return  getInstance().p_getSync(url);
    }

    /**
     * 根据请求地址，进行发起GET同步请求,并且返回String信息
     * @param url
     * @return
     * @throws IOException
     */
    public static String getSyncAsString(String url)throws  IOException{
        return getInstance().p_getSyncAsString(url);
    }

    /**
     * 进行GET异步请求数据
     * @param url
     * @param callBack
     */
    public static void getAsync(String url,DataCallBack callBack){
         getInstance().p_getAsync(url, callBack);
    }

    /**
     * 进行POST异步请求数据
     * @param url
     * @param params  需要POST的数据
     * @param callBack
     */
    public static void postAsyncParams(String url,Map<String,String> params,DataCallBack callBack){
           getInstance().p_postAsyncParams(url, params, callBack);
    }

    /**
     * 进行异步下载文件
     * @param url  文件地址
     * @param destDir  存入本地的路径
     * @param callBack 下载成功回调
     */
    public static void downloadAsync(String url,String destDir,DataCallBack callBack){
            getInstance().p_downloadAsync(url,destDir,callBack);
    }

    //*************数据回调接口************************
    public interface DataCallBack{
        /**
         * 请求失败
         * @param request
         */
        void requestFailure(Request request, Exception e);

        /**
         * 请求成功
         * @param result
         */
        void requestSuccess(String result);
    }
}
app/src/main/java/com/keephealth/app/biz/CookBookManager.java
public class CookBookManager {
    public static List<SearchBean> getCooKBook(Document document){
        List<SearchBean> bean=new ArrayList<>();
        Element Element1=document.select("div.all").first().select("div.main_ys_list").first().select("div.main_list_left").first();
        if(Element1==null){
            return bean;
        }
        Elements Element=Element1.select("div.width735").first().select("ul").first().select("li");
        if(Element==null){
            return bean;
        }
        for(Element element:Element){
            String img=element.select("a").first().select("img").attr("abs:src");
            String date=element.select("span").first().select("i").text();
            String titleUrl=element.select("span").first().select("a").attr("href");
            String title=element.select("span").first().select("a").text();
            String content=element.select("p").first().text();
            String mask=element.select("em").select("a").text();
            SearchBean ss=new SearchBean();
            ss.setType(mask);
            ss.setIntro(content);
            ss.setTitle(title);
            ss.setDate(date);
            ss.setHref(titleUrl);
            ss.setClick(img);
            bean.add(ss);
        }
        return bean;
    }
}
app/src/main/java/com/keephealth/app/utils/FilterUrl.java
public class FilterUrl {
    private volatile static FilterUrl filterUrl;

    public FilterUrl() {
    }
    public static FilterUrl instance() {
        if (filterUrl == null) {
            synchronized (FilterUrl.class) {
                if (filterUrl == null) {
                    filterUrl = new FilterUrl();
                }
            }
        }
        return filterUrl;
    }
    public String singleListPosition;
    public String doubleListLeft;
    public String doubleListRight;

    public int position;
    public String positionTitle;
    public String titleUrl;

    public String getSingleListPosition() {
        return singleListPosition;
    }

    public void setSingleListPosition(String singleListPosition) {
        this.singleListPosition = singleListPosition;
    }

    public String getDoubleListLeft() {
        return doubleListLeft;
    }

    public void setDoubleListLeft(String doubleListLeft) {
        this.doubleListLeft = doubleListLeft;
    }

    public String getDoubleListRight() {
        return doubleListRight;
    }

    public void setDoubleListRight(String doubleListRight) {
        this.doubleListRight = doubleListRight;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public String getPositionTitle() {
        return positionTitle;
    }

    public void setPositionTitle(String positionTitle) {
        this.positionTitle = positionTitle;
    }

    public String getTitleUrl() {
        return titleUrl;
    }

    public void setTitleUrl(String titleUrl) {
        this.titleUrl = titleUrl;
    }

    public void clear() {
        filterUrl = null;
    }
}
app/src/main/java/com/keephealth/app/ui/base/BaseActivity.java
public class BaseActivity extends AppCompatActivity {
    protected TextView mBaseBack, mBaseTitle, mBaseSubmit;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        ActivityStack.create().addActivity(this);
        super.onCreate(savedInstanceState);
        initSystemBarTint();
    }


    /**
     * 子类可以重写改变状态栏颜色
     */
    protected int setStatusBarColor() {
        return getColorPrimary();
    }

    /**
     * 子类可以重写决定是否使用透明状态栏
     */
    protected boolean translucentStatusBar() {
        return false;
    }

    /**
     * 获取主题色
     */
    public int getColorPrimary() {
        TypedValue typedValue = new TypedValue();
        getTheme().resolveAttribute(R.attr.colorPrimary, typedValue, true);
        return typedValue.data;
    }

    /**
     * 获取深主题色
     */
    public int getDarkColorPrimary() {
        TypedValue typedValue = new TypedValue();
        getTheme().resolveAttribute(R.attr.colorPrimaryDark, typedValue, true);
        return typedValue.data;
    }

    /**
     * 设置状态栏颜色
     */
    protected void initSystemBarTint() {
        if (translucentStatusBar()) {
            // 设置状态栏全透明
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
                getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
                getWindow().setStatusBarColor(setStatusBarColor());
                getWindow().setNavigationBarColor(Color.TRANSPARENT);
                ViewGroup mContentView = (ViewGroup) findViewById(Window.ID_ANDROID_CONTENT);
                View mChildView = mContentView.getChildAt(0);
                if (mChildView != null) {
                    ViewCompat.setFitsSystemWindows(mChildView, false);
                }
            } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                ViewGroup mContentView = (ViewGroup)findViewById(Window.ID_ANDROID_CONTENT);
                View mChildView = mContentView.getChildAt(0);
                if (mChildView != null) {
                    ViewCompat.setFitsSystemWindows(mChildView, false);
                }
                int statusBarHeight = getStatusBarHeight();
                getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
                if (mChildView != null && mChildView.getLayoutParams() != null && mChildView.getLayoutParams().height == statusBarHeight) {
                    mContentView.removeView(mChildView);
                    mChildView = mContentView.getChildAt(0);
                }
                if (mChildView != null) {
                    FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mChildView.getLayoutParams();
                    if (lp != null && lp.topMargin >= statusBarHeight) {
                        lp.topMargin -= statusBarHeight;
                        mChildView.setLayoutParams(lp);
                    }
                }
            }
            return;
        }
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            //4.4-5.0使用三方工具类，有些4.4的手机有问题，这里为演示方便，不使用沉浸式
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
            SystemBarTintManager tintManager = new SystemBarTintManager(this);
            tintManager.setStatusBarTintColor(setStatusBarColor());
            tintManager.setNavigationBarTintColor(setStatusBarColor());
//            tintManager.setNavigationBarAlpha(0.3f);
            tintManager.setStatusBarTintEnabled(true);
            tintManager.setNavigationBarTintEnabled(true);
        } else if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
            getWindow().setStatusBarColor(setStatusBarColor());
            getWindow().setNavigationBarColor(setStatusBarColor());
            ViewGroup mContentView = (ViewGroup)findViewById(Window.ID_ANDROID_CONTENT);
            View mChildView = mContentView.getChildAt(0);
            if (mChildView != null) {
                ViewCompat.setFitsSystemWindows(mChildView, true);
            }
        }
    }

    /**
     * 设置标题栏
     */
    protected void setStatusBar() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            final ViewGroup linear_bar = (ViewGroup) findViewById(R.id.bar_layout);
            final int statusHeight = getStatusBarHeight();
            linear_bar.post(new Runnable() {
                @Override
                public void run() {
                    int titleHeight = linear_bar.getHeight();
                    android.widget.LinearLayout.LayoutParams params = (android.widget.LinearLayout.LayoutParams) linear_bar.getLayoutParams();
                    params.height = statusHeight + titleHeight;
                    linear_bar.setLayoutParams(params);
                }
            });
        }
    }

    /**
     * 初始化头部
     *
     * @param title
     */
    protected void initTitle(String title) {
        mBaseBack = (TextView) findViewById(R.id.headerBack);
        mBaseTitle = (TextView) findViewById(R.id.headerText);
        mBaseSubmit = (TextView) findViewById(R.id.headerSubmit);
        mBaseTitle.setText(title);
        mBaseBack.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                finish();
            }
        });
    }

    /**
     * 获取状态栏的高度
     *
     * @return
     */
    protected int getStatusBarHeight() {
        try {
            Class<?> c = Class.forName("com.android.internal.R$dimen");
            Object obj = c.newInstance();
            Field field = c.getField("status_bar_height");
            int x = Integer.parseInt(field.get(obj).toString());
            return getResources().getDimensionPixelSize(x);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return 0;
    }

    protected void openActivity(Class<?> mClass, Bundle bundle) {
        Intent intent = new Intent(this, mClass);
        if (null != bundle) {
            intent.putExtras(bundle);
        }
        startActivity(intent);
//        overridePendingTransition(R.anim.push_left_in,R.anim.push_left_out);
    }

    protected void openActivity(Class<?> pClass) {
        Intent mIntent = new Intent(this, pClass);
        this.startActivity(mIntent);
    }
}


Question: package com.keephealth.app.ui;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import com.baiiu.filter.DropDownMenu;
import com.baiiu.filter.interfaces.OnFilterDoneListener;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.keephealth.app.R;
import com.keephealth.app.biz.CookBookManager;
import com.keephealth.app.common.Config;
import com.keephealth.app.entity.SearchBean;
import com.keephealth.app.ui.adapter.CookBookAdapter;
import com.keephealth.app.ui.adapter.DropMenuAdapter;
import com.keephealth.app.ui.base.BaseActivity;
import com.keephealth.app.utils.DividerItemDecoration;
import com.keephealth.app.utils.FilterType;
import com.keephealth.app.utils.FilterUrl;
import com.keephealth.app.utils.OkhttpManager;
import com.squareup.okhttp.Request;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import static com.chad.library.adapter.base.BaseQuickAdapter.ALPHAIN;






public class MentalityHealthActivity extends BaseActivity implements OnFilterDoneListener,BaseQuickAdapter.RequestLoadMoreListener, SwipeRefreshLayout.OnRefreshListener{
    RecyclerView dymdicCycler;
    List<SearchBean> searchBean;
    SwipeRefreshLayout swipeLayout;
Answer:     DropDownMenu dropDownMenu;