title: Need Modified Code Structure for MainActivity.java
body: <p>I want to insert code in <strong>MainActivity of 'Webview' Project</strong> To code in <strong>MainActivity of 'Push Notification' project</strong>.</p>
  
  <p>As I'm new to Android &amp; Java, I have spent hell lot of time but unable to produce a solution.</p>
  
  <p>Suggest solution for following code structure:</p>
  
  <blockquote>
    <p>'Push Notification' Project</p>
  </blockquote>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_main);
  
   //------Code for push notification---------------------
  
     }
  </code></pre>
  
  <blockquote>
    <p>'Webview' Project</p>
  </blockquote>
  
  <pre><code>public class MainActivity extends Activity{
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
   //-----------Code for WebView------------
  
      }
  
      private class CustomWebViewClient extends WebViewClient {
          public boolean shouldOverrideUrlLoading(WebView view, String url) {
              //----------code-----------------
          }
      }
  
  }
  </code></pre>