¾ÛÅøÁî
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°Ç
   
°¡»ê ¹æ½ÄÀ¸·Î È­¸é¿¡ »Ñ¸®´Â°Ô °¡´ÉÇÑ°¡¿ä? (addictive)
±Û¾´ÀÌ : ±èº´ÁÖ                   ³¯Â¥ : 2011-09-26 (¿ù) 18:57 Á¶È¸ : 4337
package com.corea;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;
public class Image_ViewActivity extends Activity implements OnClickListener, OnSeekBarChangeListener {
    protected static final int PICK_FROM_ALBUM = 0;
 /** Called when the activity is first created. */
 Button btn,btn2;
 ImageView image;
 SeekBar sek;
 TextView txt;
 Uri mImageUri;
 RadioGroup radiogroup;
 int CHECKED_ARGB =1;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
      
        txt = new TextView(this);
       txt = (TextView)findViewById(R.id.test);
      
       
        sek = new SeekBar(this);
        sek = (SeekBar)findViewById(R.id.seekBar1);
        sek.setOnSeekBarChangeListener(this);
      //  onProgressChanged(sek, 100, true);
       sek.setMax(255);
        image=(ImageView)findViewById(R.id.imageView1);
       
        radiogroup = new RadioGroup(this);
        radiogroup = (RadioGroup)findViewById(R.id.radioGroup1);
        radiogroup.setOnCheckedChangeListener(new OnCheckedChangeListener()
       {
   
   @Override
   public void onCheckedChanged(RadioGroup arg0, int arg1) {
  
    // TODO Auto-generated method stub
    switch(arg1)
    {
    case R.id.rad4:
     CHECKED_ARGB = 1;
    break;
    case R.id.rad1:
    CHECKED_ARGB = 2;
     break;
    case R.id.rad2:
    CHECKED_ARGB = 3;
     break;
    case R.id.rad3:
    CHECKED_ARGB = 4;
     break;
    }
   }
  });
      
        btn = new Button(this);
        btn = (Button)findViewById(R.id.button1);
        btn2 = new Button(this);
        btn2 = (Button)findViewById(R.id.button2);
        btn.setOnClickListener(this);
        btn2.setOnClickListener(this);
        image.setOnLongClickListener(new OnLongClickListener()
        {
   
   @Override
   public boolean onLongClick(View arg0) {
    // TODO Auto-generated method stub
    Intent intent = new Intent(Intent.ACTION_PICK);
    intent.setType(android.provider.MediaStore.Images.Media.CONTENT_TYPE);
    startActivityForResult(intent, PICK_FROM_ALBUM);
    return false;
   }
  });
       
    }
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data )
    {
     if (resultCode ==RESULT_OK)
     {
      if(requestCode == PICK_FROM_ALBUM)
      {
       mImageUri = data.getData();
       image.setImageURI(mImageUri);
      }
     }
    }
   
    public void onClick(View v)
    {
     if(v==btn)
     {
      image.setImageResource(R.drawable.test2);
     }else
     {
      image.setAlpha(50);
     
     }
     
    }
   
    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch) {
     final int alphaVal = progress;
     image.post(new Runnable() {
   
   @Override
   public void run() {
    // TODO Auto-generated method stub
    switch(CHECKED_ARGB){
    case 1:
     image.setAlpha(255-alphaVal);
     txt.setText(""+alphaVal);
     break;
    case 2:
     image.setAlpha(alphaVal);
     txt.setText(""+alphaVal);
     break;
    case 3:
     image.setAlpha(alphaVal);
     txt.setText(""+alphaVal);
     break;
    case 4:
     image.setAlpha(alphaVal);
     txt.setText(""+alphaVal);
     break;
    }
   }
  });
    }
    public void onStartTrackingTouch(SeekBar seekBar) {       
    }
    public void onStopTrackingTouch(SeekBar seekBar) {
 
    }
}
* ±ÛÀ» µî·ÏÇϽǶ§ ²À ÇÊ¿äÇÑ °æ¿ì°¡ ¾Æ´Ï¸é °³ÀÎÁ¤º¸¸¦ ³²±âÁö ¸¶¼¼¿ä ^^ (¿¬¶ôó,À̸ÞÀÏÁÖ¼Ò,Áֹεî·Ï¹øÈ£ µî)




±èº´ÁÖ ´ÔÀÇ Q&A ÃÖ½Å±Û [´õº¸±â]


   

