Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // OFActivity.java
- public void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- String packageName = getPackageName();
- setContentView(R.layout.main_layout);
- mSwitchButton = (Button)findViewById(R.id.switch_to_main);
- mSwitchButton.setOnClickListener(new View.OnClickListener()
- {
- @Override
- public void onClick(View v)
- {
- Log.v(LogTag, "init view");
- }
- });
- ofApp = new OFAndroid(packageName,this);
- }
- // main_layout.xml
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout android:id="@+id/relativeLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
- <cc.openframeworks.OFGLSurfaceView android:id="@+id/of_gl_surface"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"/>
- <!-- add here other views' layouts -->
- <Button
- android:id="@+id/switch_to_main"
- android:text="@string/switch_to_main"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom|center"
- />
- </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement