Confused with MainActivity.java in android studio - android

I'm fairly new to java and android studio in general,and I'm trying to follow a tutorial on YouTube on how to make a simple android calculator by Andy York. I made it to part 2 of 2 until he started coding in MainActivity.java, when I noticed that ours were different and that I have stuff like "FloatingActionButton"and "SetSupportActionBar" which he doesn't have and which is confusing because if erase those then everything will mess up. I think it may have been because of an Android Studio update since his video? I'm trying to make everything neat like his but I don't know how. I hope this makes sense and any help would be appreciated. Thanks.

When creating new project in Android Studio use "Empty Activity" template instead of "Basic Activity". The "basic" one does add a lot of things, like a floating action button, which often isn't helpful.

Those are coming because you select a that theme. So, Select the Empty Activity. Then nothing will make problem .

Related

Starting New Project in Android Studio

I'm new to android studio. I've imported source codes of some apps to android studio to learn. and then I started to practice by creating a new project. when new project created It doesn't show the default main activity and xml instead It showed many existing activities and xml of the existing project. I've tried to create new project a few times but it's still the same. thought that I might make some mistakes somewhere. I don't know. Please kindly help. thank beforehand !
To create a simple app on Android Studio what you have to do is to choose the Empty Activity.
Then you add the name to your app, choose the location, choose the language to program (Java/Kotlin), the minimum SDK (use the recommended one to start) and hit Finish. It should create one simple activity with one layout which shows a TextView with Hello World! as a text.
Could you provide some screenshots? It would make it easier to help you :)
For the moment, I would suggest that you make sure that you're selecting "blank activity" when you create it. Also check that you've stored your downloaded source code properly.
Android Studio remembers last opened project. The next time you start Android Studio, it will open last opened project.
You can choose menu File -> Close Project. Then it goes back to open/new screen which allows you to create your own project.
ah it was a silly mistake guys. I confused to click on basic activity instead of empty activity. thank you guys so much !

How to upgrade an UI from an existing UI with for example flutter?

I just finished my first Android Studio App with Kotlin. The Design/UI of the App is pretty lame, but works fine. Now I want to "upgrade" my UI with replacing/adding new Components that look better. I started reading about Flutter, but I only see tutorials where they start a complete new app from scratch. Since I got a working app, how can I simply only use the "design"-Options of flutter and let my source code be?
Im pretty new in this field, but got some C#-Experience but never did an App and since this is my diploma thesis, I just want to use all my resources so the App also looks professional in terms of UI-Design etc.
You can add flutter to existing android or ios app you can read here more.
how can I simply only use the "design"-Options of flutter and let my source code be?
Vanilla Android uses XML, however as you are likely aware thats not how it works in flutter. Since the system is completely different, I wouldn't expect you can just "change look" without re-designing it entirely with flutter.
If wanted to use flutter, I would assume you would need to add it incrementally (as mentioned in Gizmo1337's answer).
However if all you want is to update how your app looks, theres nothing stopping you from changing your existing XML style. I'd say it's probably pretty overkill to change to flutter if all you want is a new look.

How to show error/warning marks in Android Studio scroll bar (like Eclipse)?

I apologize in advance if it is a duplicate topic, but I did not find a direct answer in any other.
Android Studio does not display marks (on the scroll bar) by referencing error/warning/occurences in the code. Is there any way to make it show?
I have not used Android Studio for a long time and I get lost because in Eclipse this is a basic functionality. So in files with many lines of code it becomes complicated to see the locations of the code where there are errors or occurrences.
In Android Studio it looks like this:
In Eclipse like this:
Is it possible to make Android Studio behave similarly to Eclipse? If not, is there any friendlier way to see the error/warnings/occurrences marks?
Thanks for any help.
Please check the highlighting level. Inspections should be selected...
No highlighting
highlighting now activated

Android Studio is not accepting new project

I want to start learning Android programming and recently downloaded the Android Studio. Now if I want to start a new project, I can't get past this initial screen. Whenever I click next, the window just jerks, which I guess is indicating that I am doing something wrong. So how can I solve this problem?
Note: I am a total beginner but I am genuinely trying to learn and searching the web for the problem didn't give me any solution.
I guess something is wrong with your Android Studio / JDK installation. In the status bar on the bottom, I can see a NullPointerException. I think this is the cause. Try to open the Android Studio Log and hopefully the error is better explained there.
How to find Android Studio Log
Maybe you have unknown characters in your package name like "ı,ö,ü" ? And you may want to watch a android starter tutorial video which has a part about starting a project to see if you are doing something wrong?
If it couldn't be a good answer sorry for it but that's all i can offer :3

Android graphical login/passcode

Several of my customers asked me to implement graphical password checker like
Any ideas how to implement this kind of UI?
Try to see this: https://code.google.com/p/android-lockpattern/. Guys extracted the appropriate code from android sources and made it easy-to-use in an app.
Well the android source code is a start. Also have a look at LockPatternKeyguardView.java

Categories

Resources