code: private void inflateLayout() {
          View view = View.inflate(getContext(), R.layout.chip, null);
          imageView = view.findViewById(android.R.id.icon);
          textView = view.findViewById(android.R.id.text1);
          closeButton = view.findViewById(android.R.id.closeButton);
          closeButton.setOnClickListener(createCloseButtonListener());
          int height = getResources().getDimensionPixelSize(R.dimen.chip_height);
          addView(view, LayoutParams.WRAP_CONTENT, height);
      }
docs: Inflates the view's layout.