Started to add Database

This commit is contained in:
peet 2020-10-05 15:41:01 +02:00
parent 7ed6ebe2bb
commit a1fa906d78
3 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,23 @@
package org.ddnss.sfs.git.wdg.vokabel_trainer;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import androidx.annotation.Nullable;
public class DataBaseHelper extends SQLiteOpenHelper {
public DataBaseHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
super(context, name, factory, version);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
}

View File

@ -0,0 +1,15 @@
package org.ddnss.sfs.git.wdg.vokabel_trainer;
import android.content.Context;
public class DataHandler {
public static final String DATABASENAME = "vocabDB";
public static final int DATABASE_VERSION = 1;
public static final String TABLE_NAME = "vocabTable";
public static final String DEUTSCH = "deutsch";
public static final String ENGLISH = "english";
public DataHandler(Context ctx){
}
}

View File

@ -1,5 +1,6 @@
package org.ddnss.sfs.git.wdg.vokabel_trainer; package org.ddnss.sfs.git.wdg.vokabel_trainer;
import android.database.sqlite.*;
import android.os.Bundle; import android.os.Bundle;
import com.google.android.material.bottomnavigation.BottomNavigationView; import com.google.android.material.bottomnavigation.BottomNavigationView;
@ -26,5 +27,4 @@ public class MainActivity extends AppCompatActivity {
NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration); NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
NavigationUI.setupWithNavController(navView, navController); NavigationUI.setupWithNavController(navView, navController);
} }
} }