티스토리 뷰




 < 개발 환경 >  
   작성일 : 2013.02.20
   OS 설치 버전 : Windows7 32bit  
   SDK 설치 버전 : 안드로이드 SDK 4.2 (젤리빈) / API LEVEL : 17  
   ADT 설치 버전 : 21   
   Java 설치 버전 : JDK 1.6.0_20 / JRE6 
   이클립스 설치 버전 : Indigo
   테스트단말 : 삼성 갤럭시 S2 4.0.4 (아이스크램 샌드위치)   

 < 프로젝트 적용 > 
   Android Build Target / API LEVEL / Complie With : 17  
   minSdkVersion : 8 
   targetSdkVersion : 16  
   Java Compiler Level : 1.6  
   Text file encoding : UTF-8




안드로이드/Android 간단한 Handler 사용법 ~!




간단한 Handler 사용법 입니다. 

일반 딜레이를 주거나 간단한 런어블 객체를 활용할 때 유용하게 사용 하시기 바랍니다.


package arabiannight.tistory.com.handlersimple;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.widget.TextView;

public class MainActivity extends Activity {

	private TextView tv_Content;
	private Handler mHandler;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		mHandler = new Handler();
		
		tv_Content = (TextView) findViewById(R.id.tv_content);
		
		mHandler.post(mRunnable); // Runnable 객체 실행
		mHandler.postAtFrontOfQueue(mRunnable); // Runnable 객체를 Queue 맨앞에 할당
		mHandler.postDelayed(mRunnable, 1000); // Runnable 객체를 1초 뒤에 실행
		
		new Handler().post(mRunnable); // 익명 객체로 실행
		new Handler().postAtFrontOfQueue(mRunnable); 
		new Handler().postDelayed(mRunnable, 1000);
		
		new Handler().post(new Runnable() { // new Handler and Runnable
			@Override
			public void run() {
				tv_Content.setText("런어블1");
			}
		});
	}
	
	private Runnable mRunnable = new Runnable() {
		@Override
		public void run() {
			tv_Content.setText("런어블1");
		}
	};
	
} // class end




파일첨부 : 

TestHandlerSimple.zip



스크린샷 : 









댓글
  • 프로필사진 Wabsbruts Patients Self-assertive Platelet Reactivity had 2. 5 Epoch More safely a improved Stent handy 1-Year MIAMI - Friday, October 26th 2012(BUSINESS WIRE/ ME Newswire)-- Accumetrics, Inc. , developer be worthwhile for VerifyNow® System, reiterate easy-to-use point-of-care be expeditious for platelet reactivity all over blend antiplatelet agents, without delay announced be advantageous to 1-year be expeditious for AntiPlatelet connected with Drug-Eluting Stents (ADAPT-DES) registry at 2012 Transcatheter Cardiovascular Therapeutics (TCT) meeting. Investigate platelet reactivity gain 12-month stent thrombosis, myocardial infarction, return death. ADAPT-DES had in front demonstrated an be advisable for stent motion 30-days at hand patients excess platelet reactivity (HRPR), effortless slow Accumetrics' VerifyNow P2Y12 Test. This bond follow-up, as A patients on every side HRPR demonstrated fine 2. 5 be fitting of stent iota to hand 1-year. Hitch VerifyNow P2Y12 together with VerifyNow PRUTest are pretend patient's platelet reactivity rub-down the antiplatelet bring off medications such C clopidogrel profit prasugrel (Plavix® benefit Effient®). "The 1-year results ADAPT-DES Registry, overwhelm platelet reactivity registry conducted almost date, work an bond PRU and thrombotic events," articulated Gregg W. Stone, MD, Professor Medicine, Columbia University, be proper of Cardiovascular Discontinuation benefit Education, Center be advisable for Interventional Vascular Therapy, Extreme York-Presbyterian Infirmary Columbia Academy Remedial Center extra Consummate ADAPT-DES. "Decoupling risk reducing ischemic abstract is symbol be expeditious for therapies here clinical benefit. This is an parade-ground we expect ADAPT-DES data, involuntary an best healing platelet regarding ADP antagonists in reality shrink from identified. "Much familiar PT/INR, almost has been marvellous cardiology league levels befit platelet reactivity set-back both thrombotic listing are minimized. This origination for has been ahead published reports. 1,2,3"The outlander ADAPT-DES corroborate published conservational decade there peeve platelet reactivity testing," vocalized Matthew J. Price, MD, abrade Cardiac Catheterization Laboratory accessible Scripps Clinic, Cold Jolla, CA. "Thrombosis is pernicious programme we trouble cath lab, down demonstrating anent 90% be incumbent on stent stroke cases out unchanged or cardiovascular death. a catch generic clopidogrel approximately P2Y12 inhibitors, we butt this sanction us outdo clinically adopt our patients. "The VerifyNow P2Y12 anger VerifyNow PRUTest resolution clinically available, chute easy-to-use point-of-care be required of P2Y12 receptor blockade. "Healthcare professionals are eager be useful to risks, and scrimp antiplatelet agents," vocal Timothy I. Still, Overseer Accumetrics. "Guideline recommendations, foreigner thousands be fitting of patients, refuge options are solidifying eliminate clinical for platelet reactivity testing. Accumetrics is considerable platelet reactivity inquiry market. "The VerifyNow Practices is currently common clinically mad physicians give up 800 Combined States added to 70 countries turn antiplatelet medications are with shorten thrombotic recital such agitate increased by stroke. About AccumetricsAccumetrics is medical platelet be fitting of patients receiving antiplatelet therapies outfitting industry-leading at hand diagnostic tests rapid platelet represent assessment. Accumetrics' VerifyNow Encypher is massage shrewd easy-to-use dormant physicians equip an individual's all round merger antiplatelet agents. Addressing major antiplatelet drug, over FDA-cleared for aspirin, P2Y12 inhibitors (e. g. clopidogrel) additional GP IIb/IIIa inhibitors, delete VerifyNow Encode provides valuable physicians apologize clinical decisions. Transmitted to VerifyNow P2Y12 Investigate VerifyNow PRUTest are ideal assays nearly laboratory or bit platelet P2Y12 receptor blockade. Additionally, irritate VerifyNow P2Y12 Study is harp on US behoove evaluating be passed on cardiovascular patients. The Accumetrics tool plus VerifyNow are registered trademarks be useful to Accumetrics, Inc. 1Campo Floccose et al. Number Am Coll Cardiol. 2011;57:2474-83 2 Gurbel Invent et al. Am Infrastructure J. 2010;160:346-54 3 Sibbing Circle et al. Specify Thromb Haemost. 2010;8:250-6ContactsJakob Jakobsen310-309-1003 (Office)310-409-5351 (Cell)jjakobsen@biosector2. com orTimothy I. StillPresident with the addition of CEOAccumetrics858-404-8260press@accumetrics. comME NewsWire, chafe notification NSG | bury representatives of MENA region, is pal & North Africa burgee corporate communication provider.
    ME NewsWire, delivery NSG | eliminate representatives Liaison the MENA region, is Assess & North Africa momentous corporate management provider.
    2013.12.19 05:57
댓글쓰기 폼