Android Open Source - material-notes Config Module






From Project

Back to project page material-notes.

License

The source code is released under:

Apache License

If you think the Android project material-notes listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.materialnotes.config;
/* w w  w  .  j a v  a2s .  c o  m*/
import android.app.Application;
import android.database.sqlite.SQLiteOpenHelper;

import com.google.inject.AbstractModule;
import com.google.inject.name.Names;

import com.materialnotes.data.source.sqlite.NotesDatabaseHelper;

/**
 * Clase para cablear dependencias de la aplicacin
 *
 * @author Daniel Pedraza Arcega
 */
public class ConfigModule extends AbstractModule {

    private final Application context;

    public ConfigModule(Application context) {
        this.context = context;
    }

    /** Cablea las implementaciones. */
    @Override
    protected void configure() {
        bind(SQLiteOpenHelper.class)
                .annotatedWith(Names.named("NotesDbHelper"))
                .toInstance(new NotesDatabaseHelper(context));
    }
}




Java Source Code List

com.materialnotes.activity.EditNoteActivity.java
com.materialnotes.activity.MainActivity.java
com.materialnotes.activity.ViewNoteActivity.java
com.materialnotes.config.ConfigModule.java
com.materialnotes.data.Note.java
com.materialnotes.data.dao.NoteDAO.java
com.materialnotes.data.dao.impl.sqlite.NoteSQLiteDAO.java
com.materialnotes.data.source.sqlite.NotesDatabaseHelper.java
com.materialnotes.data.source.sqlite.SQLFileParser.java
com.materialnotes.util.Strings.java
com.materialnotes.view.ShowHideOnScroll.java
com.materialnotes.widget.AboutNoticeDialog.java
com.materialnotes.widget.NotesAdapter.java