Answer the question
In order to leave comments, you need to log in
Is it possible to override a Java 11 anonymous class method?
There is an anonymous adapter class
public class MyAdapter extends ArrayAdapter<T> {
pubic View getView(params){
return view;
}
}
return new MyAdapter (){
public View getView(params){
return customnizedView;
}
}
Answer the question
In order to leave comments, you need to log in
To begin with, you have some kind of recursion that is not very clear to me in the very first sentence of the question: "Json arrives in which, among other things, there is the date of the participants' performance. You need to compare this date with the date in json." Which one with which?)
Then I didn’t understand the contents of the objects: what is date and what is dataRel and is it the same date?
But in general, it does not matter, then everything will be simple.
I confess, I’m too lazy to invent a ready-made solution, but if you are satisfied with the outline, then it’s like this:
Dates can be converted to timestamp, somehow right off the bat it doesn’t turn out very correctly for me (when translating the parsed string back into a date, the time is an hour behind), but I feel a problem in binding in GMT, this is solvable. And already the timestamps are compared as ordinary numbers, I don’t see any further difficulties.
For example, like this:
a = new Date(Date.parse('Wednesday, November 04, 2015' + ' 13:30'))
b = new Date(Date.parse('Wednesday, November 04, 2015' + ' 11:30'))
if (a > b) {
// что-нибудь натворим тут
}
public class MyAdapter extends ArrayAdapter<T> { pubic View getView(params){ return view; } }
return new MyAdapter (){ public View getView(params){ return customnizedView; } }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question