create an app for phone and tablet

43
Create an app for Phone and Tablet Varavut , 5 Oct 2014 CPOL 5.00 (5 votes) Rate : vote 1 vote 2 vote 3 vote 4 vote 5 Create a app that support Phone and Tablet Completed Project (Android Studio) - 578.2 KB Index Introduction Background Let's go o How to create the Fragment o Fragment Activity o Put the Fragment to an Activity <fragment/> Put the Fragment via Java code o Passing to data to a Fragment o Communicating between Fragment and Activity Define the Interface Attach the Listener Call the Listener Methods Implement the Listener o The Back Stack o Fragment Lifecycle o Warning o Futher Learning Version History Introduction

Upload: fazal-amin

Post on 18-Aug-2015

213 views

Category:

Documents


0 download

DESCRIPTION

Create an app

TRANSCRIPT

Create an app for Phone and TabletVaravut, 5 Oct 2014 CPOL 5.00 (5 votes)Ratevote 1 vote 2 vote ! vote 4 vote 5Create a app that s"pport Phone and Tablet Completed Project (Android Studio) - 578.2 KB#nde$ #ntrod"ct%on &ac'(ro"nd Let)s (oo *o+ to create the ,ra(-ento ,ra(-ent .ct%v%t/o P"t the ,ra(-ent to an .ct%v%t/ 0fra(-ent12 P"t the ,ra(-ent v%a 3ava codeo Pass%n( to data to a ,ra(-ento Co--"n%cat%n( bet+een ,ra(-ent and .ct%v%t/ 4e5ne the #nterface .ttach the L%stener Call the L%stener 6ethods #-ple-ent the L%stenero The &ac' 7tac'o ,ra(-ent L%fec/cleo 8arn%n(o ,"ther Learn%n( 9ers%on *%stor/ #ntrod"ct%onOne .ndro%d appl%cat%on pac'a(e can be r"n on a ton of dev%ces %ncl"d%n( a phone, tablet, PC, etc. #n th%s art%cle +e +%ll tal' abo"t ho+ to -a'e the app s"%table for the b%( screen, ho+ can e:c%entl/ "se the screen space, and t%p and tr%c' to -a'e the app better.&ac'(ro"nd8hen /o" r"n the app on the b%((er screen, /o" -a/ see that so-et%-e there %s a lot of"n"sed space beca"se that app doesn)t des%(ned for the b%( screen. .ndro%d prov%des the alternat%ve reso"rce -echan%s- to (%ve the r%(ht reso"rce to the r%(ht screen b"t %t not eno"(h, .ndro%d also prov%de the ,ra(-ent that %s "sed to create -"lt%;pane appl%cat%on +%th the ,ra(-ent /o" can p"t -an/ screen of appl%cat%on %nto a one screen.Let)s (o.ndro%d !.0 %ntrod"ce the ,ra(-ent, ,ra(-ent %s a portable "ser %nterface that-a'es poss%ble %n -"lt%;pance