Android Application Development Tutorial – 12 – Setting up an Activity and Using SetContentView

[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –


Posted

in

by

Tags:

Comments

35 responses to “Android Application Development Tutorial – 12 – Setting up an Activity and Using SetContentView”

  1. Sokar599 Avatar

    for the most part

  2. andr pakpahan Avatar

    i have try to create splash screen and try to call the layout. I try to run it and i get error "Binary XML file line #1 error inflating class. The error happened after i set setContentView on the java class. how i fix it?

  3. Marihano Avatar

    This guy is awesome! Great job keep it going with the tutorials!

  4. Shiraj Gagneja Avatar

    i want to open second  activity from first activity when i used to press button  then from second activity i want to open third activity when i used to press another button i.e. placed inside second activity in android.

  5. saksham wason Avatar

    Error:Execution failed for task ':app:mergeDebugResources'.
    > Error: Failed to run command:
    C:UsersWASONAppDataLocalAndroidsdk1build-tools21.1.2aapt.exe s -i C:UsersWASONAndroidStudioProjectsMyApplication9appsrcmainresdrawable-hdpisam.png -o C:UsersWASONAndroidStudioProjectsMyApplication9appbuildintermediatesresdebugdrawable-hdpi-v4sam.png
    Error Code:
    42
    Output:
    libpng error: Not a PNG file

    please  help with this error

  6. Jon Edwards Avatar

    Old video I know, but you refer to the Android use of the keyword "super" as referring to the "super class" which is a little ambiguous for new programmers. New programmers may wish to note super.onCreate() calls the parent class' method 'onCreate()'… I'm still getting used to Android's framework but, in all likelihood, the parent class' onCreate() still contains important logic for the purposes of the program even though we're actually overriding it in the child class.

    http://docs.oracle.com/javase/tutorial/java/IandI/super.html

  7. ZeroDebtInvestments Avatar

    Why did you change the Bundle from savedInstanceState to TravisLoveBacon?

  8. Stefan Ivovic Avatar

    for the most part, this tut is basically nice

  9. Hallo123 Avatar

    If you're getting the  "splash cannot be resolved or is not a field" error message:
    1.  Replace ''import android.R;'', with '' import com.example.thenewboston.R;''.
    2. Clean your project (Project -> Clean)
    3. Make sure you have the splash.xml file set up as was shown in the previous video.

  10. Satabdhi Reddy Avatar

    Hello 
    setContentView(R.layout.splash) i am getting an error that R cannot be resolved into a variable
    can anyone sort me out of this problem plzzz?

  11. Māris Samats Avatar

    How can one person make hundreds of tutorials about programming, and still assume, that all the viewers are total hammers in programming.

  12. Pierre Der Avatar

    when setting the contentview, the 'slpash' name (in the R.layout.splash part), a error message pops up saying "splash cannot be resolved or is not a field". It then gives out two quick fixes: create a field "splash" in the type 'layout', or create a constant "splash" in the type 'layout'.
    anybody has an idea of how to fix this? thanks!!!

  13. Dana Muise Avatar

    "I'll talk about that a little later…" <never talks about it later>

  14. pankaj kumar Avatar

    Dear bucky none of the tutorials are working in 4.4 version ! 🙁
    please come up with latest series 🙂

  15. Chris McDonald Avatar

    My android AVD is stuck on the "Android" screen 🙁

  16. Kent Rose Avatar

    Does anyone know if this still works? I keep getting "ActivityManager: Warning: Activity not started, its current task has been brought to the front"

  17. Guru G Avatar

    Hello  🙂 
    setContentView(R.layout.splash);    gives me an error. How did you guys handled it ?

  18. SWEET RAZCAL Avatar

    Go to Project
    and Clean
    it will work
    or restart eclipse

  19. Benjie Lenteria Avatar

    yeah ..for the most part is starting to bug me.

  20. BruceMac9 Avatar

    Make sure you created the Splash class under src/com.thenewboston.travis.

  21. halil ibrahim baykal Avatar

    Please check import section

    if this line –> "import android.R;" exist you should remove

  22. OneManAndHisCastle Avatar

    awesome tutorials …for the most part…=)

  23. Sumit Thalwal Avatar

    i can not synchronize the splash, in setContentView , can you help me how to do it.?

  24. Laggy44 Avatar

    Oh, I got it. Instead of typing "import android.R", hold down ctrl+shift+o, and import the file with the name of your project in it.

  25. Laggy44 Avatar

    I'm having the same problem. Has anyone found a solution?

  26. glare whatsappvideos Avatar

    I typedR.layout.splash but its not able to recognise my xml splash file.bucky give me a solution..

  27. parthiban vk Avatar

    Same problem for me now… any idea how to fix it?

  28. wildndetroit Avatar

    worst names of all time:
    1. Gaylord Focker
    2. Travis LoveBacon
    jk i love the tutorials!

  29. Daniel Collier Avatar

    "for the most part" – travis

  30. amoghmalik Avatar

    Link all references for a local rename (does not change references
    in other files) – I keep getting this.

  31. Lóránd Szoyka Avatar

    it's working, clean your projekt with Projekt/Clean… it will rebuild it…

  32. David Kern Avatar

    i have a problem whit 'R' (unknown entity 'R' )
    what i need to do ?

Leave a Reply

Your email address will not be published. Required fields are marked *