»Ë»Ñ Æ÷·³
°³¹ßÀÚÆ÷·³ ÀÔ´Ï´Ù.
  • ºÏ¸¶Å© ¾ÆÀÌÄÜ

¿©±â´Ù°¡ ¾Èµå·ÎÀ̵å Áú¹® µå·Áµµ µÇ³ª¿ä..?

  • Á¼½Ò
  • µî·ÏÀÏ 2015-01-30 15:31
  • Á¶È¸¼ö 421
¾È³çÇϼ¼¿ä ÃÊÂ¥ÀÔ´Ï´Ù...

ÇöÀç ´Þ·Â±¸ÇöÀ» ÇÏ°íÀÖ½À´Ï´Ù.

ÇÑ ¾×ƼºñƼ¿¡´Â Gridview·Î ´Þ·ÂÇ¥½Ã, ±× ¹Ø¿¡ Listview·Î ÀÏÁ¤Ç¥½Ã (DB Ãß°¡ÇÏ¿© Ç¥½ÃµÇ°Ô µÇ¾îÀÖ½À´Ï´Ù)
±×¸®°í ÇÑ ¾×ƼºñƼ¿¡´Â ´Þ·Â(Gridview)Ç¥½Ã¸¦ À§ÇÑ Custom Adapter°¡ ÀÖ±¸¿ä.

ÇöÀç Custom Adapter¿¡
¸¸¾à
{
ÀÏÁ¤ÀÌ Ãß°¡°¡ µÇ¾ú´Ù¸é (Listview¿¡ ÀÏÁ¤ÀÌ ÀÖ´Ù¸é)
GridviewÀÇ ÇØ´ç ³¯Â¥¿¡ ¾ÆÀÌÄÜ Ç¥½Ã (ImageView(¾ÆÀÌÄÜ))
}
¸¦ ±¸ÇöÇÏ·Á°í Çϴµ¥

±× Á¶°ÇÀ» DBÀÇ °ªÀÇ À¯¹«¿¡ µû¶ó Àâ¾Æ¾ßÇÒÁö
ListviewÀÇ °ªÀÇ À¯¹«¿¡ µû¶ó Àâ¾Æ¾ßÇÒÁö ¸ð¸£°Ú½À´Ï´Ù.

±×¸®°í Á¶°ÇÀ» ¾îµð ±âÁØÀ¸·Î Àâ¾Æ¾ßÇÒÁöµµ ¸·È÷°í ÀÖ³×¿ä ¤Ð¤Ð

ÇöÀç Á¦°¡ ½ÃµµÇغ» ÄÚµå´Â


                SQLiteDatabase db = mDBHelper.getWritableDatabase();
                cursor = db.rawQuery("SELECT * FROM today WHERE date = '" + curentDateString + "'", null);
                cursor.moveToPosition(1);
                ddd = cursor.getString(1);
        ImageView iw2 = (ImageView) v.findViewById(R.id.date_icon2);
                if ( ddd != "")
                {
                        iw2.setVisibility(View.VISIBLE);
                }else{
                        iw2.setVisibility(View.INVISIBLE);

                }


ÀÔ´Ï´Ù.

AdapterÀÇ Getview ¾È¿¡ µé¾î°¡ ÀÖ±¸¿ä.
DB°ª À¯¹«¸¦ È®ÀÎÇÏ¿© Á¶°ÇÀ» ¿Ï¼ºÇÏ°í ½ÍÀºµ¥ Á¦°¡ ¹è¿îÁö ¾ó¸¶ ¾ÈµÇ¼­ Àß ¸ð¸£°Ú½À´Ï´Ù. ±¸±Û¸µµµ ¸¹ÀÌ ÇßÁö¸¸ ã±â Èûµå³×¿ä..

Á¶±ÝÀ̳ª¸¶ µµ¿ò ºÎŹµå¸³´Ï´Ù!

0
ÃßõÇϱ⠴ٸ¥ÀÇ°ß 0
|
°øÀ¯¹öÆ°
  • ¾Ë¸² ¿å¼³, »óó ÁÙ ¼ö ÀÖ´Â ¾ÇÇÃÀº »ï°¡ÁÖ¼¼¿ä.
©¹æ »çÁø  
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û