Difference between revisions of "Android Studio: Link Activity to Class"

From OnnoWiki
Jump to navigation Jump to search
(Created page with " The much i got is that you want to go SurfaceViewExample from your main activity for that you need to use intent on button click like Intent i = new Intent(this, SurfaceVie...")
 
Line 17: Line 17:
  
 
* https://stackoverflow.com/questions/9858164/how-to-link-the-class-shown-below-with-main-activity
 
* https://stackoverflow.com/questions/9858164/how-to-link-the-class-shown-below-with-main-activity
 +
* http://tutorials.jenkov.com/android/activity.html

Revision as of 17:58, 19 March 2022

The much i got is that you want to go SurfaceViewExample from your main activity for that you need to use intent on button click like

Intent i = new Intent(this, SurfaceViewExample.class);
startActivity(i) ;

and you have to add a permission in menifest to got to that activity like

<activity android:enabled="true" android:name="SurfaceViewExample" />




Referensi