// Path: app/src/main/java/com/wheat7/cashew/activity/InfoActivity.java
// public class InfoActivity extends BaseActivity<ActivityInfoBinding> {
// 
// 
//     @Override
//     public int getLayoutId() {
//         return R.layout.activity_info;
//     }
// 
//     @Override
//     public void initView(Bundle savedInstanceState) {
//         getBinding().setAct(this);
//         getBinding().setVm(new InfoViewModel());
//         getBinding().getVm().mImageCacheSize = GlideCacheUtil.getInstance().getCacheSize(this);
//         getBinding().getVm().notifyPropertyChanged(BR.imageCacheSize);
//     }
// 
//     /**
//      * Back click
//      */
//     public void onIcBackClick() {
//         this.finish();
//     }
// 
//     /**
//      * Feedback click
//      */
//     public void onFeedBackClick() {
//         Intent intent  = new Intent(this, WebActivity.class);
//         intent.putExtra("URL","https://github.com/wheat7/Cashew/issues");
//         startActivity(intent);
//     }
// 
//     /**
//      * Feedback click
//      */
//     public void onCheckUpdateClick() {
//         Intent intent  = new Intent(this, WebActivity.class);
//         intent.putExtra("URL","https://github.com/wheat7/Cashew");
//         startActivity(intent);
//     }
// 
//     /**
//      * Clear cache click
//      */
//     public void onClearCacheClick() {
//         GlideCacheUtil.getInstance().clearImageAllCache(this);
//         Toast.makeText(this, "清除了" + getBinding().getVm().mImageCacheSize + "的缓存", Toast.LENGTH_LONG).show();
//         getBinding().getVm().mImageCacheSize = GlideCacheUtil.getInstance().getCacheSize(this);
//         getBinding().getVm().notifyPropertyChanged(BR.imageCacheSize);
//     }
// 
//     /**
//      * About click
//      */
//     public void onAboutClick() {
//         Intent intent = new Intent(this, AboutActivity.class);
//         startActivity(intent);
//     }
// }
// 
// Path: app/src/main/java/com/wheat7/cashew/adapter/BaseFragmentPageAdapter.java
// public class BaseFragmentPageAdapter extends FragmentPagerAdapter {
// 
//     private List<String> mTabs = new ArrayList<>();
//     private List<android.support.v4.app.Fragment> mFragmentList = new ArrayList<>();
// 
//     public BaseFragmentPageAdapter(FragmentManager fm) {
//         super(fm);
//     }
// 
//     public BaseFragmentPageAdapter(FragmentManager fm, List<String> tabs, List<Fragment> fragmentList) {
//         super(fm);
//         mTabs = tabs;
//         mFragmentList = fragmentList;
//     }
// 
//     @Override
//     public Fragment getItem(int position) {
//         return mFragmentList.get(position);
//     }
// 
//     @Override
//     public int getCount() {
//         return mTabs ==null ? 0 : mTabs.size();
//     }
// 
//     @Override
//     public CharSequence getPageTitle(int position) {
//         return  mTabs.get(position);
//     }
// 
//     public void addItem(String title, Fragment fragment) {
//         mFragmentList.add(fragment);
//         mTabs.add(title);
//     }
// 
//     public void setTabs(List<String> tabs) {
//         mTabs = tabs;
//     }
// 
//     public void setFragmentList(List<Fragment> fragmentList) {
//         mFragmentList = fragmentList;
//     }
// 
//     public void setItems(List<String> tabs, List<Fragment> fragmentList) {
//         mTabs = tabs;
//         mFragmentList = fragmentList;
//     }
// 
// 
// 
// 
// }
// 
// Path: app/src/main/java/com/wheat7/cashew/base/BaseFragment.java
// public abstract class BaseFragment<T extends ViewDataBinding> extends Fragment {
// 
//     public View mainLayout;
//     private ViewDataBinding binding;
// 
// 
//     @Nullable
//     @Override
//     public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
//         int layoutId=getLayoutId();
//         try {
//             binding= DataBindingUtil.inflate(inflater,layoutId, container, false);
//             mainLayout=binding.getRoot();
//         }catch (NoClassDefFoundError e){
//             mainLayout=inflater.inflate(layoutId, container, false);
//         }
//         mainLayout.setClickable(true);
//         initView(savedInstanceState);
//         return mainLayout;
//     }
// 
//     public T getBinding(){
//         return (T) binding;
//     }
// 
//     public  abstract int getLayoutId();
//     public  abstract void initView(Bundle savedInstanceState);
// 
// }


import android.content.Intent;
import android.os.Bundle;
import com.wheat7.cashew.R;
import com.wheat7.cashew.activity.InfoActivity;
import com.wheat7.cashew.adapter.BaseFragmentPageAdapter;
import com.wheat7.cashew.base.BaseFragment;
import com.wheat7.cashew.databinding.FragmentClassifyBinding;
package com.wheat7.cashew.fragment;



/**
 * Created by wheat7 on 2017/8/5.
 */

public class ClassifyFragment extends BaseFragment<FragmentClassifyBinding>{

    @Override
    public int getLayoutId() {
        return R.layout.fragment_classify;
    }

    @Override
    public void initView(Bundle savedInstanceState) {
// Path: app/src/main/java/com/wheat7/cashew/activity/InfoActivity.java
// public class InfoActivity extends BaseActivity<ActivityInfoBinding> {
// 
// 
//     @Override
//     public int getLayoutId() {
//         return R.layout.activity_info;
//     }
// 
//     @Override
//     public void initView(Bundle savedInstanceState) {
//         getBinding().setAct(this);
//         getBinding().setVm(new InfoViewModel());
//         getBinding().getVm().mImageCacheSize = GlideCacheUtil.getInstance().getCacheSize(this);
//         getBinding().getVm().notifyPropertyChanged(BR.imageCacheSize);
//     }
// 
//     /**
//      * Back click
//      */
//     public void onIcBackClick() {
//         this.finish();
//     }
// 
//     /**
//      * Feedback click
//      */
//     public void onFeedBackClick() {
//         Intent intent  = new Intent(this, WebActivity.class);
//         intent.putExtra("URL","https://github.com/wheat7/Cashew/issues");
//         startActivity(intent);
//     }
// 
//     /**
//      * Feedback click
//      */
//     public void onCheckUpdateClick() {
//         Intent intent  = new Intent(this, WebActivity.class);
//         intent.putExtra("URL","https://github.com/wheat7/Cashew");
//         startActivity(intent);
//     }
// 
//     /**
//      * Clear cache click
//      */
//     public void onClearCacheClick() {
//         GlideCacheUtil.getInstance().clearImageAllCache(this);
//         Toast.makeText(this, "清除了" + getBinding().getVm().mImageCacheSize + "的缓存", Toast.LENGTH_LONG).show();
//         getBinding().getVm().mImageCacheSize = GlideCacheUtil.getInstance().getCacheSize(this);
//         getBinding().getVm().notifyPropertyChanged(BR.imageCacheSize);
//     }
// 
//     /**
//      * About click
//      */
//     public void onAboutClick() {
//         Intent intent = new Intent(this, AboutActivity.class);
//         startActivity(intent);
//     }
// }
// 
// Path: app/src/main/java/com/wheat7/cashew/adapter/BaseFragmentPageAdapter.java
// public class BaseFragmentPageAdapter extends FragmentPagerAdapter {
// 
//     private List<String> mTabs = new ArrayList<>();
//     private List<android.support.v4.app.Fragment> mFragmentList = new ArrayList<>();
// 
//     public BaseFragmentPageAdapter(FragmentManager fm) {
//         super(fm);
//     }
// 
//     public BaseFragmentPageAdapter(FragmentManager fm, List<String> tabs, List<Fragment> fragmentList) {
//         super(fm);
//         mTabs = tabs;
//         mFragmentList = fragmentList;
//     }
// 
//     @Override
//     public Fragment getItem(int position) {
//         return mFragmentList.get(position);
//     }
// 
//     @Override
//     public int getCount() {
//         return mTabs ==null ? 0 : mTabs.size();
//     }
// 
//     @Override
//     public CharSequence getPageTitle(int position) {
//         return  mTabs.get(position);
//     }
// 
//     public void addItem(String title, Fragment fragment) {
//         mFragmentList.add(fragment);
//         mTabs.add(title);
//     }
// 
//     public void setTabs(List<String> tabs) {
//         mTabs = tabs;
//     }
// 
//     public void setFragmentList(List<Fragment> fragmentList) {
//         mFragmentList = fragmentList;
//     }
// 
//     public void setItems(List<String> tabs, List<Fragment> fragmentList) {
//         mTabs = tabs;
//         mFragmentList = fragmentList;
//     }
// 
// 
// 
// 
// }
// 
// Path: app/src/main/java/com/wheat7/cashew/base/BaseFragment.java
// public abstract class BaseFragment<T extends ViewDataBinding> extends Fragment {
// 
//     public View mainLayout;
//     private ViewDataBinding binding;
// 
// 
//     @Nullable
//     @Override
//     public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
//         int layoutId=getLayoutId();
//         try {
//             binding= DataBindingUtil.inflate(inflater,layoutId, container, false);
//             mainLayout=binding.getRoot();
//         }catch (NoClassDefFoundError e){
//             mainLayout=inflater.inflate(layoutId, container, false);
//         }
//         mainLayout.setClickable(true);
//         initView(savedInstanceState);
//         return mainLayout;
//     }
// 
//     public T getBinding(){
//         return (T) binding;
//     }
// 
//     public  abstract int getLayoutId();
//     public  abstract void initView(Bundle savedInstanceState);
// 
// }


// Path: app/src/main/java/com/wheat7/cashew/fragment/ClassifyFragment.java
import android.content.Intent;
import android.os.Bundle;
import com.wheat7.cashew.R;
import com.wheat7.cashew.activity.InfoActivity;
import com.wheat7.cashew.adapter.BaseFragmentPageAdapter;
import com.wheat7.cashew.base.BaseFragment;
import com.wheat7.cashew.databinding.FragmentClassifyBinding;

package com.wheat7.cashew.fragment;



/**
 * Created by wheat7 on 2017/8/5.
 */

public class ClassifyFragment extends BaseFragment<FragmentClassifyBinding>{

    @Override
    public int getLayoutId() {
        return R.layout.fragment_classify;
    }

    @Override
    public void initView(Bundle savedInstanceState) {
        getBinding().setFrag(this);