0
我在Smarteyeglass应用程序中使用布局渲染(而不是位图渲染)。我如何获得对当前视图的引用?如何在Sony Smarteyeglass中查看参考?
我想根据代码中计算的值在我的布局中旋转一个ImageView。所以,我需要做的是这样的:
ViewGroup view = <GET THE VIEW HERE>
RelativeLayout relativeLayout = (RelativeLayout) RelativeLayout.inflate(context,
currentLayout, view);
relativeLayout.findViewById(R.id.my_view_object).setRotation(20);
但问题是,我不能找到一个办法去根视图的引用。
我使用下面的代码,以显示我的布局:
Intent intent = new Intent(Control.Intents.CONTROL_PROCESS_LAYOUT_INTENT);
intent.putExtra(Control.Intents.EXTRA_DATA_XML_LAYOUT, R.layout.my_layout_id);
sendToHostApp(intent);
没有返回到视图的参考。