diff --git a/app/src/main/java/org/ddnss/sfs/git/wdg/vokabel_trainer/DataBaseHelper.java b/app/src/main/java/org/ddnss/sfs/git/wdg/vokabel_trainer/DataBaseHelper.java new file mode 100644 index 0000000..d895489 --- /dev/null +++ b/app/src/main/java/org/ddnss/sfs/git/wdg/vokabel_trainer/DataBaseHelper.java @@ -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) { + + } +} diff --git a/app/src/main/java/org/ddnss/sfs/git/wdg/vokabel_trainer/DataHandler.java b/app/src/main/java/org/ddnss/sfs/git/wdg/vokabel_trainer/DataHandler.java new file mode 100644 index 0000000..341323a --- /dev/null +++ b/app/src/main/java/org/ddnss/sfs/git/wdg/vokabel_trainer/DataHandler.java @@ -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){ + + } +} diff --git a/app/src/main/java/org/ddnss/sfs/git/wdg/vokabel_trainer/MainActivity.java b/app/src/main/java/org/ddnss/sfs/git/wdg/vokabel_trainer/MainActivity.java index a2cc684..52265de 100644 --- a/app/src/main/java/org/ddnss/sfs/git/wdg/vokabel_trainer/MainActivity.java +++ b/app/src/main/java/org/ddnss/sfs/git/wdg/vokabel_trainer/MainActivity.java @@ -1,5 +1,6 @@ package org.ddnss.sfs.git.wdg.vokabel_trainer; +import android.database.sqlite.*; import android.os.Bundle; import com.google.android.material.bottomnavigation.BottomNavigationView; @@ -26,5 +27,4 @@ public class MainActivity extends AppCompatActivity { NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration); NavigationUI.setupWithNavController(navView, navController); } - } \ No newline at end of file