+ 1

Filter json by its category_id in java

Hi everyone, I am parsing my json through volley library and now I want to filter it by category, for ex, when i press the specific button it should show cities that have category_id=1 and hide others

23rd Apr 2019, 8:12 PM
Valon Abdi
Valon Abdi - avatar
7 odpowiedzi
+ 1
Read about filter design pattern. It may help you in this.
24th Apr 2019, 6:04 AM
Kartik
Kartik - avatar
+ 1
It is also known as Criteria design pattern. Check this link: https://www.tutorialspoint.com/design_pattern/filter_pattern.htm
24th Apr 2019, 6:05 AM
Kartik
Kartik - avatar
+ 1
can you show me an example with recycler view
24th Apr 2019, 9:02 AM
Valon Abdi
Valon Abdi - avatar
+ 1
thank you
25th Apr 2019, 8:25 AM
Valon Abdi
Valon Abdi - avatar
+ 1
No I still can’t fix it but thanks for your response
25th Apr 2019, 2:57 PM
Valon Abdi
Valon Abdi - avatar
0
Sorry but I'm not skilled enough in Java to do that. I knew the pattern so I suggested it...
24th Apr 2019, 9:04 AM
Kartik
Kartik - avatar
0
Valon Abdi So, it worked?
25th Apr 2019, 11:37 AM
Kartik
Kartik - avatar