title: How to open fragment on a button click from an activity either with intent and without intent in android?
body: <p>I tried the following code:</p>
  
  <pre><code>Intent in= new Intent(Activity1.this,Fragment.class);
  startactivity(in);
  </code></pre>