package com.hjx.personalcenter.fragment; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.hjx.personalcenter.R; /** * Created by h on 2017/8/12. */ public class PresonInfoFragment extends Fragment { private View mView; private int type; public static String TABLAYOUT_FRAGMENT = "tab_fragment"; public static PresonInfoFragment newInstance(int type) { PresonInfoFragment fragment = new PresonInfoFragment(); Bundle bundle = new Bundle(); bundle.putSerializable(TABLAYOUT_FRAGMENT, type); fragment.setArguments(bundle); return fragment; } @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { if (mView == null) { mView = inflater.inflate(R.layout.fragment_changge_presonal_info, container, false); initView(mView); initData(); setLister(); } return mView; } //初始化 private void initView(View mView) { } private void initData() { } private void setLister() { } }