@Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_selection_leg_right, container, false);

    imgLegFront = (ImageView) view.findViewById(R.id.imgLegRightFront);
    imgLegBack = (ImageView) view.findViewById(R.id.imgLegRightBack);
    imgFootTop = (ImageView) view.findViewById(R.id.imgFootRightTop);
    imgFootDown = (ImageView) view.findViewById(R.id.imgFootRightDown);

    imgLegBack.setOnClickListener(this);
    imgLegFront.setOnClickListener(this);
    imgFootTop.setOnClickListener(this);
    imgFootDown.setOnClickListener(this);

    ImageDrawer.drawPointsOfBodyPart(
        imgLegFront, SpecificBodyPart.RIGHT_LEG_FRONT, R.drawable.perna_esquerda_frente);
    ImageDrawer.drawPointsOfBodyPart(
        imgLegBack, SpecificBodyPart.RIGHT_LEG_BACK, R.drawable.perna_esquerda_atras);
    ImageDrawer.drawPointsOfBodyPart(
        imgFootDown, SpecificBodyPart.RIGHT_FOOT_DOWN, R.drawable.pe_esquerdo_baixo);
    ImageDrawer.drawPointsOfBodyPart(
        imgFootTop, SpecificBodyPart.RIGHT_FOOT_TOP, R.drawable.pe_esquerdo_cima);

    return view;
  }
Пример #2
0
  public static void show(Activity activity, SpecificBodyPart bodyPart, MoleGroup moleGroup) {
    AlertDialog.Builder builder = new AlertDialog.Builder(activity);

    View view = activity.getLayoutInflater().inflate(R.layout.dialog_body_part_image, null);

    builder.setView(view);
    ImageView img = (ImageView) view.findViewById(R.id.imgBodyPart);
    ImageDrawer.drawPoint(img, bodyPart.getResource(), moleGroup.getPosition());
    AlertDialog dialog = builder.create();
    dialog.show();
  }