Answer the question
In order to leave comments, you need to log in
How to make several selects with a choice from one array of values?
There is a form with field matching, for each field you need to select a value from an array of values, and for each field the value must be unique. Is there a way to do this without much effort?
Answer the question
In order to leave comments, you need to log in
You can use it as EVGENY T suggests.
You can immediately pass it to the class where you will use it:
public void n_ot() {
num_of_tr.get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
@Override
public void onSuccess(DocumentSnapshot documentSnapshot) {
if (documentSnapshot.exists()) {
//String amount_not = documentSnapshot.getString(AMOUNT);
//anotherClass.setAmountNot(amount_not);
anotherClass.setAmountNot(documentSnapshot.getString(AMOUNT));
}
}
});
}
public class AnotherClass{
String amount_not;
//...
public void setAmounntNot(String value){
this.amount_not = value;
}
//...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question