Android NDK的依赖注入?(Dependency injection for Android NDK?)
我一直在为Android编写游戏。 到目前为止,我一直在使用Java而不是NDK,但我决定将我的代码移植到C ++(出于性能,内存管理和行业标准的原因)。
移植我的应用程序不应该是一个问题(我已经写了我的C ++应用程序的公平份额),但我一直在使用RoboGuice作为依赖注入框架,否则我的对象图将变得太复杂而不是很快。 我一直在环顾四周,但我没有找到任何关于将依赖注入框架与Android NDK结合使用的资源。
有人可以告诉我是否有任何这样的franeworks可用。 如果是这样,你会推荐哪一个?
I've been working on a writing a game for Android. Until now I've been using Java instead of the NDK, but I've decided to port my code to C++ (for performance, memory management and industry standards reasons).
Porting my application shouldn't be a problem (I've written my fair share of C++ applications), but I've been using RoboGuice as a dependency injection framework because otherwise my object graph would become too complex rather quickly. I've been looking around, but I haven't found any resources about using a dependency injection framework in combination with the Android NDK.
Can someone tell me if there any such franeworks available. If so, which one would you recommend?
原文:https://stackoverflow.com/questions/25282129
最满意答案
也许是一扇敞开的大门,但你已经为你的应用程序的资源添加了一个Windows XP / Vista / 7清单?
Maybe an open door, but you have added a Windows XP/Vista/7 manifest to your application's resources?
相关问答
更多-
感谢ŁukaszO。的帮助。 解决方案: public class MyVScrollBar : VScrollBar { public MyVScrollBar() { SetStyle(ControlStyles.Selectable, false); } } public partial class UserControl1 : UserControl { protected override void OnKeyDown(KeyEventArgs e ...
-
也许是一扇敞开的大门,但你已经为你的应用程序的资源添加了一个Windows XP / Vista / 7清单? Maybe an open door, but you have added a Windows XP/Vista/7 manifest to your application's resources?
-
好吧,事实证明,这比我想象的要简单得多 - 它只是用来填充BG矩形的Brush 。 protected override void OnDrawItem( DrawItemEventArgs e ) { base.OnDrawItem( e ); int i= e.Index; TabPage p= this.TabPages[ i ]; Rectangle r= GetTabRect( i ); Brush br= n ...
-
我认为这些都是很多人在真正开始定制应用程序风格时会偶然发现的。 这两个问题都有一些完善的快捷方式,例如为WPF使用现有的样式/库: 我看到了一些常见的Window和样式库: MahApps.Metro是一个很棒的图书馆,我已经用了很长时间来获得干净的窗户和界面(尤其是一些客户喜欢的“黑暗”主题)。 现代UI 。 很少的个人经验,但它的相似之处在于它拥有更多现代的窗户设计,以及大型风格。 我见过它经常使用。 极乐世界 。 再次,没有太多的经验,但似乎很活跃。 我没有看到它用得和其他两个一样多。 当然,这些包括 ...
-
尝试 var height = webBrowser1.Document.Body.ScrollRectangle.Height; 见MSDN 。 try var height = webBrowser1.Document.Body.ScrollRectangle.Height; see MSDN.
-
也许你可以使用类似的东西? body { margin:0; padding:0; overflow-y: hidden; } body:hover { overflow-y: scroll; } http://jsfiddle.net/4RSbp/165/ maybe you can use something like that? body { margin:0; padding:0; overflow-y: hidden; } body:h ...
-
我升级到wxGTK 2.9.0并且工作正常。 I upgraded to wxGTK 2.9.0 and that worked.
-
以下两个线程看起来特别相关: SQL Server 2005 Reporting Services:报告已压缩 格式化SSRS报告在Firefox中看起来并不可怕 The following two threads look particularly relevant: SQL Server 2005 Reporting Services: Reports are Compressed Formatting an SSRS report to not look terrible in Firefox
-
在metro应用程序中的ListView没有得到它的垂直滚动条(ListView in a metro app does not get its vertical scrollbar)[2023-07-31]
我终于解决了这个问题。 由于大多数此类问题,错误很愚蠢:拥有此ListView的Grid控件有一个额外的(错误的)行定义,其高度属性标有星号,即占用所有剩余空间。 但是ListView使用的行的高度标记为“自动”,因此它扩展到其项目的整个大小,并且从不激活其垂直滚动条。 I've finally fixed the problem. As most of such problems, the error was silly: a Grid control that owns this ListView ha ... -
如何在单独的线程上使用不同的Timer : System.Threading.Timer myTimer = null; private bool _isProgressBarLoading = false; public bool IsProgressBarLoading { get { return _isProgressBarLoading; } set { if (_isProgressBarLoading != value) { ...