0
위젯 레이아웃에 이미지 뷰와 텍스트 뷰가 있습니다. 이제 remoteview에서 프로그램 방식으로 이미지보기를 제거해야합니다.위젯에서 프로그래밍 방식으로 요소 제거
나는 API가 있다는 것을 알고있다 remoteView.removeAll (Viewid);
그래서 나는
remoteViews.removeAll(R.id.imageView);
을 화면에서 볼 수 있습니다
appwidgetmanager.updateAppVidget
아무것도 콘크리트를 통해 리모트 뷰를 업데이트 할 때. 이미지보기가 아직 있습니다.
올바른 트랙에 있습니까? 친절히 제안 해주세요.
k-ballo : 어떻게 framelayout에서 이미지 뷰를 감쌀 수 있습니까? – Achilles
@Achilles : XML에서 android : layout_width = "wrap_content"> FrameLayout> . –
RemoteView rv = RemoteViews (context.getPackageName(), R.layout.main); \t rv.removeAllViews (R.id.imageView1); \t \t \t \t appWidgetManager.updateAppWidget (c, rv); .. 이것은 내가 한 일입니다. 이미지보기가 제거되지 않습니까? – Achilles