¾ÛÅøÁî
46.¢½.168.138
46.¢½.168.129
46.¢½.168.161
46.¢½.168.136
46.¢½.168.145
46.¢½.168.162
46.¢½.168.144
46.¢½.168.140
115.¢½.135.198
46.¢½.168.139
 
°Ô½Ã¹° 223°Ç
   
protected ¿¡ ´ëÇÑ ex)protected Dialog Áú¹®ÀÔ´Ï´Ù.
±Û¾´ÀÌ : ±èÁøÈñ                   ³¯Â¥ : 2011-04-26 (È­) 21:14 Á¶È¸ : 3278
¿¹Á¦µéÀ» º¸¸é¼­ °øºÎÁß¿¡ Àִµ¥.. ±Ã±ÝÇÑ °ÍÀÌ Àվ ±ÛÀ» ¿Ã¸³´Ï´Ù.
´ÙÀ½°ú °°Àº ¼Ò½º°¡ ÀÖ°í
 
package org.kadicon.android.dialog;
import org.kadicon.android.dialog.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;
public class MyDialog extends Activity {
 private static final int DIALOG_MESSAGE = 1; // final º¯¼ö ¼±¾ð.
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  Button twoButtonsTitle = (Button) findViewById(R.id.show_dialog);
  twoButtonsTitle.setOnClickListener(new OnClickListener() {
   public void onClick(View v) {
    
    new AlertDialog.Builder(MyDialog.this).setTitle(
      "My Dialog Title").setPositiveButton("OK",
      new DialogInterface.OnClickListener() {
       public void onClick(DialogInterface dialog,
         int whichButton) {
        /* User clicked OK so do some stuff */
       }
      }).setNegativeButton("Cancel",
      new DialogInterface.OnClickListener() {
       public void onClick(DialogInterface dialog,
         int whichButton) {
        /* User clicked Cancel so do some stuff */
       }
      }).show();
   }
  });
 }
 @Override
 protected void onPause() {
  super.onPause();
  Log.i("Dialog", "onPause()");
  Toast toast = Toast.makeText(this, "onPause", Toast.LENGTH_LONG);
  toast.show();
 }
 @Override
 protected void onResume() {
  super.onResume();
  Log.i("Dialog", "onResume()");
  Toast toast = Toast.makeText(this, "onResume", Toast.LENGTH_LONG);
  toast.show();
 }
//??????
 @Override
 protected Dialog onCreateDialog(int id) {
  switch (id) {
  case DIALOG_MESSAGE:
   return new AlertDialog.Builder(MyDialog.this).setTitle(
     "Saved?").setPositiveButton("OK",
     new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog,
        int whichButton) {
       /* User clicked OK so do some stuff */
      }
     }).setNegativeButton("Cancel",
     new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog,
        int whichButton) {
       /* User clicked Cancel so do some stuff */
      }
     }).create();
  }
  return null;
 }
}
 
Á¦°¡ ±Ã±ÝÇÑ°ÍÀº À§¿¡¼­ onCreateDialog ¿¡´ëÇÑ ¸í·ÉÀÌ ´Ù ³¡³­ °ÍÀÌ ¾Æ´ÑÁö
¿Ö ¹Ø¿¡ ±»ÀÌ
 
//??????
 @Override
 protected Dialog onCreateDialog(int id) {
  switch (id) {
  case DIALOG_MESSAGE:
   return new AlertDialog.Builder(MyDialog.this).setTitle(
     "Saved?").setPositiveButton("OK",
     new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog,
        int whichButton) {
       /* User clicked OK so do some stuff */
      }
     }).setNegativeButton("Cancel",
     new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog,
        int whichButton) {
       /* User clicked Cancel so do some stuff */
      }
     }).create();
  }
  return null;
 }
}
 
