1. Are you ready for the Galaxy S20? Here is everything we know so far!

Filtering on json

Discussion in 'Android Development' started by Chin Chun Seong, Nov 2, 2019.

  1. Chin Chun Seong

    Thread Starter

    upload_2019-11-2_22-4-5.png
    I would like to do a filter on only ht==176, but I cant found reference on it and some of it maybe difference from my coding pattern, anyone can help me on this topic ?

    Query query=reff.child("Member").orderByChild("ht").equalTo("176");
    query.addListenerForSingleValueEvent(new ValueEventListener() {
    @override
    public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
    String value = (String) dataSnapshot.getValue();
    textView_result.setText(editText_name.toString());
    }



    @override
    public void onCancelled(@NonNull DatabaseError databaseError) {

    }
    });
     

    Attached Files:




    1. Download the Forums for Android™ app!


      Download

       
Loading...

Share This Page

Loading...