Android

FragmentからSQLiteDatabaseを使う

quick memo
結論: getActivity()を使う

MyDbhelper.java
public class MyDbHelper extends SQLiteOpenHelper {

public MyDbHelper(Context context) {
    super(context, DBNAME, null, VERSION);
}

// 以下略
MyFragment.java
MyDbHelper helper = new MyDbHelper(getActivity());