위젯 등록할때요

getIdentifier로 다른 앱 패키지 리소스의 drawable ID가져와서

이미지뷰에 넣으니깐

해당 리소스ID를 현재 제 앱의 ID로 매치시켜서 가져오네요.


이거 방법 없는건가요. 따로 파일같은걸로 저장 시켜야될까요..

나인패치라 엄청 까다로운데 ㅠㅡㅠ


평소같으면 해당 다른 앱 패키지의 Resources 로 접근해서

getDrawable() 해준다음 이미지 뷰에 뿌려주겠지만

그렇게 할 수도 없고...


try

{

Resources otherRes = context.getPackageManager().getResourcesForApplication(otherPackName);

int frmRId = otherRes.getIdentifier("frame_" + frmIndex, "drawable", otherPackName);

if (frmRId != 0)

{

views.setImageViewResource(frmViewRId, frmRId);

}

} catch (NameNotFoundException e)

{

e.printStackTrace();

}