If you’re looking
A Few Good Reaso
All relevant data
Gift Baskets Freq
The long term obje
The present invent
Cochlear implant s
It has been sugges
SALT LAKE CITY — A
The influence of n

What to know about
Q: JUnit Test cas
/** * Copyright 2
MILAN - Italy's an
Lymph nodes in the
Bisphenol A and lo
Q: How to use ng-
The goal of this p
The present invent
Mozilla has been t
Q: Android how to get the id value when click button? I have this class called AddEditProduct: public class AddEditProduct extends AppCompatActivity { private EditText categoryName; private EditText productName; private EditText unitOfMeasure; private EditText price; private EditText stock; private ImageButton button; private long id; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_add_edit_product); setTitle("Add Product"); categoryName = (EditText) findViewById(R.id.categoryName); productName = (EditText) findViewById(R.id.productName); unitOfMeasure = (EditText) findViewById(R.id.unitOfMeasure); price = (EditText) findViewById(R.id.price); stock = (EditText) findViewById(R.id.stock); button = (ImageButton) findViewById(R.id.button); id = 0; Button b = (Button) findViewById(R.id.button2); Intent intent = new Intent(AddEditProduct.this, AddEditProduct2.class); Bundle b = new Bundle(); b.putInt("catid", id); b.putString("name", categoryName.getText().toString()); b.putInt("num", id); b.putInt("numofam", numOfProductName); intent.putExtras(b); intent.setClass(AddEditProduct.this, AddEditProduct2.class); startActivity(intent); Toast.makeText(getApplicationContext(), "test", Toast.LENGTH_LONG).show(); id = getIntent().getIntExtra("catid", 0); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { b.putInt("catid", id); b.putString("name", categoryName.getText().toString()); b.putInt("num", id); b.putInt("numofam", numOfProductName); id = getIntent().getIntExtra("catid", 0); Intent intent2 = new Intent(AddEditProduct.this, AddEditProduct3.class); startActivity(intent2); } }); } In this class I try to get the ID value when I click button2 but I don't know how can I do that. I already tried with Intent.getIntExtra. AddEditProduct.xml: AddEditProduct2.xml: