HTML5¼¼Êõ

¡¾ÎÞ˽·ÖÏí¡¿¸É»õ£¡£¡£¡Ò»¸öìÅ¿áµÄ×Ô¶¨ÒåÈÕÀú¿Ø¼þ£¬°ÚÍÑÈÕÀúʱ¼äÑ¡Ôñ·³ÄÕ£¬´¿¸£Àû~ - Äϳ¾(9)

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2016-08-12 12:00 ÎÒÒªÆÀÂÛ( )

1 package com.example.nanchen.mydateviewdemo.view; android.content.Context; 4 import android.graphics.Color; 5 import android.view.Gravity; 6 import android.view.View; 7 import android.view.ViewGroup

1 package com.example.nanchen.mydateviewdemo.view; android.content.Context; 4 import android.graphics.Color; 5 import android.view.Gravity; 6 import android.view.View; 7 import android.view.ViewGroup; 8 import android.view.ViewGroup.LayoutParams; 9 import android.widget.BaseAdapter; 10 import android.widget.TextView; com.example.nanchen.mydateviewdemo.R; * ÏÔʾweekµÄ²¼¾Öadapter nanchen 17 * @date 16-8-10 ÉÏÎç11:39 WeekGridAdapter extends BaseAdapter { 20 final String[] titles = new String[] { "ÈÕ", "Ò»", "¶þ", "Èý", "ËÄ", "Îå", "Áù" }; 21 private Context mContext; WeekGridAdapter(Context context) { 24 this.mContext = context; 25 } 26 27 @Override getCount() { 29 return titles.length; 30 } 31 32 @Override 33 public Object getItem(int position) { 34 return titles[position]; 35 } 36 37 @Override getItemId(int position) { 39 return position; 40 } 41 42 @Override 43 public View getView(int position, View convertView, ViewGroup parent) { 44 TextView week = new TextView(mContext); 45 android.view.ViewGroup.LayoutParams week_params = new LayoutParams( 46 android.view.ViewGroup.LayoutParams.MATCH_PARENT, 47 android.view.ViewGroup.LayoutParams.MATCH_PARENT); 48 week.setLayoutParams(week_params); 49 week.setPadding(0, 0, 0, 0); 50 week.setGravity(Gravity.CENTER); 51 week.setFocusable(false); 52 week.setBackgroundColor(Color.TRANSPARENT); (position == 6) { week.setBackgroundColor(R.color.date_weekend_text_color); 56 week.setTextColor(Color.WHITE); week.setBackgroundColor(R.color.date_weekend_text_color); 59 week.setTextColor(Color.WHITE); 60 } else { 61 week.setTextColor(Color.BLACK); 62 } 63 week.setText(getItem(position)+""); 64 return week; 65 } 66 }

11£©

MainActivity

¡¡

1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

Ïà¹ØÎÄÕÂ
  • ¡¾ÎÞ˽·ÖÏí£º´ÓÈëÃŵ½¾«Í¨ASP.NET MVC¡¿´Ó0¿ªÊ¼£¬Ò»Æð´î¿ò¼Ü¡¢×öÏîÄ¿ £¨14£©¸½Êý¾Ý¿â¡¢·¢²¼ÏîÄ¿ - ¹û¶³²¼¶¡Ï²

    ¡¾ÎÞ˽·ÖÏí£º´ÓÈëÃŵ½¾«Í¨ASP.NET MVC¡¿´Ó0¿ªÊ¼£¬Ò»Æð´î¿ò¼Ü¡¢×öÏîÄ¿

    2016-07-30 12:00

  • ·ÖÏí×Ô¼ºµÄ³¬ÇáÁ¿¼¶¸ßÐÔÄÜORMÊý¾Ý·ÃÎÊ×é¼þDeft£¬±Èdapper¿ì20%ÒÔÉÏ - Ä°³ÇÐÄÁ鲶ÊÖ

    ·ÖÏí×Ô¼ºµÄ³¬ÇáÁ¿¼¶¸ßÐÔÄÜORMÊý¾Ý·ÃÎÊ×é¼þDeft£¬±Èdapper¿ì20%ÒÔÉÏ -

    2016-07-29 14:00

  • ¡¾S¡¿¡¾S¡¿¡¾S¡¿Ò»´ó²¨Ç°¶Ë¸É»õÕûºÏ£¨Ò»£© - VanСʱ

    ¡¾S¡¿¡¾S¡¿¡¾S¡¿Ò»´ó²¨Ç°¶Ë¸É»õÕûºÏ£¨Ò»£© - VanСʱ

    2016-07-28 15:00

  • ¶ÀÁ¢¿ª·¢ Ò»¸öÉç½» APP µÄ¼Ü¹¹·ÖÏí (ÒÑʵÏÖ) - Ö¸¼âϵÄÓÄÁé

    ¶ÀÁ¢¿ª·¢ Ò»¸öÉç½» APP µÄ¼Ü¹¹·ÖÏí (ÒÑʵÏÖ) - Ö¸¼âϵÄÓÄÁé

    2016-07-19 16:00

ÍøÓѵãÆÀ
Ì