Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,我为文件浏览器制作了一个自定义应用程序。现在的问题是,我想将该应用程序用作我的另一个应用程序中的小部件,以便我可以浏览另一个应用程序上的文件。
有可能吗?如果是,最好的方法是什么?
您应该在开始时将文件浏览器创建为小部件。
不理会主 App 类是一个很好的做法,并将所有应用程序逻辑放入自定义小部件中,这些小部件以后可以用作未来应用程序中的模块。那里应该只包含最通用的应用程序行为。
您现在最好的选择是将文件浏览器重写为单独的小部件 - 如果您仍想保留它。