Esempio n. 1
0
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {

    switch (item.getItemId()) {
      case R.id.add_asset:
        Log.i("The Button Clicked..: " + item, "OK.........");

        // Toast.makeText(getActivity(), "You clicked..", Toast.LENGTH_SHORT).show();

        Bundle args = new Bundle();
        menu_add_asset menuasset = new menu_add_asset();

        args.putString("name", assetname1);
        args.putString("mark", mark1);
        args.putString("model", model1);
        args.putString("serialno", serialno1);
        args.putString("code", code1);

        args.putString("barcode_no", barcode_no1);

        args.putString("property_stock_asset", location1);
        args.putString("category_id", category1);
        args.putString("equipment_type", equipment1);

        Log.i(
            "The VAlue Is ADD ASSET....," + assetname1 + "" + mark1 + "" + model1 + "" + location1,
            "OK.....Valuess");

        // menuedit.setArguments(args);
        menuasset.setArguments(args);

        FragmentListener mfrag = (FragmentListener) getActivity();
        android.support.v4.app.FragmentManager frm = getActivity().getSupportFragmentManager();

        mfrag.startMainFragment(menuasset, true);

        return true;
    }

    return true;
  }
Esempio n. 2
0
  public void onItemClick(AdapterView<?> parent, View view, int position, long id) {

    OEHelper oehelper1 = new OEHelper(getActivity());
    oehelper1.Qr_Equipment_Detail();

    checkforeditornot = false;
    position1 = 0;
    position1 = position;

    OEHelper.selected_Assets_id = "";
    if (OEHelper.id.size() > position1) {
      OEHelper.selected_Assets_id = OEHelper.id.get(position1);
    }

    QR_equip_detail qr_detail = new QR_equip_detail();

    FragmentListener frag1 = (FragmentListener) getActivity();
    android.support.v4.app.FragmentManager fm1 = getActivity().getSupportFragmentManager();

    frag1.startDetailFragment(qr_detail);
  }