ÀÌ·¯ÇÑ ¹®ÀåÀÌ µé¾î°¡´Â °É±î¿ä?
¶ÇÇÑ  @override ´Â ¾î¶²Àǹ̸¦ °®°í ÀÕ³ª¿ä
* ±ÛÀ» µî·ÏÇϽǶ§ ²À ÇÊ¿äÇÑ °æ¿ì°¡ ¾Æ´Ï¸é °³ÀÎÁ¤º¸¸¦ ³²±âÁö ¸¶¼¼¿ä ^^ (¿¬¶ôó,À̸ÞÀÏÁÖ¼Ò,Áֹεî·Ï¹øÈ£ µî)





 
±èÀºÈ£ 2011-04-27 (¼ö) 09:29
¿ì½¼ ¿À¹ö¶óÀ̵å´Â¿ä. ÇöÁ¦ Ŭ·¡½º´Â Activity¶ó´Â Ŭ·¡½º¸¦ »ó¼Ó ¹Þ¾Ò½À´Ï´Ù. ±×·¸±â¿¡ »ó¼Ó¹ÞÀº Activity Ŭ·¡½º¿¡ Á¤ÀǵǾî ÀÖ´Â ¸Þ¼Òµå¸¦ Àç Á¤ÀÇÇؼ­ ¾µ ¼ö ÀÖ´Â °ÍÀ̱¸¿ä.
±×¸®°í //?????? ÀÌ ¹Ø¿¡ ¼Ò½ºµéÀº »ç½Ç ¾îµð¼­ ºÒ·ÁÁö´Â °ÍÀ» Àú´Â ãÀ» ¼ö°¡¾ø³×¿ä. Áï ¾îµð¼­ ºÒ·ÁÁöÁö ¾Ê±â ¶§¹®¿¡ ÇöÁ¦ Ŭ·¡½º¿¡¼­´Â º°·Î ¾µ¸ð°¡ ¾ø¾î º¸ÀÔ´Ï´Ù. À§ÀÇ Å¬¸¯À̺¥Æ®À϶§ Àç»ç¿ë¼ºÀ» À§ÇØ ¸Þ¼Òµå¸¦ ¼±¾ðÇسõ°í ºÒ·¯´Ù ¾²°Å³ª ´Ù¸¥ º°µµÀÇ Å¬·¡½º¿¡¼­ Á¤ÀÇµÈ Æ˾÷À» ºÒ·¯¿À´Â ½ÄÀÇ ¹æ¹ýÀÌ Àְڴµ¥..
±×³É º¸±â¿¡ »ó´çÀÌ ÀÌ»óÇÑ ¼Ò½º³×¿ä. ¿¹Á¦·Î ¾²±â¿¡ º°·ÎÀÎ ¼Ò½º°¬½À´Ï´Ù¸¸..
±×¸®°í ¿ÂÆ÷Áî¿Í ¿Â¸®ÁòÀÌ º¸À̴µ¥..Activity ¶óÀÌÇÁ »çÀÌŬÀ» ã¾Æº¸½Ã¸é ½±°Ô ÀúºÎºÐÀº ÀÌÇØ°¡ °¥µí Çϳ׿ä. ÇöÁ¦ ¿©±â¼­ ¿À¹ö¶óÀ̵ùµÈ ÀÌÀ¯¸¦ ±»ÀÌ ¸»ÇÏÀÚ¸é... Æ˾÷âÀÌ ¿Ã¶ó¿ÔÀ»¶§ Æ÷Áî¶ó´Â ¸Þ½ÃÁö¸¦ ¶Ù¿ì´Âµ¥.. ÀÌ°ÍÀº ÇöÁ¦ Activity°¡ Æ÷Áî°¡ µÇ¾ú´Ù´Â ¸»ÀÔ´Ï´Ù. Âü°íÇϼ¼¿ä^^
 
±èÁøÈñ 2011-04-27 (¼ö) 16:24
°¨»çÇÕ´Ï´Ù~~^^
   

