Retrieve Android layout ressource in Activity
Hi,
I create an Activity that I start with an Intent from my main FREContext, so my new Activity can't access to the FREContext instance to use the getResourceId.
In my MainExtensionContext.Java:
public void playVideo ( ) {
Intent playIntent = new Intent(getActivity(), VideoPlayer.class);
playIntent.putExtra("playlayout", R.layout.player);
playIntent.putExtra("vurl", vUrl);
getActivity().startActivity( playIntent );
}
In my res\layout\player.xml, I have:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<SurfaceView
android:id="@+id/mySurface"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
properly identify in R.java
public static final class id {
public static final int mySurface=0x7f060002;
}
In my Activity the easy way mSurface = (SurfaceView) findViewById(R.id.mainSurface) doesn't work...
mSurface seems to be null...
So I need to replace by a FREContext.gerResourceId() method but I don't know how...
Any idea?
Moreover I've tried to unzip the final ANE file, and player.xml is missing.
Please help ![]()
