// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/AppContext.java
// public class AppContext extends Application {
//     private static AppContext INSTANCE=null;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         INSTANCE=this;
//     }
// 
//     public static AppContext getInstance(){return INSTANCE;}
// }
// 
// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/data/xc/source/xcDetailRepository.java
// public class xcDetailRepository {
// 
//     public void load(Context context, final IxcDataSource.DetailLoadCallBack callback) {
//         String dummy = readDummy(context);
//         try {
//             callback.onSuccess(new Gson().fromJson(dummy, xcDetailResponse.class));
//         } catch (Exception e) {
//             callback.onError("dd");
//         }
//     }
// 
//     public void loadBody(Context context) {
//         String Result = "";
//         try {
//             InputStreamReader inputReader = new InputStreamReader(context.getAssets().open("xc_body_dummy.txt"));
//             BufferedReader bufReader = new BufferedReader(inputReader);
//             String line = "";
//             while ((line = bufReader.readLine()) != null) {
//                 Result += line;
//             }
//         } catch (Exception e) {
//             e.printStackTrace();
//         }
// 
//         List<xcArticleSection> body = new Gson().fromJson(Result, new TypeToken<List<xcArticleSection>>() {
//         }.getType());
// 
//         int count=body.size();
//     }
// 
//     private String readDummy(Context context) {
//         try {
//             InputStreamReader inputReader = new InputStreamReader(context.getAssets().open("xc_detail_dummy.txt"));
//             BufferedReader bufReader = new BufferedReader(inputReader);
//             String line="";
//             String Result="";
//             while((line = bufReader.readLine()) != null) {
//                 Result += line;
//             }
//             return Result;
//         } catch (Exception e) {
//             e.printStackTrace();
//         }
//         return null;
//     }
// }
// 
// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/presenter/xc/xcDetailContract.java
// public class xcDetailContract {
// 
//     public interface View extends BaseView<Presenter> {
//         void showContainer(xcDetailResponse response);
//     }
// 
//     public interface Presenter extends BasePresenter {
//         void load(Context context);
//     }
// }
// 
// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/presenter/xc/xcDetailPresenter.java
// public class xcDetailPresenter implements xcDetailContract.Presenter {
// 
//     private xcDetailRepository mRepo;
//     private xcDetailContract.View mView;
// 
//     public xcDetailPresenter(xcDetailContract.View view, xcDetailRepository repo) {
//         this.mView = view;
//         this.mRepo = repo;
//     }
// 
//     @Override
//     public void start() {
//     }
// 
//     @Override
//     public void load(Context context) {
//         mRepo.load(context, new IxcDataSource.DetailLoadCallBack() {
//             @Override
//             public void onSuccess(xcDetailResponse response) {
//                 mView.showContainer(response);
//             }
// 
//             @Override
//             public void onError(String msg) {
//                 mView.showError();
//             }
//         });
//     }
// 
// }
// 
// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/utils/ToastUtils.java
// public class ToastUtils {
// 
// 	private ToastUtils() {
// 		throw new AssertionError();
// 	}
// 
// 	public static void show(Context context, int resId) {
// 		show(context, context.getResources().getText(resId), Toast.LENGTH_SHORT);
// 	}
// 
// 	public static void show(Context context, int resId, int duration) {
// 		show(context, context.getResources().getText(resId), duration);
// 	}
// 
// 	public static void show(Context context, CharSequence text) {
// 		Toast.makeText(context, text, Toast.LENGTH_SHORT).show();
// 	}
// 
// 	public static void show(Context context, CharSequence text, int duration) {
// 		Toast.makeText(context, text, duration).show();
// 	}
// 
// 	public static void show(Context context, int resId, Object... args) {
// 		show(context,
// 				String.format(context.getResources().getString(resId), args),
// 				Toast.LENGTH_SHORT);
// 	}
// 
// 	public static void show(Context context, String format, Object... args) {
// 		show(context, String.format(format, args), Toast.LENGTH_SHORT);
// 	}
// 
// 	public static void show(Context context, int resId, int duration,
// 			Object... args) {
// 		show(context,
// 				String.format(context.getResources().getString(resId), args),
// 				duration);
// 	}
// 
// 	public static void show(Context context, String format, int duration,
// 			Object... args) {
// 		show(context, String.format(format, args), duration);
// 	}
// }


import android.content.Intent;
import android.os.Handler;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import com.huijimuhe.commonlayout.AppContext;
import com.huijimuhe.commonlayout.R;
import com.huijimuhe.commonlayout.data.xc.source.xcDetailRepository;
import com.huijimuhe.commonlayout.data.xc.xcDetailResponse;
import com.huijimuhe.commonlayout.presenter.xc.xcDetailContract;
import com.huijimuhe.commonlayout.presenter.xc.xcDetailPresenter;
import com.huijimuhe.commonlayout.utils.ToastUtils;
package com.huijimuhe.commonlayout.xc.detail;



public class xcDetailActivity extends AppCompatActivity implements xcDetailContract.View {

    private static final String TAG_LOADING = "loading";
    private static final String TAG_CONTAINER = "container";
    private xcDetailPresenter mPresenter;