°Ô½Ã¹° 223°Ç
¹øÈ£ Á¦¸ñ ±Û¾´ÀÌ ³¯Â¥ Á¶È¸
43  protected ¿¡ ´ëÇÑ ex)protected Dialog Áú¹®ÀÔ´Ï´Ù. +2 ±èÁøÈñ 04-26 3279
42  Á¤º¸ °ø°³ ¹æ¹ý ¹®ÀÇ +1 À̼ҿµ 04-25 2715
41  ¾Èµå·ÎÀÌµå °³¹ßÀÚµé ¿¬ºÀÀÌ º¸Åë ¾î¶»°Ô µÇ³ª¿ä? +3 ÀèÄÛ 04-21 5841
40  QnA ÀÛ¼ºÀÌ ¾ÈµÇ³×¿ä? µî±ÞÃ¥Á¤ ¿ä°ÇÀº ¾î¶»°Ô È®ÀÎÇϳª¿ä? ¾Û ³»ºÎ°áÁ¦ ¹®ÀÇÇÕ´Ï´Ù. +1 ¸¶½Åµµ 04-20 2665
39  air ·±Å¸ÀÓ ¼³Ä¡°¡ ¾ÈµÇ¼­ ±×·¯´Âµ¥ ¾î¶»°Ô ÇؾßÇÒ±î¿ä?? ¿ÀÁöÈÆ 04-20 2805
38  EditText¿¡ °üÇÑ ½É¿ÀÇÑÁú¹®.. +5 ÇÑÁ¾±Ô 04-17 6196
37  À¥¿¡¼­ jpgÆÄÀÏÀ» bitmapÀ¸·Î ¸¸µé±â À§ÇÑ ¹æ¹ý? +2 ±èÅÂÇö 04-15 3004
36  ¸ð¹ÙÀÏ ÇÁ·Î±×·¥ °³¹ßÇϽǶ§ ÇÊ¿äÇÑ Àåºñ³ª µµ±¸°¡ ÀÖÀ¸½Å°¡¿ä? +1 ±èÁöµµ 04-14 2665
35  API ¼³¸íÀÌ Àß³ª¿ÍÀִ å ¾øÀ»±î¿ä..? +1 ÇÑÁ¾±Ô 04-13 4476
34  ¿ÕÃʺ¸°¡ °¡Àå ±âº»ÀûÀ¸·Î ¾Ë¾Æ¾ß ÇÒ °ÍÀÌ ¹«¾ùÀϱî¿ä? +8 ±è»óÈ£ 04-12 4397
33  View°´Ã¼¿¡´Ù°¡ Class¾È¿¡¸®½ºÆ® ¸¸µç°Å¸¦ º¸¿©ÁÖ·Á°íÇϰŵç¿ä +1 ÇÑÁ¾±Ô 04-09 4506
32  ¾Èµå·ÎÀ̵å ÇÁ·Î±×·¥À» ÇÚµåÆù¿¡ ¾î¶»°Ô ¼³Ä¡ Çϳª¿ä? +5 ÀÌ»ó´ë 04-07 3729
31  Å×½ºÆ®¿ë±â±âÁú¹® +6 À̼º±Ô 04-07 4717
30  Áú¹® Çϳª¸¸ ÇÒ°Ô¿ä ^^ +1 ÇϽ¿ë 04-01 2515
29  ¾îÇõ¥ÀÌÅÍ¿Í ¼­¹ö±¸Ãà¿¡ ´ëÇÏ¿© Áú¹®ÇÕ´Ï´Ù. ±èÂù 03-31 2955
28  ·±Ã³¸ðµåÀÇ ½Ì±ÛÀνºÅϽº¿¡¼­ Task º¸±â +1 ±èÀºÈ£ 03-30 4463
27  ¿ÏÀüÃʺ¸ Ã¥ÇÑ±Ç ÃßõºÎŹµå¸±°Ô¿ä +1 ¹ÚÀç¿ì 03-25 2851
26  Ã³À½ ÇÁ·Î±×·¡¹ÖÀ» Á¢ÇÏ·Á°í ÇÕ´Ï´Ù. ±³Á¦ ¹× °­ÀÇ Ãßõ ºÎŹµå¸³´Ï´Ù. +2 À̱¤Èñ 03-24 2896
25  ´ÙÀ½Ä«Æä °Ô½ÃÆÇ¿¡ ¿Ã¶ó¿À´Â ±ÛµéÀ» µû·Î ¹Þ¾Æ¿Ã ¼ö ÀÖ³ª¿ä? +4 ¹é½Â¿ì 03-21 3784
24  ´Ù¿î·Îµå¿¡ °üÇÑ ±Ã±ÝÁõ. +4 À¯Ã¤Áø 03-21 2912
 1  2  3  4  5  6  7  8  9  10  11  12  
 
 
 
Copyright ¨Ï wwwold.androidstudy.co.kr. All rights reserved.