content: package androidx.recyclerview.widget;
  
  import android.graphics.Canvas;
  import android.os.Build;
  import android.view.View;
  import androidx.core.view.ViewCompat;
  import androidx.recyclerview.R;
  
  class ItemTouchUIUtilImpl implements ItemTouchUIUtil {
      static final ItemTouchUIUtil INSTANCE = new ItemTouchUIUtilImpl();
  
      ItemTouchUIUtilImpl() {
      }
  
      private static float findMaxElevation(RecyclerView recyclerView, View itemView) {
          int childCount = recyclerView.getChildCount();
          float f = 0.0f;
          for (int i = 0; i < childCount; i++) {
              View childAt = recyclerView.getChildAt(i);
              if (childAt != itemView) {
                  float elevation = ViewCompat.getElevation(childAt);
                  if (elevation > f) {
                      f = elevation;
                  }
              }
          }
          return f;
      }
  
      public void clearView(View view) {
          if (Build.VERSION.SDK_INT >= 21) {
              Object tag = view.getTag(R.id.item_touch_helper_previous_elevation);
              if (tag instanceof Float) {
                  ViewCompat.setElevation(view, ((Float) tag).floatValue());
              }
              view.setTag(R.id.item_touch_helper_previous_elevation, (Object) null);
          }
          view.setTranslationX(0.0f);
          view.setTranslationY(0.0f);
      }
  
      public void onDraw(Canvas c, RecyclerView recyclerView, View view, float dX, float dY, int actionState, boolean isCurrentlyActive) {
          if (Build.VERSION.SDK_INT >= 21 && isCurrentlyActive && view.getTag(R.id.item_touch_helper_previous_elevation) == null) {
              Float valueOf = Float.valueOf(ViewCompat.getElevation(view));
              ViewCompat.setElevation(view, findMaxElevation(recyclerView, view) + 1.0f);
              view.setTag(R.id.item_touch_helper_previous_elevation, valueOf);
          }
          view.setTranslationX(dX);
          view.setTranslationY(dY);
      }
  
      public void onDrawOver(Canvas c, RecyclerView recyclerView, View view, float dX, float dY, int actionState, boolean isCurrentlyActive) {
      }
  
      public void onSelected(View view) {
      }
  }
  