Back to project page Caldroid.
The source code is released under:
MIT License
If you think the Android project Caldroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.roomorama.caldroid; /*from ww w. j a v a 2 s . co m*/ import android.content.Context; import android.graphics.Color; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import com.caldroid.R; import java.util.List; /** * Customize the weekday gridview */ public class WeekdayArrayAdapter extends ArrayAdapter<String> { public static int textColor = Color.LTGRAY; public WeekdayArrayAdapter(Context context, int textViewResourceId, List<String> objects) { super(context, textViewResourceId, objects); } // To prevent cell highlighted when clicked @Override public boolean areAllItemsEnabled() { return false; } @Override public boolean isEnabled(int position) { return false; } @Override public View getView(int position, View convertView, ViewGroup parent) { // To customize text size and color LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); TextView textView = (TextView) inflater.inflate(R.layout.weekday_textview, null); // Set content String item = getItem(position); textView.setText(item); textView.setTextColor(textColor); textView.setGravity(Gravity.CENTER); return textView; } }