°Ô½Ã¹° 223°Ç
¹øÈ£ Á¦¸ñ ±Û¾´ÀÌ ³¯Â¥ Á¶È¸
103  [JAVA} Thread¿Í Runnable ¿¡¼­ÀÇ Àǹ®Á¡ÀÔ´Ï´Ù +2 À̱ÔÇü 08-11 3453
102  HTTP / Socket °¢°¢ ¾î´À°æ¿ì¿¡ »ç¿ëÇϳª¿ä? ÀÌ»óÈ­ 08-07 4088
101  ¾Èµå·ÎÀ̵å ÀÔ¹® !! +2 ÃÖ¼ºÁ¶ 08-07 3068
100  HTTP? / SOCKET? ¾î´À°ÍÀ» »ç¿ëÇÒÁö °í¹ÎÁßÀÔ´Ï´Ù. Á¶¾ðºÎŹµå¸³´Ï´Ù. +1 ÀÌ»óÈ­ 08-06 5321
99  vlc½ºÆ®¸®¹Ö MediaPlayer °ü·Ã Áú¹® ÃÖ¼öÈñ 08-04 4808
98  AVD¿¡¼­ °¡·Î¹æÇâ ¼³Á¤ +1 ÀÌÅÂÈñ 08-03 3010
97  ¾Èµå·ÎÀ̵å..±¸±Û Ä̸°´õ ¿¬µ¿ Çϴ¹æ¹ý. +2 ±èº´ÁÖ 08-01 7116
96  À̹ÌÁö ¾È¿¡ À̹ÌÁö ³Ö±â +1 ±è°Ç¿Ï 08-01 2930
95  ¾Èµå·ÎÀÌµå ¾îÇà °³¹ßÈÄ µð¹ÙÀ̽º¿¡ °üÇÑ Áú¹®ÀÔ´Ï´Ù +4 Á¶¿ë±¸ 08-01 3585
94  °¡»ê ¹æ½ÄÀ¸·Î È­¸é¿¡ »Ñ¸®´Â°Ô °¡´ÉÇÑ°¡¿ä? (addictive) Á¤ÅÂÇü 07-31 2906
93     °¡»ê ¹æ½ÄÀ¸·Î È­¸é¿¡ »Ñ¸®´Â°Ô °¡´ÉÇÑ°¡¿ä? (addictive) ±èº´ÁÖ 09-26 4338
92  ¾Û°³¹ßÀ» ÇÏ·Á°í Çϴµ¥¿ä ^^ +3 ¼±ÁÖÇü 07-29 2691
91  ChoogerActivity ½ÇÇàÀ» ¸·´Â ¹æ¹ý ¾øÀ»±î¿ä? +1 ÀÌÀ缺 07-28 4169
90  Æ¯Á¤ ·¹À̾ƿô¸¸ º¯°æÇϴ°Š¼Ò½º ÀÔ´Ï´Ù. +1 ÀÌÁ¾È£ 07-28 4379
89  ¾Èµå·ÎÀ̵å Áöµµ °ü·Ã Áú¹®ÀÔ´Ï´Ù ÀÌÇÑÁø 07-27 3426
88  ¹öÆ°À» ´©¸£¸é ƯÁ¤ ·¹À̾ƿô¸¸ º¯°æµÇµµ·Ï ÇÏ°í½ÍÀºµ¥ ¤Ð¤Ð +1 ÀÌÀ缺 07-27 4321
87  ¾Æ·¡ ¹öÆ° ·¹À̾ƿô ¹®ÀÇÇϽŰŠÇѹø ¸¸µé¾îºÃ½À´Ï´Ù. +1 ÀÌÁ¾È£ 07-25 4389
86  À̹ÌÁö ¹öÆ° 9°³Á¤µµ ¹è¿­ °¡´ÉÇϳª¿ä? +1 ±èÅ¿ì 07-23 5380
85     À̹ÌÁö ¹öÆ° 9°³Á¤µµ ¹è¿­ °¡´ÉÇϳª¿ä? ±èº´ÁÖ 08-04 4219
84  ÀÌ·± ¹öÆ°¹èÄ¡¸¦ Çϱâ À§Çؼ± ¾î¶² ·¹À̾ƿôÀ» »ç¿ëÇؾßÇÒ±î¿ä? +2 ±Ç¿ëÀÌ 07-23 2882
 1  2  3  4  5  6  7  8  9  10  11  12  
 
 
 
Copyright ¨Ï wwwold.androidstudy.co.kr. All rights reserved.