SlideShare a Scribd company logo
1 of 16
Download to read offline
Razvoj Android aplikacija
Radionica 2 - “Hands on”
Jelena Krmar,
Byteout Software
Pitanja u vezi
prethodne radionice?
Kako je prošao domaći?
? ? ?
Povezivanje sa telefonom (USB debugging)
● Prvo, potrebno je prikazati Opcije za programere, koje su obično skrivene
○ Razlikuje se malo od uređaja do uređaja
○ U podešavanjima, O telefonu, treba pronaći Build number (može se desiti
da je prevedeno na različite načine) i tapnuti to određen broj puta
○ Najbolje je pronaći uputstva na Internetu za konkretan model telefona
○ https://www.digitaltrends.com/mobile/how-to-get-developer-options-on-an
droid/
● Zatim, u Opcijama za programere, treba uključiti opciju USB debugging, ili
kako je često prevode Pronalaženje grešaka putem USB-a
Današnji zadatak
Magic 8-ball
Magična kugla… tj kvadrat...
1. Objašnjenje: font 18sp, udaljeno od svih ivica 32dp
2. Odgovor: dimenzije 180 x 180 dp, centriran,
font 24sp, bold
3. Dugme “prikaži odgovor”: visina 40 dp
a. Odgovori se nasumicno smenjuju na klik:
"Ne", "Nikad", "Definitivno", "Da", "Verovatno",
"Možda", "Nemam pojma"
b. Odabrati proizvoljnu boju dugmeta,
ali da bude jasno vidljiv tekst
c. Udaljenost od kvadrata 24dp
4. Treba da radi dobro na svim rezolucijama, i nije
moguće rotirati ekran
Bacimo se na posao!
Položaj komponenti na ekranu - Layouts
Mreža = GridView Tabela = ListView ConstraintLayout
Šta smo sve uradili
Da sumiramo...
✓ Napravili novi projekat
✓ Dodali praznu aktivnost
✓ Dodali smo potrebne komponente na ekran: ConstraintLayout, TextView i Button
○ Sredili smo njihove međusobne položaje
○ Videli neke načine pozicioniranja elemenata koji mogu da se koriste u
aplikaciji
○ Naučili kako radi ConstraintLayout
https://developer.android.com/training/constraint-layout/index.html
✓ Uklonili ActionBar (styles.xml)
○ <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
✓ Primenili trik da promenimo boju Status bara (colors.xml)
○ <color name="colorPrimaryDark">#000000</color>
Initial setup, vizuelni prikaz i stilovi...
✓ Namestili da se sadržaj ekrana ne rotira (AndroidManifest.xml)
○ Unutar taga <activity> ubacili android:screenOrientation="portrait"
✓ Promenili ikonicu aplikacije
○ Generisali različite veličine koristeći Android Asset Studio:
https://romannurik.github.io/AndroidAssetStudio/index.html
○ I ubacili u folder res / mipmap
✓ Promenili tekst koji se pojavljuje ispod ikonice (strings.xml)
○ <string name="app_name">Odabrani tekst</string>
✓ Videli čemu služi strings.xml
○ (da bi se kod bolje organizovao ;) )
Razna podešavanja aplikacije
Povezivanje sa kodom
✓ Upoznali se malko sa sintaksom - i XML-om i Javom
✓ Videli šta je R i čemu služi
○ Nešto kao “globalni objekat” koji čuva informacije o resursima
(stvarima definisanim u XML-u)
○ R.layout.naziv_layouta pronalazi XML fajl unutar Java koda
○ R.id.naziv_komponente pronalazi komponentu koju smo “dovukli” na ekran po
ID-u koji smo joj dali
✓ Naučili kako se menjaju atributi komponenata kroz kod (npr. setText)
✓ Videli smo kako možemo podesiti dugme (Button) da reaguje na klik
Pitanja?
? ? ?
Zaključci
● Ne morate razumeti baš svaku liniju koda da biste nešto uspeli da napravite ;)
● Isprobavajte različite tehnologije
○ Mislite da native Android development nije za vas?
○ Probajte sa hibridnim pristupom, nikad se ne zna, možda vam se svidi
○ Stalno izlazi nešto novo, sve bolje i zanimljivije
● Nemojte odustajati zbog trenutnih poteškoća sa hardverom
○ Uvek se može pozajmiti, testirati kod nekog drugog
○ Ni samo gledanje video tutorijala bez kodiranja nije toliko loše :)
○ Makar da vam pokaže šta sve postoji
● Povežite se, radite zajedno na idejama koje vas inpirišu
● Da bismo nastavili da učimo, važno je da smislimo zadatak koji nas motiviše
● Ideja za unapređenja trenutne aplikacije
○ Kako da bude okrugla kugla? Ima više načina, svaki ima neku začkoljicu…
● Ja sam napravila aplikaciju, “Gde sledeće optutovati?” Sa spiskom destinacija
na koje mi se ide
○ Ideja za to: staviti da pozadina bude neka vesela turistička slika
○ Da bi se to uradilo moraju se napraviti slike i proučiti rezolucije.
● Još neke varijacije na temu:
○ Gde izaći veceras? Šta obući danas? Šta kupiti za rođendan? ….
● Vaše ideje?
Domaći
Kontakt i resursi
● Kontakt, za bilo kakva pitanja: jelenakrmar@gmail.com
● Prezentacije: https://www.slideshare.net/JelenaKrmar/presentations
● Iskomentarisan kod: https://github.com/jelenakrmar/android-radionica
● Moguća rešenja za probleme pri instalaciji:
https://tinyurl.com/as-instalacija-problemi
● Kako napraviti APK - instalaciju koju možete da šaljete ljudima:
https://developer.android.com/studio/build/building-cmdline.html#DebugMode
● Besplatan video kurs Androida:
https://www.udemy.com/become-an-android-developer-from-scratch
● Dokumentacija: https://developer.android.com/index.html
To je to!
Hvala na pažnji!

