hi guys i'm need your Help
I am doing a shopping app The user will enter the barcode and the program will enter the name and price of the product
Here is a picture of the table
But I don't know exactly how to do that. I used the "TableLayout" And I added 14 "tableRow" and here is my code
code=findViewById(R.id.barcode);
code.addTextChangedListener(enter);
}
private TextWatcher enter = new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if(code.getText().toString().trim().equals("659245631")) {
//what can i write here to add row like this
// (coulmn0,coulmn1)
// ( price , product name)
}
}
@Override
public void afterTextChanged(Editable s) {
if(code.getText().toString().trim().equals("659245631"))
{
}
}
};
But I do not know what is the required action Can you help me?
Aucun commentaire:
Enregistrer un commentaire