I am using layout rendering (as opposed to bitmap rendering) in my Smarteyeglass app. How can I get a reference to the current view?
I would like to rotate one ImageView in my layout according to a value calculated in code. So I need to do something like this:
ViewGroup view = <GET THE VIEW HERE>
RelativeLayout relativeLayout = (RelativeLayout) RelativeLayout.inflate(context,
currentLayout, view);
relativeLayout.findViewById(R.id.my_view_object).setRotation(20);
But the problem is that I can't find a way to get a reference to a root view.
I am using the following code to display my layout:
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);
Which doesn't return a reference to the view.