Android 模糊启动程序小部件的背景
我正在开发一个时钟启动器小部件(添加到启动器的小部件)。Android 模糊启动程序小部件的背景,android,android-widget,Android,Android Widget,我正在开发一个时钟启动器小部件(添加到启动器的小部件)。 我在位图上手动绘制时间,然后执行 ComponentName thisWidget = new ComponentName(context, MyWidgetProvider.class); AppWidgetManager manager = AppWidgetManager.getInstance(context); RemoteViews remoteViews = new RemoteViews(cont
我在位图上手动绘制时间,然后执行
ComponentName thisWidget = new ComponentName(context, MyWidgetProvider.class);
AppWidgetManager manager = AppWidgetManager.getInstance(context);
RemoteViews remoteViews = new RemoteViews(context.getPackageName(),
R.layout.widget_layout);
// Set the text
SimpleDateFormat timeFormat = new SimpleDateFormat("hh:mm a", Locale.US);
remoteViews.setImageViewBitmap(R.id.imageView, buildUpdate(context, timeFormat.format(new Date()))); //update imageView with a new bitmap with drawn time
manager.updateAppWidget(thisWidget, remoteViews);
我想要的是另外模糊小部件的背景(小部件下的墙纸)
我知道如何模糊位图,但在这种情况下,我没有要模糊的位图,因为我认为我无法在小部件下获得背景部分
那么有没有办法模糊小部件的背景呢
请注意我知道如何模糊位图。但我不需要这样做。这是不可能的,因为无法让小部件底层位图应用模糊。您只能创建部分透明的背景。这是一种选择。但我会等一会儿,以防有人能提供任何形式的黑客攻击