How to Make Android Apps 5 : Multiple Android Activities

  Рет қаралды 191,669

Derek Banas

Derek Banas

Күн бұрын

Пікірлер: 324
@ahmedzunaid3593
@ahmedzunaid3593 8 жыл бұрын
I just simply love your tutorials. Honestly, there are many paid courses.. full of garbage and doing the same things with same fashion...But your one is a lot different.. keep up the good work...thanks!!
@derekbanas
@derekbanas 8 жыл бұрын
Thank you :) I'm very happy I could help
@hanznewton889
@hanznewton889 8 жыл бұрын
This video makes me look stupid in front of my Android Studio., You are awesome man.
@derekbanas
@derekbanas 8 жыл бұрын
Thank you :)
@maresolaris
@maresolaris 9 жыл бұрын
My compliments! This (rather high paced) tutorial actually made me grasp the concept of Intents and multiple screens. Thank you very much and keep up the good works - I really like your tutorials.
@derekbanas
@derekbanas 9 жыл бұрын
+Marcel Berkien Thank you for the nice compliments :) I do my best to make original videos. I'm glad you found it useful.
@brendanj8344
@brendanj8344 10 жыл бұрын
3:05 the lightbulb pops up but it says "override resource in other configuration" not extract strings, did I miss something?
@derekbanas
@derekbanas 10 жыл бұрын
Brendan Jackson Make sure your code is the same as mine. I have a link to the code in the description.
@timblack4549
@timblack4549 10 жыл бұрын
Hi Derek, Thanks for the new video! I was wondering why you didn't select "New Activity" instead of "Layout XML File" when creating the "SecondActivity". It creates the java class, layout file and creates the entry in the manifest file in one shot. The only cleanup that might be needed (if you don't want a actionbar menu) is the "Settings" menu item added by default.
@derekbanas
@derekbanas 10 жыл бұрын
In the spur of the moment I thought it may be beneficial to show how the whole Activity came together. These videos aren't scripted so I get strange ideas some times while recording.
@Shellgaja
@Shellgaja 9 жыл бұрын
Love your stuff! You break it down into understandable bits and I can actually hear you consistently! and obviously, you know your stuff (at least from what I've seen. ;) )
@derekbanas
@derekbanas 9 жыл бұрын
+Zera Gera Thank you very much :)
@Shellgaja
@Shellgaja 9 жыл бұрын
Jurr velcome!
@StudyGyaan
@StudyGyaan 8 жыл бұрын
Sir i want to ask u a question about my project. Can i convert images into 3d model in android similar software like autodesk123d
@derekbanas
@derekbanas 8 жыл бұрын
Sorry, but I'm not sure what you mean. I doubt a phone has enough power to manipulate 3D models
@AveLenivius
@AveLenivius 5 жыл бұрын
Thanks for the video, and thanks for putting the code in description, very helpful!
@MisterRPMusic
@MisterRPMusic 10 жыл бұрын
You sir are the most fantastic human being on the face of the planet
@derekbanas
@derekbanas 10 жыл бұрын
Delta Luke Thank you for the very nice compliment :) I do my best
5 жыл бұрын
You are awesome Derek. Your tutorials have a greate quality and your teaching are amazing easily. Thanks for share your knowledge for free in KZbin! Take care and continues to make awesome tutorials like this.
@derekbanas
@derekbanas 5 жыл бұрын
Thank you for the nice message :) I appreciate it!
@jojoray
@jojoray 7 жыл бұрын
This is such a good, detailed, and high quality tutorial! Love it!
@derekbanas
@derekbanas 7 жыл бұрын
Thank you very much :)
@MarvelousLXVII
@MarvelousLXVII 10 жыл бұрын
Very awesome video. Straight to the point. Thanks for making them as well as the cooking videos.
@derekbanas
@derekbanas 10 жыл бұрын
Marvelous Marv Thank you :) I have many more Android and cooking videos coming soon.
@ethanlee6719
@ethanlee6719 8 жыл бұрын
i've been looking for this video. I've got an internship opportunity, and they gave me 5 days to learn as much of android studio as possible. I'vegot 2 years of courses at my university, it makes sense if you see someone actually doing it. Thanks.
@derekbanas
@derekbanas 8 жыл бұрын
+Ethan Lee I'm glad I could help :) Best of luck with your internship
@MLSCaptain
@MLSCaptain 10 жыл бұрын
Amazing tutorial! This set of videos is exactly what I was looking for, for the level of coding I'm currently at. Thanks mate!
@derekbanas
@derekbanas 10 жыл бұрын
Art Pisanski Thank you very much :) It has been fun to make.
@danielb1194
@danielb1194 9 жыл бұрын
Hey my app was crashing because we used "getExtras()" instead of "getStringExtra()" on minute 15:01.. i was crashing when i cliked the button and it was a little frustrating. But this is a great video nevertheless and maybe its the version of android studio i'm using at the moment. That seemed to solve the problem i was having. Thanks for the great video derek!
@paweduszak5251
@paweduszak5251 9 жыл бұрын
is that a good practice, i mean the way of passing data among different activities? Let's say that I can call three other activities from main activity (they return some values to main activity), but how to manage 3 different activities in one event handler for activity result? Is "switch" (in some way) a good idea in this place? For me the perfect solution would be to write different event handlers for different activities, is that possible? Or maybe another solution. Btw thanks for the tutorials, I'm getting started to android environment but I'm not new to programming.
@bklife5086
@bklife5086 9 жыл бұрын
Okay so how would I send a numeric value to one activity (say like a final page to do calculations and such) then have the button actually direct to a different page to input another value?
@derekbanas
@derekbanas 9 жыл бұрын
+The_B&K_Life I cover that in parts 5, 8, 13 and 17 of this tutorial series
@gurcanyavuz2218
@gurcanyavuz2218 9 жыл бұрын
Are you selling anything about android tutorials or any donation site? I feel bad because you are really making great job and you spends lots of time on them. Thanks again. I loved it :)
@derekbanas
@derekbanas 9 жыл бұрын
Gurcan Yavuz Thank you for offering, but don't feel bad about donating. I don't use the KZbin donate thing because I make enough money. I'm just happy that I'm able to help people :)
@lewis6991
@lewis6991 10 жыл бұрын
Great tutorial! Is there a way to send user defined class objects between activities rather than just strings?
@derekbanas
@derekbanas 10 жыл бұрын
Thank you :) Yes you can pass objects between activities. In the next video I make I'll show how to do it. Sorry I didn't do that here.
@huupham9028
@huupham9028 7 жыл бұрын
Hey Derek your videos are wonderful, I am learning a lot so thank you! However I do have one suggestion/feedback. When you're teaching tutorials with so many folders/files and switching between them a lot, it would be super helpful to have a box in one of the corner showing the path to the current file that you are in! Other than that keep up the great work!
@derekbanas
@derekbanas 7 жыл бұрын
Thank you for the idea :)
@rodgetech
@rodgetech 10 жыл бұрын
Hi Derek, awesome tutorials as usual but what does it mean to inflate a view?
@derekbanas
@derekbanas 10 жыл бұрын
Luis Rodriguez Thank you :) Every widget and layout component is a view. To inflate a view means to place a widget or group of widgets into a view. Kind of like how you put html elements into a div element.
@goamediagoa4968
@goamediagoa4968 4 жыл бұрын
Hi, Is there a way i can create a app to update the content in the app, i want to crate a app were i can keep updating the youtube links to stream videos.
@ervincasiguran
@ervincasiguran 9 жыл бұрын
can i have multiple activity going back to the mainactivity? if yes, how do you get data that come from different activities? or is it rare for different activities to have data that will be sent to mainactivity?
@samcostley897
@samcostley897 10 жыл бұрын
Tutorial on Objective C in the near future?? Thanks for the great vids!
@tarekjihad
@tarekjihad 10 жыл бұрын
Hi Derek,,, walking through your tutorials is an interesting journey. regards
@derekbanas
@derekbanas 10 жыл бұрын
Tareq Jehad I have covered a bunch of different topics over the years. I hope to get back to my roots and cover things like electronics, games, etc. soon
@rodrigomonteiro9086
@rodrigomonteiro9086 7 жыл бұрын
Hello Derik! I've found your videos super helpful and all but to be honest, sometimes you can really confuse a begginer like me. For instance, a 20:20 you use data.getStringExtra() without even explainig why or how!
@RomanMedvid
@RomanMedvid 10 жыл бұрын
Have a small question: when you get text from an EditText widget, you wrap it with String.valueof(). Isn't it redundant? Thnx
@derekbanas
@derekbanas 10 жыл бұрын
Roman Medvid You have to do that because getText returns an object of type Editable
@kristerstihomirovs8625
@kristerstihomirovs8625 10 жыл бұрын
Hi Derek. Can u help me with my error? When i start the application on my virtual device at the first time it crash but all other times it doesn`t...But on real phone it crash all the time! Error-01-02 10:23:46.078: E/AndroidRuntime(1293): java.lang.RuntimeException: Unable to start activity ComponentInfo{...}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference.
@derekbanas
@derekbanas 10 жыл бұрын
Kristers Tihomirovs It is some sort of coding error. Try comparing your code to the code I provide in the description with diffnow.com
@kristerstihomirovs8625
@kristerstihomirovs8625 10 жыл бұрын
But it's one problem: i coding in eclipse it's a bit diferent code.
@kristerstihomirovs8625
@kristerstihomirovs8625 10 жыл бұрын
I did all what is in your video but converted to eclipse code i can send codes to your e-mail?
@derekbanas
@derekbanas 10 жыл бұрын
Kristers Tihomirovs The code should be the same whether you're using Eclipse or Android Studio. What code changed?
@andrewsommer2755
@andrewsommer2755 7 жыл бұрын
Really good video! What are benefits to using multiple activities as opposed to using one with multiple views which you set invisible or visible based on what screen you would like? I have found multiple activities work best for seamless integration with the back button, but I'm wondering if i missed out on anything else. Thanks!
@derekbanas
@derekbanas 7 жыл бұрын
Thank you :) Sorry, but aside from being able to switch activities with back I know of no other benefits
@brandonbraye4974
@brandonbraye4974 9 жыл бұрын
Hi Derek! I have a question. I'm trying to connect the layouts to the MainActivity, but I'm getting an error. Android Studio says it "cannot resolve symbol 'R'' in setContentView(R.layout.activity_main); Could this be an Android Studio bug, or is there an alternate way to connect the layout to the MainActivity? Thanks!
@jamesstephens8748
@jamesstephens8748 10 жыл бұрын
Hey Derek, So I didn't have any problems following the steps and getting this app to work but I do have a question. When you 'Go Get It' to switch to the second activity and ask for the users name and then return to the main activity it displays the name just fine... but if I go get it again and enter a second user name and return back to the main activity it has both usernames displayed... is there a simple way to rewrite the variable rather than append? Thanks, James
@derekbanas
@derekbanas 10 жыл бұрын
Hey James, Yes don't use append and that will go away, but you'll have to set the text including the original text.
@filipcecelja
@filipcecelja 9 жыл бұрын
Hi Derek, I have a little problem. The app works fine until I click the Enter button on the second_layout. After that it returns to activity_main but instead seeing my name typed in the TextView I get a word null. Looked up your code and checked with mine and everything seems to be alright...
@derekbanas
@derekbanas 9 жыл бұрын
+Filip Cecelja Try outputting to the console the changing values of name and try to track it down. Also try comparing all of your code to mine with a site like diffnow.com to help find the error.
@filipcecelja
@filipcecelja 9 жыл бұрын
+Derek Banas Thanks bro you are the best. Found the mistake. It was a small caps letter which should have been caps. Expect more questions from me :DD
@devilrules8
@devilrules8 8 жыл бұрын
Hey Derek is there video about how to use camera to take photo and use picture from your phone gallary i am having hard time to figure it out ? Many thanks Sharan
@2000rahulcool
@2000rahulcool 10 жыл бұрын
Thank you Mr. Derek for these wonderful tutorials, i have one question regarding this tutorial, in the onoptionsselected method, we didnt specify which dialog to open up when the settings is clicked, but how did it open the dialog from the class we created?
@2000rahulcool
@2000rahulcool 10 жыл бұрын
ooops sorry, this was regardin the previous tutorial
@jrvvortek4448
@jrvvortek4448 9 жыл бұрын
Derek. i am using a recently installed AS (assuming that means up to date), How come in your tutorials it autofills? when you it autofills parameters, mine only adds a closing tag. When you type in android:id="@+id=user_name_edit_text" you have options but those options do not appear in my version. and very rarely does AS offer suggestions when i am typing in keywords
@derekbanas
@derekbanas 9 жыл бұрын
Jr VVortek Make sure power save mode in File is disabled. In preferences Editor -> Code Completion - check Autopopup code completion. File > Invalidate Caches / Restart
@metalwood7225
@metalwood7225 6 жыл бұрын
Do you have any videos on storing user data?
@derekbanas
@derekbanas 6 жыл бұрын
I cover 3 ways to save data here kzbin.info/www/bejne/Z3Wyln-vZ5ubhac and SQLite here kzbin.info/www/bejne/jX3SqpKor5Zlia8
@metalwood7225
@metalwood7225 6 жыл бұрын
+Derek Banas thx Derek, appreciate it....keep up the good work !
@IslarfPokemon
@IslarfPokemon 7 жыл бұрын
Curious about your decision to make the returning result ID "1" instead of "0"
@jitenderrawat3658
@jitenderrawat3658 7 жыл бұрын
Hey Derek, how are you doing? It's fun learning android through your tutorials.Can you please share which tools do you use to make your videos? That zoom in zoom out feature helps to focus. I would like to make videos like yours. Thanks
@derekbanas
@derekbanas 7 жыл бұрын
Thank you :) I'm glad you like them. I show everything I do to make videos in this video kzbin.info/www/bejne/bYTdoqtopLGCb8k
@mattm7798
@mattm7798 10 жыл бұрын
Quick question. When you send the value of the user's name from SecondScreen back to MainActivity, you created an intent(told it to do something or go somewhere) but didn't tell the intent which class to go to(in this case MainActivity.java). How did the intent know where to go? Do intents default to the main java class when non is provided?
@derekbanas
@derekbanas 10 жыл бұрын
setResult() returns to the parent that called for this screen to open. Sorry for not saying that
@Trihawk7
@Trihawk7 10 жыл бұрын
Does android studio use a specific programming language like python or does it just use its own language? Great video a well
@derekbanas
@derekbanas 10 жыл бұрын
Thank you :) Yes Android Studio uses Java
@euklidian-space
@euklidian-space 9 жыл бұрын
Derek Banas is there a reason why we have android:text="@string/calling_activity_message" at the end of second_layout.xml? cause with that i get calling_activity_message to the right of the enter button instead of the calling activity was
@euklidian-space
@euklidian-space 9 жыл бұрын
Gabriel Grover Never mind I figured it out. Went into strings.xml and saw the issue
@saray1022
@saray1022 10 жыл бұрын
Hi Derek, I have no prior programming experience. I just learned Java for the past few months and I understand the very basic, but for this video I am not following as well as the former videos. You have mentioned in some of these comments that we should just keep going and all of these will come together. Which ones of your java tutorials do you suggest us "newbie" to go over since you mentioned that we only need basic java? Please let me know. Thank you for these amazing videos again!
@derekbanas
@derekbanas 10 жыл бұрын
Sara Y You're very welcome :) You need to know everything covered in parts 1 through 18 minus parts 8 and 10.
@saray1022
@saray1022 10 жыл бұрын
Thank you for your reply, Derek!
@joash8098
@joash8098 6 жыл бұрын
Which android studio version you are using???????
@gaiifafa1306
@gaiifafa1306 10 жыл бұрын
Wow, I'm learning so much, thank you so much. So when is it more appropriate to implement the onClickListener instead of doing it in the XML file? I'm more familiar with implementing the onClickListener interface but this method seems much better and easier.
@derekbanas
@derekbanas 10 жыл бұрын
I almost always implement it in the layout file. It is just easier. I'm glad you like the videos. I'll try to upload another tomorrow if possible.
@Bruce99Lee
@Bruce99Lee 10 жыл бұрын
Whats the difference between using fragments and activity screens? When is it best to use either one?
@derekbanas
@derekbanas 10 жыл бұрын
zaft1g337 Fragments are like panels that lie on top of the activity. Anytime it would be beneficial to change the look of the interface without leaving th activity all together is a good time for fragments.
@jojoray
@jojoray 7 жыл бұрын
BTW, when does part 28 come out? or will you not do one?
@derekbanas
@derekbanas 7 жыл бұрын
I'm making a new cross platform mobile tutorial soon
@jojoray
@jojoray 7 жыл бұрын
Ok thanks :)
@SteeveHuang
@SteeveHuang 9 жыл бұрын
Nice tutorial, I learned a lot! I have some problems though. I was wondering what's the difference between startActivity() and startActivityForResult(), and what's the purpose of the final int result variable? Do they have anything to do with the setResult() method in the Second_screen.java?
@RKMFX
@RKMFX 8 жыл бұрын
Very helpful thanks Derek
@derekbanas
@derekbanas 8 жыл бұрын
Your welcome :)
@sukhjinder619
@sukhjinder619 10 жыл бұрын
Another awesome tutorial!! BTW can you do a tutorial like how to save stuff on the phone? Like similar to a note app or something or just a database tutorial?
@derekbanas
@derekbanas 10 жыл бұрын
Thank you :) Yes I'll cover that. I already have an SQLite tutorial here SQLite3 Tutorial
@pault4994
@pault4994 9 жыл бұрын
Great tutorial as ever, really covering some useful ground. Each of these I find I made a mistake and I figure it out until it works - which is best way to learn I guess. I got an error in logcat for this app about missing PendingIntent - this turn out that the activity class should extend AppCompatActivity rather than Activity (this super class is depreciated?? as of SDK ver?? ) and a PendingIntent is something to do with calling other apps. Also learn lesson of choosing meaningful/non-confusing labels for ids/variables!! Got the wrong one in MainActivity and trying to access the TextView of the (closed) second screen caused a java null pointer. Anyway I have it working now. Also on an EditText inputType="textCapWords" works where as textPersonName doesn't! I'm quite looking forward to the tutorials on test code and debugging (!)
@FSHnegativ
@FSHnegativ 10 жыл бұрын
Hi Derek! I have a problem with adding "onGetNameClick" to the Mainactivity.java because it does not work for me to simply use the lightbulb there is no option to add it to the .java: Pleas help me! :o
@derekbanas
@derekbanas 10 жыл бұрын
FSHnegativ Some times that happens. You can go in and type out the whole method.
@FSHnegativ
@FSHnegativ 10 жыл бұрын
Yeah did that now but it is still annoying that I can't use it.. Still thanks for your videos and for responding me keep up the good work!:)
@SpamDestroyer
@SpamDestroyer 8 жыл бұрын
One thing not mentioned here is the onBackPressed() override method that will allow for the user to return to the first screen using the back button without the application crashing (so long as a result is given. cancelled or otherwise).
@eamonscullion7847
@eamonscullion7847 10 жыл бұрын
Hi Derek, I am currently designing a relatively big android app, and I plan to use the usual android components such as action bars, navigation drawers, fragments etc. I spoke to a friend about my app and he recommended I should focus on Android L and the Material theme as this seems to be the new standard for android apps. Currently there is some support for L on the android developer site, and there is even a version of Android Studio to test L apps on (though still in beta and may be buggy). What would you recommend? And as always, love the tutorials, you're a great help!
@derekbanas
@derekbanas 10 жыл бұрын
Thank you :) I'm a big believer in staying with what works. Android L is not near being ready for prime time yet and may go through numerous changes. Your app needs to backwards compatible as well with previous versions of Android and that won't be possible at the current date, or for some time. Just my opinion.
@2eamon2
@2eamon2 10 жыл бұрын
Derek Banas Couldn't have said it better myself, much appreciated!
@gabrielbrito6761
@gabrielbrito6761 8 жыл бұрын
Hey Derek nice tutorial as always :) Just one question man, I have one list view with 30 items and each one of these item goes to a different class. I tried to create a switch() inside the onItemClick method, but I don't know if there's a way to update the Intent to change activities, can you help me? thanks man
@roopak973
@roopak973 8 жыл бұрын
nice work...5 done 22 to go thanx man!!!
@derekbanas
@derekbanas 8 жыл бұрын
You're very welcome :) Thank you
@ivopalchev
@ivopalchev 10 жыл бұрын
Hi derek, could you make a tut or explain how to export app from android studio and how to post them on the android market.
@derekbanas
@derekbanas 10 жыл бұрын
Yes I'll cover that as soon as possible
@viditkhanna3721
@viditkhanna3721 7 жыл бұрын
Awesome tutorial as always but please answer my question what if we want to permanently change the textview of 1st activity after returning from 2nd activity please reply i am new to android development.
@derekbanas
@derekbanas 7 жыл бұрын
Thank you :) As the tutorial continues you'll see ways to save data inside of the apps
@viditkhanna3721
@viditkhanna3721 7 жыл бұрын
Derek Banas in this tutorial, when we close the app and reopen it does the textview of mainactivity will again say the user was derek?
@michaelvilleneuve1470
@michaelvilleneuve1470 10 жыл бұрын
Thank you very much, you and your tutorials are awesome !
@derekbanas
@derekbanas 10 жыл бұрын
Villeneuve Michaël You're very welcome :) Thank you
@samlak23
@samlak23 10 жыл бұрын
Hey Derek, after updating to lollipop, I can't run apps on my device. I'm using a Nexus 5 and have installed the newest SDK in the SDK manager. Any idea what's wrong?
@derekbanas
@derekbanas 10 жыл бұрын
***** Sorry, but I don't have a device running Lollipop yet. I know L is buggy with the emulator.
@lemmy7926
@lemmy7926 10 жыл бұрын
+Samir Lakhani Not sure if you mean any app at all (like in the market) or the ones made by Derek. But try taking a look at my comment in tutorial 2.
@ralfiii
@ralfiii 7 жыл бұрын
And one more thing: If activities like to share some common data (like settings holding a username/password or a block of data like an mp3 file all screens want to work on) - what's the "good practice" to implement that? Passing the data around can't be the solution, right?
@mehmetfatihcicek2907
@mehmetfatihcicek2907 10 жыл бұрын
How does this play list differ from your other android tutorial series (the one with 42 videos)? Which one should I stick to (as someone with good experience in Java)?
@derekbanas
@derekbanas 10 жыл бұрын
The first tutorial was focused on teaching while making one app after another. This one will teach each topic in condensed tutorials. This one will cover everything because I'm not forced into trying to make an app in each video. It depends on how you like to learn. They are both free :)
@mehmetfatihcicek2907
@mehmetfatihcicek2907 10 жыл бұрын
If I ask more straightforward, which one would you recommend in my case? :-)
@derekbanas
@derekbanas 10 жыл бұрын
Mehmet Fatih Cicek I guess this one since it is more up to date, but you'll have to wait for me to make the videos
@mehmetfatihcicek2907
@mehmetfatihcicek2907 10 жыл бұрын
Derek Banas I'll wait with patience, thanks in advance :-) How many videos do you plan to do for this tutorial?
@derekbanas
@derekbanas 10 жыл бұрын
Mehmet Fatih Cicek I have really no idea. I could see it easily being 60 videos plus in length. I plan on covering everything.
@ralfiii
@ralfiii 7 жыл бұрын
I created an app from the "Basic activity" template of Android studio. Then I followed the instructions in this video. Everything works as expected except for one thing: The main form has a "title bar" showing the app-name and also a "settings" button. The 2nd activity screen also shows this look in the preview of android studio, but it does not when I run the app. Any hints for me?
@sifiso5055
@sifiso5055 7 жыл бұрын
Hey Banas, thanks for your tutorials.
@derekbanas
@derekbanas 7 жыл бұрын
You're very welcome :)
@tomdelano7263
@tomdelano7263 10 жыл бұрын
Hello Derek, Can an activity open itself if you declare it in the android manifest and in the intent filter as intent.action.Main and intent.category.Launcher or does every activity have to have an intention in MainActivity.java. I want to have an image button with an intent in MainActivity that opens a separate activity and this image button is already defined in activtity_main. I don't want the layout to change or a for a new one to get created. I just want the activity to be carried out. The error I get is something like, "could not find explicit class .MySecondClass". If not a second activity class file like I have, should I just create a fragment instead? What would be the code for an Image Button that launches a new activity without creating a new layout or altering the current one?
@derekbanas
@derekbanas 10 жыл бұрын
Asim Khan Yes use fragments and update them when the button is clicked.
@shobankalia1225
@shobankalia1225 9 жыл бұрын
+Derek banas Sir, Thxx for the tutorials..!! But is their is any way that my app starts from the activity in which user entername press OK..!! then return to Main Activity..!! If Possible How..?? & If not Any alternative for that..!!
@derekbanas
@derekbanas 9 жыл бұрын
+Shoban Kalia You're very welcome :) I show how to make a splash screen in this video kzbin.info/www/bejne/bnKnk2iYg7R5fqc
@jasmeanxo
@jasmeanxo 10 жыл бұрын
Hi, Derek. I'm developing a guessing quiz game but I don't know how to save the changes made before closing the game. For example, the player guessed 5 correct answers, if he/she close the app then open it again, her 5 correct answers will be gone. Right now, my app will only say "correct" or "wrong" based on the value of the edittext/answer. I want save the correct answers so that the player can close then continue the game whenever she/he want. What I want to do is display a trivia for every correct answers and even if the player close the app, when he/she open it, her/his trivias from the correct answers are still there. My app really is just a "classsic" logo quiz. You'll chose categories, chose level then you'll chose what to guess from the thumbnails of pictures. I am just a beginner in Android apps. Can you help me please? Thank you!
@nexustkfreetoplay5318
@nexustkfreetoplay5318 8 жыл бұрын
Hey, when making an android app, how do you setup login info / save data base type stuff. So what the players do actually saves in the game. example: I setup an account (or login to google/ect) and make my character, i customize him, get levels, ect, how is all of that information stored? Do I need a server? What all do I need and how do you code for a multiplayer game to work... not just a single player interaction like a calculator.. :p
@hemanthkumartirupati
@hemanthkumartirupati 10 жыл бұрын
Hi Derek, while going from main activity to second screen you have used some arguments(like (this, secondscreen.class)) in intent whereas you haven't used while going back from second activity to main can you explain me the reason Thank you
@derekbanas
@derekbanas 10 жыл бұрын
hemanth kumar tirupati Hi, I called the second activity with startActivityForResult() from ActivityMain and then called finish() from inside the second screen which closes that Activity. After it closes it sends back the data and displays ActivityMain.
@sanderclemetsen2112
@sanderclemetsen2112 9 жыл бұрын
Derek, do Android Studio work with jdk 1.8?
@derekbanas
@derekbanas 9 жыл бұрын
+sander clemetsen Yes use 8
@VictorSanchezSS
@VictorSanchezSS 9 жыл бұрын
Instead of waiting an result from the second screen, can i send something to the main screen the same way you did to the second one?
@derekbanas
@derekbanas 9 жыл бұрын
+Victor Sanchez Sure you can send a result from the 2nd screen
@metalwood7225
@metalwood7225 6 жыл бұрын
might need some time to digest all that....but very nicely explained Pro!
@derekbanas
@derekbanas 6 жыл бұрын
Thank you :) It is a lot to learn
@bobb.7869
@bobb.7869 9 жыл бұрын
Hello, Derek. First off, awesome tutorials. I am getting so much more out of how you explain things than I have from others. I am apparently missing something as I have not yet (after many trys) been able to get this app to function. As soon as I click the button, from the main activity, the screen goes white and nothing ever displays for me to enter my name. I have tried the suggestions below such as using getStringExtra() instead of getExtra() but continue to receive the same result. I am using a min/target of 15/23 and have Android Studio 1.5, so I'm not sure how that factors in. If anyone has any suggestions, they would be much appreciated.
@derekbanas
@derekbanas 9 жыл бұрын
+Bob B. Thank you :) Are you getting errors in your LogCat panel in Android Studio? Look specifically for errors in your class names and post them here.
@Somebodythatiusetoknow1
@Somebodythatiusetoknow1 10 жыл бұрын
Hey, queston on the SecondScreen.java part. At the very beginning I select and right click Activity, Generate, the only things available are Constructor, Getter, Setter, Getter and Setter, equals() and hashCode (), toString(), and Copyright. Any thoughts on where I could Override Methods? Thank you!!
@Somebodythatiusetoknow1
@Somebodythatiusetoknow1 10 жыл бұрын
Never mind I was shockingly able to figure it out. Overlooked the import. Thanks for the tutorials though! Great job!
@derekbanas
@derekbanas 10 жыл бұрын
Michael Gushulak Great I'm glad you figured it out. I'm very happy you like the videos. You're very welcome :)
@ddouglascox7362
@ddouglascox7362 10 жыл бұрын
Hi Derek your the best, Question: --- Your button shows up under --- Enter Your Name --- mine shows up on the right and most of it is off the screen and the calling_activity_message does not show up at all --- Again I'm wondering is this because I am using a newer version of Android Studio IE 0.8.6 I checked my code line by line it is exactly the same also I'm not sure which Activity template you used I used blank activity again was that right? Also I used minSDKlevel 15 would that make a difference?
@derekbanas
@derekbanas 10 жыл бұрын
D Douglas Cox Thank you :) The version of AS, the SDK and the activity type are correct. Could it be something like your emulator is set to a lower resolution? Sorry, but I'm not sure
@VincentNicopolsky
@VincentNicopolsky 10 жыл бұрын
Nice tutorial ! Everything is clearly explain ! :) But at the end of this tutorial you should make some refactoring code to simplify some parts and not to redeclare some variables. But it's nice ! :-D
@derekbanas
@derekbanas 10 жыл бұрын
Thank you :) Yes when I actually start making apps I plan on making sequence diagrams and I'll talk about refactoring.
@moyvalu6643
@moyvalu6643 10 жыл бұрын
Hi Derek nice job with this videotutorials thank you so much, one more thing what does android:label="Get Name" android:theme="@style/AppTheme" stands for in the manifest?? I will appreciate you help!!
@derekbanas
@derekbanas 10 жыл бұрын
moises alfonso valdes lugo Thank you :) label is the title for the activity and theme defines the theme to use
@jameskizzy2055
@jameskizzy2055 10 жыл бұрын
Hi Derek, thanks alot for giving teenagers like me hope, I want to create a social app Like KIK, Watsapp etc.. and i am having a lot of problem doing so,Can your lessons be of help? Or what do you think I should do?
@derekbanas
@derekbanas 10 жыл бұрын
You're very welcome :) I'm glad you like them. I'll cover how to make a messenger service app. I will start making apps with the next video. I'll make it 100% live in the video so everyone can see exactly what i do.
@alanb287
@alanb287 7 жыл бұрын
Thank you for this great video! You got me past a sticking point!
@derekbanas
@derekbanas 7 жыл бұрын
Thank you :) I'm glad i could help
@nathanheath3756
@nathanheath3756 9 жыл бұрын
what if its a menu with different options and you want to make each of the options do something different then what would you do??
@MrHomeu98
@MrHomeu98 10 жыл бұрын
when i made my imageButton, for some reason, even tho i edited the image using transparent background in photoshop and save it as PNG, there's still white at the background. How can i fix this?
@derekbanas
@derekbanas 10 жыл бұрын
I'll do my best to cover that in the next videos.
@parthchamp9252
@parthchamp9252 7 жыл бұрын
hello sir. recently i have been working on an android app in which the Main activity has 5 buttons all of them would direct to new activities. Now the problem i m facing is that when i click say 2nd button then the 5th activity opens then on pressing back button 4th activity opens then 3rd and then 2nd activity.i could not figure out the problem.please help
@mrousavy
@mrousavy 9 жыл бұрын
Hey, I'm new to android development, what is an instance? Also, I watched alot of tutorials and I still dont get how to make multiple activities and switch between them with a button without passing data... Thx
@derekbanas
@derekbanas 9 жыл бұрын
+Marc Rousavy An instance is a generic term used for all objects. If we have a class of type dog and define and object named rover, then rover would be an instance of the type Dog. It is jargon. In parts 8, 13 and 17 I show many ways to switch between activities.
@mrousavy
@mrousavy 9 жыл бұрын
Derek Banas Thank you very much!
@osamansr5281
@osamansr5281 9 жыл бұрын
2 Qs ,,, (1) is there any other ways to communicate between activities ? in this method we started an activity throw a button click then we closed it after we r finished with it! is there other method to establish communication between open activities ? . . . (2) Y when going back to the MainActivity the constructor of Intent was empty (No prameters like this "new Intent()") ,, Y not like when we started the connection "new Intent (Context , Class)" ??
@derekbanas
@derekbanas 9 жыл бұрын
+Osama Nsr Any even can trigger another activity to open. I cover more as the tutorial continues. I used startActivityForResult() to open the other activity which is used when you plan on getting a result. I have the code here with comments to explain it www.newthinktank.com/2014/06/make-android-apps-5/
@osamansr5281
@osamansr5281 9 жыл бұрын
(1) i'll continue with the tutorials :D ,, if i still don't get it i'll come back and ask again x'D . . . (2) i read the code and understood it's okay if i'm going back to MainActivity to let the Intent constructor empty ( but no harm from filling it like the way we went to SecondActivity )
@rezoanhasib8394
@rezoanhasib8394 8 жыл бұрын
Hello Derek! Kudos for your amazing work, I am getting helped a lot! For some reason it's printing "The user's name was null" once it comes back from the second screen. Any clue? Thanks!
@projectpetrol3139
@projectpetrol3139 7 жыл бұрын
Hey Derek i'm just a newbie when i say newbie the real newbei :D can you help me making the send and share from the navigation bar work?? Please help me, though i'm kinda shy asking these question
@shufange5797
@shufange5797 10 жыл бұрын
Well, the problem is that whenever you switched to the second screen and pass back and append the name you enter in 2nd screen to main activity, you did the second time, and there will be 2 names result appended on the first screen. I tried set the text back to "The users name was" when clicking on the Button"Go Get It", is there any other solution?
@derekbanas
@derekbanas 10 жыл бұрын
Shufan Ge Sorry, but I didn't get that error
@adrianalvaradofernandez2666
@adrianalvaradofernandez2666 8 жыл бұрын
thanks Derek amazig tutorial, salutes from Mexico!
@derekbanas
@derekbanas 8 жыл бұрын
+Adrian Alvarado Fernandez Thank you :)
@leeeroybiscuit
@leeeroybiscuit 10 жыл бұрын
when i type in setContentView(R.layout.second_layout); i get an error cannot resolve symbol 'R'. would this be down to the api level i am using?
@derekbanas
@derekbanas 10 жыл бұрын
leeeroybiscuit Delete any import Rs you have in your class files and then Build->Clean Project
@leeeroybiscuit
@leeeroybiscuit 10 жыл бұрын
yeah thanks for quick response, i did just what you said and fixed it, thanks very much
@derekbanas
@derekbanas 10 жыл бұрын
leeeroybiscuit Great I'm glad I could help :)
@orientleon
@orientleon 9 жыл бұрын
Derek Banas this is a problem that bothers me for the whole hours, although there are different methods on the web.... you are awesome, man.
@valentine1925
@valentine1925 10 жыл бұрын
Hi Derek, on my second screen the title bar doesnt show up. How to solve that one? TIA
@valentine1925
@valentine1925 10 жыл бұрын
solved it!. I change my import android.app.Activity; to import android.support.v7.app.ActionBarActivity; and changed the extends Activity to ActionBarActivity. tnx btw
@derekbanas
@derekbanas 10 жыл бұрын
Aoi Valdez Great! Thank you for posting your fix :)
@valentine1925
@valentine1925 10 жыл бұрын
I havent check your entire tutorials yet, but do you have a tutorial for hamburger menu something like facebook when you tap on the menu it will slide a menulist on the side?
@kakakhan_vlogs6734
@kakakhan_vlogs6734 7 жыл бұрын
helo sir i wana ask that how to make andriod app which disply name or some thing on the screen
@derekbanas
@derekbanas 7 жыл бұрын
I cover splash screens here kzbin.info/www/bejne/bnKnk2iYg7R5fqc
@kakakhan_vlogs6734
@kakakhan_vlogs6734 7 жыл бұрын
+Derek Banas oki tnkd
@angelinajolie3921
@angelinajolie3921 10 жыл бұрын
Hi Derek ! Suggestion: The Php in 30 Minutes And The Custom Web Service Tutorials Back-To-Back.Thanks In Advance !
@peterpetrica5879
@peterpetrica5879 7 жыл бұрын
Hey, I have a problem going back from the second activity to the first, when clicking the button on the second screen the app just crashes for some reason. Does anyone know what could be the reason for that?
@LespritTower
@LespritTower 10 жыл бұрын
I'm getting an error on this one where the username comes back as "null". I've checked the code and can't see any discrepancies. What could be wrong?
@derekbanas
@derekbanas 10 жыл бұрын
LespritTower In MainActivity this is the line in which I'm getting that String nameSentBack = data.getStringExtra("UsersName");- See more at: www.newthinktank.com/2014/06/make-android-apps-5/#sthash.0XAeEhqi.dpuf
@LespritTower
@LespritTower 10 жыл бұрын
Derek Banas Thanks Derek. I had 'n' instead of 'N' *embarassed* :\ Working now :)
@conan_der_barbar
@conan_der_barbar 10 жыл бұрын
Nice Tutorial! i have one question though: when you send the callingActivity to the SecondScreen, to get and use it you have to do String previousActivity = activityThatCalled.getExtras().getString("callingActivity"); but when returning the name to the MainActivity you only use String nameSentBack = data.getStringExtra("UsersName"); which looks way simpler could you explain this to me please? :)
@derekbanas
@derekbanas 10 жыл бұрын
Timon That is because we called the second activity with startActivityForResult(), which expects a returned value. onActivityResult() is then called after the second activity ends. I hope that helps :)
@conan_der_barbar
@conan_der_barbar 10 жыл бұрын
thank you! yes it does :)
@Zoltan_Molnar
@Zoltan_Molnar 8 жыл бұрын
If i install the app on my tablet, the second screen has no actionbar, but in the Android Studio shows it in the "design". How can i fix it?
@iapetus28
@iapetus28 10 жыл бұрын
I got this error message when trying to send from the secondScreen : java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, req... and so on. Random suggestions : setting flags? onactivityresult firing prematurely? Any ideas?
@derekbanas
@derekbanas 10 жыл бұрын
Compare your code to the code I link to in the description. Diffnow.com makes it easy
@iapetus28
@iapetus28 10 жыл бұрын
Derek Banas Thank you for your quick response! Mixed up IDs, so I was trying to find a view from another activity. No compiler error, but it caused a runtime error ;)
@alhira3024
@alhira3024 9 жыл бұрын
Good Tutorial liked it . keep it up :)
@derekbanas
@derekbanas 9 жыл бұрын
+Al Hira Thank you very much :)
@nilmur
@nilmur 10 жыл бұрын
Would you be able to export your code in a package? Thanks very much for the tutorials. :D
@tyquanthebeast
@tyquanthebeast 9 жыл бұрын
Can you do a video on passing data from one Activity layout where name or code is entered. And go to next to open in "WebView" or a Website like personal site. Hope you get what i'm saying..
@nicsupir
@nicsupir 8 жыл бұрын
Derek why is my display null instead of the name i entered
@mozus1713
@mozus1713 8 жыл бұрын
Check your strings in data.getStringExtra. UsersName != usersName.
How to Make Android Apps 6  : Fix Android Studio Errors
10:15
Derek Banas
Рет қаралды 79 М.
INTENTS AND STARTING ACTIVITIES - Android Fundamentals
16:11
Philipp Lackner
Рет қаралды 71 М.
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
How to Make Android Apps 7 : Android Spinners and Layouts
21:05
Derek Banas
Рет қаралды 75 М.
How to Make Android Apps 9 Android Themes and Styles
18:36
Derek Banas
Рет қаралды 117 М.
How to Make Android Apps 10 Android Fragments
11:17
Derek Banas
Рет қаралды 104 М.
Pass Data between Activities using intent | Android Studio | Java
13:19
Android Studio Tutorial
21:58
Derek Banas
Рет қаралды 839 М.
DEEPSEEK Vs CHATGPT There Is A  Clear Winner !!
15:53
Rick Aqua
Рет қаралды 1 М.
How to Make Android Apps 11 Multipane Fragment Example
10:49
Derek Banas
Рет қаралды 74 М.
How to Make Android Apps 12 Multiple Fragment Layouts
19:41
Derek Banas
Рет қаралды 80 М.
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН