package tech.starwin.mvp.ui.activity;

import android.content.Intent;
import android.support.v4.app.FragmentActivity;


import tech.starwin.R;
import tech.starwin.base.BaseActivity;
import tech.starwin.mvp.ui.fragment.RegionFragment;
import tech.starwin.utils.context_utils.EasyActivityResult;
import tech.starwin.utils.context_utils.FragmentLauncher;

/**
 * Created by SiKang on 2018/9/27.
 */
public class RegionActivity extends BaseActivity {

    @Override
    public int bindLayout() {
        return R.layout.activity_region;
    }

    @Override
    public boolean useTopBar() {
        return false;
    }

    @Override
    public FragmentLauncher getFragmentLauncher() {
        return new FragmentLauncher(this, R.id.activity_area_frgmentLayout);
    }

    @Override
    public void initView() {
        startFragment(new RegionFragment(),false);
    }

    public static void startForResult(FragmentActivity activity, int requestCode, EasyActivityResult.OnResultListener listener) {
        Intent intent = new Intent(activity, RegionActivity.class);
        new EasyActivityResult(activity).startForResult(intent, requestCode, listener);
    }


    @Override
    public void onHttpSuccess(String action, Object result) {

    }

    @Override
    public void onHttpError(String action, String msg) {

    }
}
