The simplest (but also the ugliest) will be the edittext with the input number.
But making a number collector from scratch is not so difficult.
You just need a Textview that takes a variable as text. Add a + and - button, which increase / decrease the variable and call Textview.setText (variable)
counter = 0; add = (Button) findViewById(R.id.bAdd); sub = (Button) findViewById(R.id.bSub); display = (TextView) findViewById(R.id.tvDisplay); add.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { counter++; display.setText( "" + counter); } }); sub.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { counter--; display.setText( "" + counter); } }); }
in xml just add 2 buttons with id bAdd and bSub and text image with id tvDisplay and arrange them as you want
source share