    public static Intent newIntent() {
// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/AppContext.java
// public class AppContext extends Application {
//     private static AppContext INSTANCE=null;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         INSTANCE=this;
//     }
// 
//     public static AppContext getInstance(){return INSTANCE;}
// }
// 
// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/data/xc/source/xcDetailRepository.java
// public class xcDetailRepository {
// 
//     public void load(Context context, final IxcDataSource.DetailLoadCallBack callback) {
//         String dummy = readDummy(context);
//         try {
//             callback.onSuccess(new Gson().fromJson(dummy, xcDetailResponse.class));
//         } catch (Exception e) {
//             callback.onError("dd");
//         }
//     }
// 
//     public void loadBody(Context context) {
//         String Result = "";
//         try {
//             InputStreamReader inputReader = new InputStreamReader(context.getAssets().open("xc_body_dummy.txt"));
//             BufferedReader bufReader = new BufferedReader(inputReader);
//             String line = "";
//             while ((line = bufReader.readLine()) != null) {
//                 Result += line;
//             }
//         } catch (Exception e) {
//             e.printStackTrace();
//         }
// 
//         List<xcArticleSection> body = new Gson().fromJson(Result, new TypeToken<List<xcArticleSection>>() {
//         }.getType());
// 
//         int count=body.size();
//     }
// 
//     private String readDummy(Context context) {
//         try {
//             InputStreamReader inputReader = new InputStreamReader(context.getAssets().open("xc_detail_dummy.txt"));
//             BufferedReader bufReader = new BufferedReader(inputReader);
//             String line="";
//             String Result="";
//             while((line = bufReader.readLine()) != null) {
//                 Result += line;
//             }
//             return Result;
//         } catch (Exception e) {
//             e.printStackTrace();
//         }
//         return null;
//     }
// }
// 
// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/presenter/xc/xcDetailContract.java
// public class xcDetailContract {
// 
//     public interface View extends BaseView<Presenter> {
//         void showContainer(xcDetailResponse response);
//     }
// 
//     public interface Presenter extends BasePresenter {
//         void load(Context context);
//     }
// }
// 
// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/presenter/xc/xcDetailPresenter.java
// public class xcDetailPresenter implements xcDetailContract.Presenter {
// 
//     private xcDetailRepository mRepo;
//     private xcDetailContract.View mView;
// 
//     public xcDetailPresenter(xcDetailContract.View view, xcDetailRepository repo) {
//         this.mView = view;
//         this.mRepo = repo;
//     }
// 
//     @Override
//     public void start() {
//     }
// 
//     @Override
//     public void load(Context context) {
//         mRepo.load(context, new IxcDataSource.DetailLoadCallBack() {
//             @Override
//             public void onSuccess(xcDetailResponse response) {
//                 mView.showContainer(response);
//             }
// 
//             @Override
//             public void onError(String msg) {
//                 mView.showError();
//             }
//         });
//     }
// 
// }
// 
// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/utils/ToastUtils.java
// public class ToastUtils {
// 
// 	private ToastUtils() {
// 		throw new AssertionError();
// 	}
// 
// 	public static void show(Context context, int resId) {
// 		show(context, context.getResources().getText(resId), Toast.LENGTH_SHORT);
// 	}
// 
// 	public static void show(Context context, int resId, int duration) {
// 		show(context, context.getResources().getText(resId), duration);
// 	}
// 
// 	public static void show(Context context, CharSequence text) {
// 		Toast.makeText(context, text, Toast.LENGTH_SHORT).show();
// 	}
// 
// 	public static void show(Context context, CharSequence text, int duration) {
// 		Toast.makeText(context, text, duration).show();
// 	}
// 
// 	public static void show(Context context, int resId, Object... args) {
// 		show(context,
// 				String.format(context.getResources().getString(resId), args),
// 				Toast.LENGTH_SHORT);
// 	}
// 
// 	public static void show(Context context, String format, Object... args) {
// 		show(context, String.format(format, args), Toast.LENGTH_SHORT);
// 	}
// 
// 	public static void show(Context context, int resId, int duration,
// 			Object... args) {
// 		show(context,
// 				String.format(context.getResources().getString(resId), args),
// 				duration);
// 	}
// 
// 	public static void show(Context context, String format, int duration,
// 			Object... args) {
// 		show(context, String.format(format, args), duration);
// 	}
// }


// Path: CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/xc/detail/xcDetailActivity.java
import android.content.Intent;
import android.os.Handler;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import com.huijimuhe.commonlayout.AppContext;
import com.huijimuhe.commonlayout.R;
import com.huijimuhe.commonlayout.data.xc.source.xcDetailRepository;
import com.huijimuhe.commonlayout.data.xc.xcDetailResponse;
import com.huijimuhe.commonlayout.presenter.xc.xcDetailContract;
import com.huijimuhe.commonlayout.presenter.xc.xcDetailPresenter;
import com.huijimuhe.commonlayout.utils.ToastUtils;

package com.huijimuhe.commonlayout.xc.detail;



public class xcDetailActivity extends AppCompatActivity implements xcDetailContract.View {

    private static final String TAG_LOADING = "loading";
    private static final String TAG_CONTAINER = "container";
    private xcDetailPresenter mPresenter;

    public static Intent newIntent() {
        Intent intent = new Intent(AppContext.getInstance(),