안녕하세요 ^^

오늘은 Drawable의 메소드에 대해 질문을 드리겠습니다.

보기 1 =================================================================
Drawable img = context.getResources().getDrawable(R.drawable.filename);
Drawable img2 = img ;

보기 2 =================================================================
Drawable img = context.getResources().getDrawable(R.drawable.filename);
Drawable img2 = context.getResources().getDrawable(R.drawable.filename);

보기 3 =================================================================
Drawable img = context.getResources().getDrawable(R.drawable.filename);
Drawable img2 = context.getResources().getDrawable(R.drawable.filename2);
=================================================================

보기 1, 2, 3 이 있습니다.

이때 보기 1에서 img.setBounds(int int int int ) 를 적용하면 img2.setBounds(int int int int )가 같은 값으로 동시에 적용됩니다.

보기 2에서는 .setBounds(int int int int )는 따로 적용 되지만 img.setAlpha(int)와 img2.setAlpha(int)는 둘중 어느 하나만 바꿔도 동시에 적용됩니다.

이 문제를 해결하기 위해서.  어쩔 수 없이 filename를 복제해서 filename2 를 만들어서 해결을 하기는 했는데.
메모리문제나 용량 문제때문에. 질문을 드립니다.

제가 뭐를 잘 못 알고 있거나. 다른 방법이 있는 지 알고 싶습니다.
(Bitmap 클래스를 사용할때는 저런 동일 적용은 없었던것 같습니다만. 여러 이유로
Bitmap 클래스가 아닌 Drawable 클래스를 계속 사용하고 싶습니다.)

혹시 이 글을 읽으시는 다른분들도 한번 적용해 보세요. 저와 같은 결과가 나오는지. 제가 뭔가 실수해서 그러는 건지 알고 싶습니다

^^ 감사합니다.