@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_activity_layout); TitleFragment titleFragment = TitleFragment.getInstance(); getSupportFragmentManager() .beginTransaction() .replace(R.id.title_fragment, titleFragment) .commitAllowingStateLoss(); adapter = new OrderAdapter(this, 0); fragment = FlightOrderListFragment.getInstance(); getSupportFragmentManager() .beginTransaction() .replace(R.id.fragment_layout, fragment) .commitAllowingStateLoss(); payUtil = new UnipayUtil(this); payUtil.setOnPayFinishedListener( new OnPayFinishedListener() { @Override public void onPayfinished(boolean isSuccessed) { fragment.setContentShown(false); getOrderList(); } }); }
@Override protected void onActivityResult(int arg0, int arg1, Intent data) { super.onActivityResult(arg0, arg1, data); payUtil.processPayResult(data); }