More Related Content

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Razvoj Android aplikacija 2 - Praktičan primer

  • 1. Razvoj Android aplikacija Radionica 2 - “Hands on” Jelena Krmar, Byteout Software
  • 2. Pitanja u vezi prethodne radionice? Kako je prošao domaći? ? ? ?
  • 3. Povezivanje sa telefonom (USB debugging) ● Prvo, potrebno je prikazati Opcije za programere, koje su obično skrivene ○ Razlikuje se malo od uređaja do uređaja ○ U podešavanjima, O telefonu, treba pronaći Build number (može se desiti da je prevedeno na različite načine) i tapnuti to određen broj puta ○ Najbolje je pronaći uputstva na Internetu za konkretan model telefona ○ https://www.digitaltrends.com/mobile/how-to-get-developer-options-on-an droid/ ● Zatim, u Opcijama za programere, treba uključiti opciju USB debugging, ili kako je često prevode Pronalaženje grešaka putem USB-a
  • 5. Magična kugla… tj kvadrat... 1. Objašnjenje: font 18sp, udaljeno od svih ivica 32dp 2. Odgovor: dimenzije 180 x 180 dp, centriran, font 24sp, bold 3. Dugme “prikaži odgovor”: visina 40 dp a. Odgovori se nasumicno smenjuju na klik: "Ne", "Nikad", "Definitivno", "Da", "Verovatno", "Možda", "Nemam pojma" b. Odabrati proizvoljnu boju dugmeta, ali da bude jasno vidljiv tekst c. Udaljenost od kvadrata 24dp 4. Treba da radi dobro na svim rezolucijama, i nije moguće rotirati ekran
  • 6. Bacimo se na posao!
  • 7. Položaj komponenti na ekranu - Layouts Mreža = GridView Tabela = ListView ConstraintLayout
  • 8. Šta smo sve uradili Da sumiramo...
  • 9. ✓ Napravili novi projekat ✓ Dodali praznu aktivnost ✓ Dodali smo potrebne komponente na ekran: ConstraintLayout, TextView i Button ○ Sredili smo njihove međusobne položaje ○ Videli neke načine pozicioniranja elemenata koji mogu da se koriste u aplikaciji ○ Naučili kako radi ConstraintLayout https://developer.android.com/training/constraint-layout/index.html ✓ Uklonili ActionBar (styles.xml) ○ <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> ✓ Primenili trik da promenimo boju Status bara (colors.xml) ○ <color name="colorPrimaryDark">#000000</color> Initial setup, vizuelni prikaz i stilovi...
  • 10. ✓ Namestili da se sadržaj ekrana ne rotira (AndroidManifest.xml) ○ Unutar taga <activity> ubacili android:screenOrientation="portrait" ✓ Promenili ikonicu aplikacije ○ Generisali različite veličine koristeći Android Asset Studio: https://romannurik.github.io/AndroidAssetStudio/index.html ○ I ubacili u folder res / mipmap ✓ Promenili tekst koji se pojavljuje ispod ikonice (strings.xml) ○ <string name="app_name">Odabrani tekst</string> ✓ Videli čemu služi strings.xml ○ (da bi se kod bolje organizovao ;) ) Razna podešavanja aplikacije
  • 11. Povezivanje sa kodom ✓ Upoznali se malko sa sintaksom - i XML-om i Javom ✓ Videli šta je R i čemu služi ○ Nešto kao “globalni objekat” koji čuva informacije o resursima (stvarima definisanim u XML-u) ○ R.layout.naziv_layouta pronalazi XML fajl unutar Java koda ○ R.id.naziv_komponente pronalazi komponentu koju smo “dovukli” na ekran po ID-u koji smo joj dali ✓ Naučili kako se menjaju atributi komponenata kroz kod (npr. setText) ✓ Videli smo kako možemo podesiti dugme (Button) da reaguje na klik
  • 13. Zaključci ● Ne morate razumeti baš svaku liniju koda da biste nešto uspeli da napravite ;) ● Isprobavajte različite tehnologije ○ Mislite da native Android development nije za vas? ○ Probajte sa hibridnim pristupom, nikad se ne zna, možda vam se svidi ○ Stalno izlazi nešto novo, sve bolje i zanimljivije ● Nemojte odustajati zbog trenutnih poteškoća sa hardverom ○ Uvek se može pozajmiti, testirati kod nekog drugog ○ Ni samo gledanje video tutorijala bez kodiranja nije toliko loše :) ○ Makar da vam pokaže šta sve postoji ● Povežite se, radite zajedno na idejama koje vas inpirišu
  • 14. ● Da bismo nastavili da učimo, važno je da smislimo zadatak koji nas motiviše ● Ideja za unapređenja trenutne aplikacije ○ Kako da bude okrugla kugla? Ima više načina, svaki ima neku začkoljicu… ● Ja sam napravila aplikaciju, “Gde sledeće optutovati?” Sa spiskom destinacija na koje mi se ide ○ Ideja za to: staviti da pozadina bude neka vesela turistička slika ○ Da bi se to uradilo moraju se napraviti slike i proučiti rezolucije. ● Još neke varijacije na temu: ○ Gde izaći veceras? Šta obući danas? Šta kupiti za rođendan? …. ● Vaše ideje? Domaći
  • 15. Kontakt i resursi ● Kontakt, za bilo kakva pitanja: jelenakrmar@gmail.com ● Prezentacije: https://www.slideshare.net/JelenaKrmar/presentations ● Iskomentarisan kod: https://github.com/jelenakrmar/android-radionica ● Moguća rešenja za probleme pri instalaciji: https://tinyurl.com/as-instalacija-problemi ● Kako napraviti APK - instalaciju koju možete da šaljete ljudima: https://developer.android.com/studio/build/building-cmdline.html#DebugMode ● Besplatan video kurs Androida: https://www.udemy.com/become-an-android-developer-from-scratch ● Dokumentacija: https://developer.android.com/index.html
  • 16. To je to! Hvala na pažnji!