Last active
December 25, 2015 20:39
-
-
Save leonguyen/7036322 to your computer and use it in GitHub Desktop.
PhoneGap Lab: Update Activity class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.phonegaplab; | |
import org.apache.cordova.DroidGap; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.view.Menu; | |
public class MainActivity extends DroidGap { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
super.loadUrl("file:///android_asset/www/index.html"); | |
} | |
@Override | |
public boolean onCreateOptionsMenu(Menu menu) { | |
// Inflate the menu; this adds items to the action bar if it is present. | |
getMenuInflater().inflate(R.menu.main, menu); | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment