title: Retrieve new item first from firebase realtime database
body: <pre><code>private void loadOrders(String phone) {
  
      adapter = new FirebaseRecyclerAdapter&lt;Request, OrderViewHolder&gt;(
              Request.class,
                R.layout.order_layout,
              OrderViewHolder.class,
              requests.orderByChild("phone")
                      .equalTo(phone)
  
      ) {
          @Override
          protected void populateViewHolder(OrderViewHolder viewHolder, final Request model, final int position) {
              viewHolder.txtOrderId.setText("Order ID: "+adapter.getRef(position).getKey());
              viewHolder.txtOrderStatus.setText("Order Status: "+convertCodeToStatus(model.getStatus()));
              viewHolder.txtOrderAddress.setText("Address: "+model.getAddress());
              viewHolder.txtOrderPhone.setText("Phone Number: "+model.getPhone());
              viewHolder.txtOrderComment.setText("Order Note: "+model.getComment());
              viewHolder.txtOrderDate.setText("Order Date: "+Common.getDate(Long.parseLong(adapter.getRef(position).getKey())));
              viewHolder.btn_delete.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
  
                          alertdialog(position);
  
  
                  }
              });
  
              viewHolder.btnDetails.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View view) {
                      Intent orderDetail = new Intent(OrderStatus.this,OrderDetail.class);
                      Common.currentRequest=model;
                      Intent intent = orderDetail.putExtra("OrderId", adapter.getRef(position).getKey());
                      startActivity(orderDetail);
  
  
                  }
              });
  
              if((Common.convertCodeToStatus(model.getStatus())).equals("Delivered"))
              {
                  viewHolder.btndelivered.setVisibility(View.VISIBLE);
  
                  viewHolder.btn_delete.setVisibility(View.INVISIBLE);
              }
  
  
  
          }
      };
      recyclerView.setAdapter(adapter);
  }
  </code></pre>
  
  <p>this is the code I'm using to retrieve orders from the database but it shows old orders first.how do I make it retrieve new orders first?</p>
  
  <p>if I use ((LinearLayoutManager) layoutManager).setReverseLayout(true); it just displayes list upside down</p>
  
  <p><a href="https://i.stack.imgur.com/Amnfr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Amnfr.jpg" alt="enter image description here"></a></p>