Open natsirasrafi opened 2 years ago
in My MainActivtiy button trigger run fragment :
ScanFragment sf = new ScanFragment(); getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container,sf).commit();
in my Fragment Class :
public static ScanFragment newInstance() { return new ScanFragment(); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_scan, container, false); barcodeView = rootView.findViewById(R.id.barcode_view); barcodeView.setStatusText(""); capture = new CaptureManager(getActivity(), barcodeView); capture.initializeFromIntent(getActivity().getIntent(), savedInstanceState); capture.decode(); return rootView; }
if i run fragment with new IntentIntegrator(this).setCaptureActivity(TabbedScanning.class).initiateScan();
is running well , but i want run with :
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container,sf).commit();
in My MainActivtiy button trigger run fragment :
ScanFragment sf = new ScanFragment(); getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container,sf).commit();
in my Fragment Class :
if i run fragment with new IntentIntegrator(this).setCaptureActivity(TabbedScanning.class).initiateScan();
is running well , but i want run with :
because i split my layout with frame layout. when i run with initiateScan() is open new page i want to process result in my mainactivity with intentintegrator