<commit_before>package th.or.nectec.tanrabad.survey;

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

import java.util.ArrayList;

import th.or.nectec.tanrabad.entity.Place;

public class PlaceTypeAdapter extends BaseAdapter {

    Context context;

    ArrayList<PlaceType> placeTypes = new ArrayList<>();

    public PlaceTypeAdapter(Context context) {
        this.context = context;

        ArrayList<PlaceType> placeTypes = new ArrayList<>();
        placeTypes.add(new PlaceType(Place.TYPE_VILLAGE_COMMUNITY, "ชุมชน"));
        placeTypes.add(new PlaceType(Place.TYPE_WORSHIP, "ศาสนสถาน"));
        placeTypes.add(new PlaceType(Place.TYPE_SCHOOL, "โรงเรียน"));
        placeTypes.add(new PlaceType(Place.TYPE_HOSPITAL, "โรงพยาบาล"));
        placeTypes.add(new PlaceType(Place.TYPE_FACTORY, "โรงงาน"));

        this.placeTypes.addAll(placeTypes);
    }

    @Override
    public int getCount() {
        return placeTypes.size();
    }

    @Override
    public PlaceType getItem(int i) {

        return placeTypes.get(i);
    }

    @Override
    public long getItemId(int i) {
        return placeTypes.get(i).id;
    }

    @Override
    public View getView(int i, View view, ViewGroup parent) {
        LayoutInflater inflater = (LayoutInflater) this.context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);<commit_msg>เพิ่ม dropdown สำหรับการแสดงรายการ place ทั้งหมด<commit_after>package th.or.nectec.tanrabad.survey;

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

import java.util.ArrayList;

import th.or.nectec.tanrabad.entity.Place;

public class PlaceTypeAdapter extends BaseAdapter {

    Context context;

    ArrayList<PlaceType> placeTypes = new ArrayList<>();

    public PlaceTypeAdapter(Context context) {
        this.context = context;

        ArrayList<PlaceType> placeTypes = new ArrayList<>();
        placeTypes.add(new PlaceType(-1, "ทั้งหมด"));
        placeTypes.add(new PlaceType(Place.TYPE_VILLAGE_COMMUNITY, "ชุมชน"));
        placeTypes.add(new PlaceType(Place.TYPE_WORSHIP, "ศาสนสถาน"));
        placeTypes.add(new PlaceType(Place.TYPE_SCHOOL, "โรงเรียน"));
        placeTypes.add(new PlaceType(Place.TYPE_HOSPITAL, "โรงพยาบาล"));
        placeTypes.add(new PlaceType(Place.TYPE_FACTORY, "โรงงาน"));

        this.placeTypes.addAll(placeTypes);
    }

    @Override
    public int getCount() {
        return placeTypes.size();
    }

    @Override
    public PlaceType getItem(int i) {

        return placeTypes.get(i);
    }

    @Override
    public long getItemId(int i) {
        return placeTypes.get(i).id;
    }

    @Override
    public View getView(int i, View view, ViewGroup parent) {
        LayoutInflater inflater = (LayoutInflater) this.context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
{'fraction_non_alphanumeric': 0.11060059074499508, 'fraction_numerical': 0.0003281916639317361, 'mean_word_length': 3.732919254658385, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3020810', 'n_tokens_mistral': 1020, 'n_tokens_neox': 1001, 'n_words': 180}