Back to project page zionhs.
The source code is released under:
GNU General Public License
If you think the Android project zionhs listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Zion High School Application for Android * Copyright (C) 2013 Youngbin Han<sukso96100@gmail.com> *// w w w . jav a2 s. co m * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.licubeclub.zionhs; import android.app.Activity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import java.util.ArrayList; /** * Created by youngbin on 13. 12. 14. */ public class ListCalendarAdapter extends BaseAdapter { Activity context; ArrayList<String> title; ArrayList<String> description; public ListCalendarAdapter(Activity context, ArrayList<String> title, ArrayList<String> description) { super(); this.context = context; this.title = title; this.description = description; } public int getCount() { // TODO Auto-generated method stub return title.size(); } public Object getItem(int position) { // TODO Auto-generated method stub return null; } public long getItemId(int position) { // TODO Auto-generated method stub return 0; } private class ViewHolder { TextView txtViewTitle; TextView txtViewDescription; } public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; LayoutInflater inflater = context.getLayoutInflater(); if (convertView == null) { convertView = inflater.inflate(R.layout.list_canlendar_row, null); holder = new ViewHolder(); holder.txtViewTitle = (TextView) convertView.findViewById(R.id.day); holder.txtViewDescription = (TextView) convertView.findViewById(R.id.schedule); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } holder.txtViewTitle.setText(title.get(position)); holder.txtViewDescription.setText(description.get(position)); return convertView; } }