Custom webview in cordova app

I am new to android development and just started working on a web app using cordova, ionic framework and angular. I have completed the basic features of the app and found that the transitions between views in the app are a bit slow I found this article to improve them here: https://github.com/ajoslin/angular-mobile-nav/wiki/PhoneGap,-improving-performance

I have never coded in java and so I am stuck.

I tried doing the following

went to the cordovawebview.java in the path myapp\platforms\android\CordovaLib\src\org\apache\cordova and added the import statements missing in the file (except for the "import org.apache.cordova.CordovaWebView") which were using in the article and copy-pasted the myWebview class.

Then I went to the StarterApp.java, below path

\myapp\platforms\android\src\com\ionicframework\starter

and modified it to

public class StarterApp extends CordovaActivity 
{
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        CordovaWebView webView = new MyWebView(MyActivity.this);
    super.init(webView, new CordovaWebViewClient(this, webView), new     CordovaChromeClient(this, webView));
        // Set by <content src="index.html" /> in config.xml
        super.loadUrl(Config.getStartUrl());
         //super.loadUrl("file:///android_asset/www/index.html")
    }
}

But when I run the cordova build command I am getting a error. Could someone tell me, what I am missing?

This looks incorrect to me:

CordovaWebView webView = new MyWebView(MyActivity.this);
  1. Have you written code for MyWebView?
  2. MyActivity doesn't seem to exist. You can just use this.