Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
laboratoare:laborator01 [2015/02/23 08:57] Andrei Roșu-Cojocaru [Activitate de Laborator] |
laboratoare:laborator01 [2015/02/24 09:18] (current) Andrei Roșu-Cojocaru |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Laborator 01. Introducere în Programarea Android ====== | ====== Laborator 01. Introducere în Programarea Android ====== | ||
| - | ===== Sistemul de Operare Android (recapitulare) ===== | + | ===== Materiale Ajutătoare ===== |
| + | |||
| + | * [[http://pdsd2015.andreirosucojocaru.ro/_media/laboratoare/laborator01/pdsd2015-lab01-slides.pdf|pdsd2015-lab01-slides.pdf]] | ||
| + | * [[http://pdsd2015.andreirosucojocaru.ro/_media/laboratoare/laborator01/pdsd2015-lab01-slides-3pp.pdf|pdsd2015-lab01-slides-3pp.pdf]] | ||
| + | |||
| + | ===== Sistemul de Operare Android ===== | ||
| ==== Android - Prezentare Generală ===== | ==== Android - Prezentare Generală ===== | ||
| Line 108: | Line 113: | ||
| * SDK-ul pentru Android - va fi instalat în ''/opt/android-sdk-linux'' <code> | * SDK-ul pentru Android - va fi instalat în ''/opt/android-sdk-linux'' <code> | ||
| student@pdsd2015:~$ cd /tmp | student@pdsd2015:~$ cd /tmp | ||
| - | student@pdsd2015:/tmp$ wgethttp://wi-fi.cs.pub.ro/~dniculescu/didactic/pdsd/eclipse/tgz/opt.android-sdk-linuz.tgz | + | student@pdsd2015:/tmp$ wgethttp://wi-fi.cs.pub.ro/~dniculescu/didactic/pdsd/eclipse/tgz/opt.android-sdk-linuz.zip |
| student@pdsd2015:/tmp$ sudo bash | student@pdsd2015:/tmp$ sudo bash | ||
| root@pdsd2015:/tmp# cd / | root@pdsd2015:/tmp# cd / | ||
| - | root@pdsd2015:/# tar xzvf opt.android-sdk-linuz.tgz | + | root@pdsd2015:/# unzip /tmp/opt.android-sdk-linuz.zip |
| root@pdsd2015:/# exit | root@pdsd2015:/# exit | ||
| - | student@pdsd2015:/tmp$ rm -f opt.android-sdk-linuz.tgz | + | student@pdsd2015:/tmp$ rm -f opt.android-sdk-linuz.zip |
| </code> | </code> | ||
| * mediul integrat de dezvoltare Eclipse Luna SR1a (4.4.1), cu plugin-uri pentru Android și Genymotion - va fi instalat în /opt/eclipse (configurările vor fi plasate în ''/home/student/.eclipse'') <code> | * mediul integrat de dezvoltare Eclipse Luna SR1a (4.4.1), cu plugin-uri pentru Android și Genymotion - va fi instalat în /opt/eclipse (configurările vor fi plasate în ''/home/student/.eclipse'') <code> | ||
| student@pdsd2015:~$ cd /tmp | student@pdsd2015:~$ cd /tmp | ||
| - | student@pdsd2015:/tmp$ wgethttp://wi-fi.cs.pub.ro/~dniculescu/didactic/pdsd/eclipse/tgz/opt.eclipse.tgz | + | student@pdsd2015:/tmp$ wgethttp://wi-fi.cs.pub.ro/~dniculescu/didactic/pdsd/eclipse/tgz/opt.eclipse.zip |
| student@pdsd2015:/tmp$ sudo bash | student@pdsd2015:/tmp$ sudo bash | ||
| root@pdsd2015:/tmp# cd / | root@pdsd2015:/tmp# cd / | ||
| - | root@pdsd2015:/# tar xzvf opt.eclipse.tgz | + | root@pdsd2015:/# unzip /tmp/opt.eclipse.zip |
| root@pdsd2015:/# exit | root@pdsd2015:/# exit | ||
| - | student@pdsd2015:/tmp$ rm -f opt.eclipse.tgz | + | student@pdsd2015:/tmp$ rm -f opt.eclipse.zip |
| - | student@pdsd2015:/tmp$ wgethttp://wi-fi.cs.pub.ro/~dniculescu/didactic/pdsd/eclipse/tgz/dot.eclipse.tgz | + | student@pdsd2015:/tmp$ wgethttp://wi-fi.cs.pub.ro/~dniculescu/didactic/pdsd/eclipse/tgz/dot.eclipse.zip |
| student@pdsd2015:/tmp$ sudo bash | student@pdsd2015:/tmp$ sudo bash | ||
| root@pdsd2015:/tmp# cd / | root@pdsd2015:/tmp# cd / | ||
| - | root@pdsd2015:/# tar xzvf dot.eclipse.tgz | + | root@pdsd2015:/# unzip /tmp/dot.eclipse.zip |
| root@pdsd2015:/# exit | root@pdsd2015:/# exit | ||
| - | student@pdsd2015:/tmp$ rm -f dot.eclipse.tgz | + | student@pdsd2015:/tmp$ rm -f dot.eclipse.zip |
| </code> | </code> | ||
| * emulatorul Genymotion - va fi instalat în ''/opt/genymotion'' <code> | * emulatorul Genymotion - va fi instalat în ''/opt/genymotion'' <code> | ||
| student@pdsd2015:~$ cd /tmp | student@pdsd2015:~$ cd /tmp | ||
| - | student@pdsd2015:/tmp$ wgethttp://wi-fi.cs.pub.ro/~dniculescu/didactic/pdsd/eclipse/tgz/opt.genymotion.tgz | + | student@pdsd2015:/tmp$ wgethttp://wi-fi.cs.pub.ro/~dniculescu/didactic/pdsd/eclipse/tgz/opt.genymotion.zip |
| student@pdsd2015:/tmp$ sudo bash | student@pdsd2015:/tmp$ sudo bash | ||
| root@pdsd2015:/tmp# cd / | root@pdsd2015:/tmp# cd / | ||
| - | root@pdsd2015:/# tar xzvf opt.genymotion.tgz | + | root@pdsd2015:/# unzip /tmp/opt.genymotion.zip |
| root@pdsd2015:/# exit | root@pdsd2015:/# exit | ||
| - | student@pdsd2015:/tmp$ rm -f opt.genymotion.tgz | + | student@pdsd2015:/tmp$ rm -f opt.genymotion.zip |
| </code> | </code> | ||
| Line 930: | Line 935: | ||
| </code> | </code> | ||
| - În fișierul ''MainActivity.java'' din pachetul ''ro.pub.cs.systems.pdsd.lab01'' (directorul ''src''), să se modifice metoda ''onClick'' a clasei interne ''ButtonClickListener'' astfel încât: | - În fișierul ''MainActivity.java'' din pachetul ''ro.pub.cs.systems.pdsd.lab01'' (directorul ''src''), să se modifice metoda ''onClick'' a clasei interne ''ButtonClickListener'' astfel încât: | ||
| - | - mesajul afișat să includă numele utilizatorului, așa cum apare în widget-ul de tip ''EditBox''; | + | - mesajul afișat să includă numele utilizatorului, așa cum apare în widget-ul de tip ''EditBox''; <code java> |
| + | greetingTextView.setText(greetingTextView.getText().replace("xxx", "\n"+userNameEditText.getText())); | ||
| + | </code> | ||
| - să se aplice un efect de fade, astfel încât mesajul afișat să dispară treptat în decurs de ''TRANSPARENCY_EFFECT_DURATION'' milisecunde. <code java> | - să se aplice un efect de fade, astfel încât mesajul afișat să dispară treptat în decurs de ''TRANSPARENCY_EFFECT_DURATION'' milisecunde. <code java> | ||
| AlphaAnimation fadeEffect = new AlphaAnimation(1.0f, 0.0f); | AlphaAnimation fadeEffect = new AlphaAnimation(1.0f, 0.0f); | ||
