Android Open Source - ccardstats Text Mapping Adapter






From Project

Back to project page ccardstats.

License

The source code is released under:

GNU General Public License

If you think the Android project ccardstats 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.github.marwinxxii.ccardstats.gui;
//w  w w.j av a  2 s  .c o  m
import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class TextMappingAdapter extends ArrayAdapter<String[]> {

    private int[] ids;
    private int mLayoutId;

    public TextMappingAdapter(Context context, int layoutId, int[] ids,
            List<String[]> values) {
        super(context, layoutId, values);
        this.ids = ids;
        this.mLayoutId = layoutId;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        Context context = parent.getContext();
        LayoutInflater inflater = LayoutInflater.from(context);
        View target = inflater.inflate(mLayoutId, parent, false);
        String[] values = getItem(position);
        for (int i = 0; i < ids.length; i++) {
            TextView textView = (TextView) target.findViewById(ids[i]);
            textView.setText(values[i]);
        }
        return target;
    }

}




Java Source Code List

com.github.marwinxxii.ccardstats.Application.java
com.github.marwinxxii.ccardstats.SmsReceiver.java
com.github.marwinxxii.ccardstats.db.Card.java
com.github.marwinxxii.ccardstats.db.DBHelper.java
com.github.marwinxxii.ccardstats.gui.CardListActivity.java
com.github.marwinxxii.ccardstats.gui.GetStatsTask.java
com.github.marwinxxii.ccardstats.gui.ListActivity.java
com.github.marwinxxii.ccardstats.gui.MonthStatsActivity.java
com.github.marwinxxii.ccardstats.gui.PreferencesActivity.java
com.github.marwinxxii.ccardstats.gui.SimpleListActivity.java
com.github.marwinxxii.ccardstats.gui.TextMappingAdapter.java
com.github.marwinxxii.ccardstats.gui.YearStatsActivity.java
com.github.marwinxxii.ccardstats.helpers.DateHelper.java
com.github.marwinxxii.ccardstats.helpers.MoneyHelper.java
com.github.marwinxxii.ccardstats.notifications.NotificationReader.java
com.github.marwinxxii.ccardstats.notifications.NotificationService.java
com.github.marwinxxii.ccardstats.notifications.SberbankService.java
com.github.marwinxxii.ccardstats.notifications.SmsNotification.java
com.github.marwinxxii.ccardstats.notifications.SmsParser.java
com.github.marwinxxii.ccardstats.notifications.SmsReader.java