How to use recyclerview viewtype?

I challenge the recyclerview viewtype, i have a problem,i don’t konw how too use the viewtype?

  1. Add a new property, mRequiresPolice, to the Crime object. Add the getter and setter method for this property.

  2. Override the following method in class CrimeAdapter.

int getItemViewType (int position)
  1. Create a new layout with a streamlined interface containing a button that says “contact police”.

  2. Change the constructor of CrimeHolder to use a View object instead of a LayoutInflater object and a ViewGroup object.

public CrimeHolder(View itemView)
  1. Create the CrimeHolder based on the different viewType value.
public CrimeHolder onCreateViewHolder(ViewGroup parent, int viewType)