Android Open Source - SQLite-Simple-Android Record Adapter






From Project

Back to project page SQLite-Simple-Android.

License

The source code is released under:

Apache License

If you think the Android project SQLite-Simple-Android 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 garin.artemiy.sqlitesimple.example.adapters;
//from ww w.j  a v  a  2s . c om
import android.annotation.SuppressLint;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import garin.artemiy.sqlitesimple.R;
import garin.artemiy.sqlitesimple.example.models.Record;

/**
 * Author: Artemiy Garin
 * Date: 07.04.13
 */
@SuppressWarnings("CanBeFinal")
public class RecordAdapter extends ArrayAdapter<Record> {

    public RecordAdapter(Context context) {
        super(context, R.layout.item_record);
    }

    @SuppressLint("InflateParams")
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        if (convertView == null)
            convertView = LayoutInflater.from(getContext()).inflate(R.layout.item_record, null);

        Record record = getItem(position);
        TextView recordText = (TextView) convertView.findViewById(R.id.recordTextView);

        recordText.setText(record.getRecordText());

        return convertView;
    }

}




Java Source Code List

garin.artemiy.sqlitesimple.example.MainActivity.java
garin.artemiy.sqlitesimple.example.MainApplication.java
garin.artemiy.sqlitesimple.example.adapters.FTSAdapter.java
garin.artemiy.sqlitesimple.example.adapters.RecordAdapter.java
garin.artemiy.sqlitesimple.example.dao.InternalDAO.java
garin.artemiy.sqlitesimple.example.dao.RecordsDAO.java
garin.artemiy.sqlitesimple.example.models.InternalRecord.java
garin.artemiy.sqlitesimple.example.models.Record.java
garin.artemiy.sqlitesimple.library.SQLiteSimpleDAO.java
garin.artemiy.sqlitesimple.library.SQLiteSimpleFTS.java
garin.artemiy.sqlitesimple.library.SQLiteSimpleHelper.java
garin.artemiy.sqlitesimple.library.SQLiteSimple.java
garin.artemiy.sqlitesimple.library.annotations.Column.java
garin.artemiy.sqlitesimple.library.annotations.Table.java
garin.artemiy.sqlitesimple.library.model.FTSModel.java
garin.artemiy.sqlitesimple.library.util.ColumnType.java
garin.artemiy.sqlitesimple.library.util.SimpleConstants.java
garin.artemiy.sqlitesimple.library.util.SimpleDatabaseUtil.java
garin.artemiy.sqlitesimple.library.util.SimplePreferencesHelper.java