setAlpha for RemoteViews problem
问题 I'm making an appwidget, and there's a bitmap on the widget of which I want to change it's transparency. In the service I have: RemoteViews remoteView = new RemoteViews(getApplicationContext().getPackageName(), R.layout.myWidget); remoteView.setInt(R.id.widgetPNG, "setAlpha", 50); But it doesn't work. The emulator shows "Problem loading widget" on the home screen. I'm pretty sure everything else is fine cos when i changed the line to change it's imageResource it runs perfectly: remoteView