title: Unable to create object of class inside fragment
body: <p>I am having problem creating an object of another class in fragment.  My code is</p>
  
  <pre><code>public View onCreateView(LayoutInflater layoutinflater,
          ViewGroup viewgroup, Bundle bundle) {
      TextView tv = (TextView) getActivity().findViewById(R.id.textView3);
      (/*ERROR LINE*/)Database info = new Database(this);
      info.open();
      String data = info.getData();
      info.close();
      tv.setText(data);
      return layoutinflater.inflate(R.layout.sqlview, viewgroup, false);
  }
  </code></pre>
  
  <p>But it is telling me to modify the constructor in the database class which has Context as argument.
  Please help.</p>