2014-11-18 6 views
0

Sony Smartwatch UI에 외부 이미지 (응용 프로그램 프로젝트 아님)를 표시하려고합니다. 드로어 블 폴더에있는 이미지로 어떻게하는지 알고 있습니다.이미지 Sony Smartwatch 2

Bundle iconBundle = new Bundle(); 
    iconBundle.putInt(Control.Intents.EXTRA_LAYOUT_REFERENCE, R.id.thumbnail); 
    iconBundle.putString(Control.Intents.EXTRA_DATA_URI, 
      ExtensionUtils.getUriString(mContext, R.drawable.thumbnail_list_item)); 

이 예제에서 나는 이미지를 R.drawable.thumbnail_list_item이라는 드로어 블 폴더에 있습니다. 문제는 외부 이미지로 시도 할 때입니다. http://tcset.com/images/logotcsetarriba.png을,이 코드는 작동하지 않습니다 : 나는 다음과 같은 URL을 내가 어떻게

Bundle iconBundle = new Bundle(); 
    iconBundle.putInt(Control.Intents.EXTRA_LAYOUT_REFERENCE, R.id.thumbnail); 
    iconBundle.putString(Control.Intents.EXTRA_DATA_URI, 
      ExtensionUtils.getUriString(mContext, "http://tcset.com/images/logotcsetarriba.png")); 

할 수 있을까? 나는 열릴 필요가있다 : S 고맙다 !!

답변

0

이미지를 먼저 다운로드 한 다음 교체 할 이미지 ID와 다운로드 한 비트 맵을 결합한 sendImage를 사용할 수 있습니다. 예 :

sendImage(R.id.image, bmp); 

이 질문에 대한 답변은 있습니까?

0

믿을 수 없지만 실제로는 특정 ImageView의 리소스가 아닌 이미지를 표시 할 수 있습니다. 그것은 번들을 만들고 이미지를 Control.Intents.EXTRA_DATA로 전달하여 byteArray로 이미지를 다운로드하는 것으로 이어집니다.

Bundle iconBundle = new Bundle(); 
    iconBundle.putInt(Control.Intents.EXTRA_LAYOUT_REFERENCE, R.id.imageView); 
iconBundle.putByteArray(Control.Intents.EXTRA_DATA, buffer); 
showLayout(layoutId, layoutId, layoutId, new Bundle[] {iconBundle}) 

소니가 왜 그런 유용한 기능을 생략했는지 나는 알지 못합니다.

관련 문제