01.11.2014 Views

The AndroidManifest.xml File - 안드로이드 기술 커뮤니티 : Korea ...

The AndroidManifest.xml File - 안드로이드 기술 커뮤니티 : Korea ...

The AndroidManifest.xml File - 안드로이드 기술 커뮤니티 : Korea ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Parcel : Rect Example (Basic (Intent) → Advanced (AIDL) )<br />

Intent i = new Intent();<br />

ComponentName comp =<br />

new ComponentName("org.kandroid.testApp",<br />

pp "org.kandroid.testApp.MyNextActivity");<br />

i.setComponent(comp);<br />

Rect rect = new Rect();<br />

rect.left =1;<br />

rect.right = 2;<br />

rect.bottom = 3;<br />

rect.top = 4;<br />

i.putExtra("parcelableContent", t t t" rect);<br />

startActivity(i);<br />

Intent intent = getIntent();<br />

Rect rect<br />

= (Rect) intent.getParcelableExtra("parcelableContent");<br />

TextView tvTop = (TextView)findViewById(R.id.top);<br />

TextView tvBottom = (TextView)findViewById(R.id.bottom);<br />

TextView tvLeft = (TextView)findViewById(R.id.left);<br />

TextView tvRight =(TextView)findViewById(R (TextView)findViewById(R.id.right); id tvTop.setText(Integer.toString(rect.top));<br />

tvBottom.setText(Integer.toString(rect.bottom));<br />

tvLeft.setText(Integer.toString(rect.left));<br />

tvRight.setText(Integer.toString(rect.right));<br />

tT t(I t t i ( t i ht))<br />

<strong>Korea</strong> Android Community- www.kandroid.org<br />

34

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!