简体   繁体   English

将应用程序图标拖放到我的小部件中-Android

[英]Drag and drop app icon into my widget - Android

I am curious if it's possible to make an Android home screen widget that can have app icons dropped on it? 我很好奇是否可以制作可以放置应用程序图标的Android主屏幕小部件? For example, say my widget is a 2x2(spaces) box on the home screen. 例如,假设我的小部件是主屏幕上的2x2(空格)框。 Then a user drags and drops the app icon shortcut from another app onto my widget. 然后,用户将应用程序图标快捷方式从另一个应用程序拖放到我的小部件上。 Would it be possible to then recognize the dropped app icons package name or other related info? 然后可以识别出放置的应用程序图标包名称或其他相关信息吗?

I have researched this on my own and cannot find any way of doing this. 我自己研究了此方法,找不到任何方法。

Thanks! 谢谢!

It's not even possible. 甚至不可能。 Widget API that provides Android doesn't allow that. 提供Android的Widget API不允许这样做。 Just to be clear where is only few opportunities that allow RemoteViews and Widget to do. 为了清楚起见,只有很少的机会允许RemoteViews和Widget进行。 So your usecase impossible to do. 所以您的用例不可能做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM