How to Use the Debugger in Android Studio / IntelliJ IDEA

In this video we will learn how to use the Android Studio (IntelliJ IDEA) debugger to find logical bugs in our code.
With the debugger we can set breakpoints, step through our code line by line, examine and change variables at runtime, inspect frames and threads, evaluate expressions and code fragments and much more.

We will learn how to use the “step over”, “step into”, “step out”, “run to cursor”, “smart step into”, “force step over”, “force step into” and “force run to cursor” buttons, how to add watches and use “set value” to change variables at runtime, how to set conditions on breakpoints, create expection breakpoints and disable breakpoints temporarily, how to observe the debugging overhead, how to resume the app, how to attach the debugger to a running process and more.

Disclosure: The links marked with ➣ are affiliate links. This means I get a small compensation if you buy anything there or register for their services. This does NOT lead to any additional costs for you, but it’s a good way to support my channel 🙂

How to debug in Android studio

How to Request a Run Time Permission – Android Studio Tutorial

In this video we will learn, how to request a dangerous READ_EXTERNAL_STORAGE permission at run time, which is necessary since Android 6.0 (Marshmallow), whereas before this permission would be granted at the installation process. For this we will use the checkSelfPermission and requestPermissions methods and show a rationale to the user at the appropriate time with the shouldShowRequestPermissionRationale method.

Disclosure: The links marked with ➣ are affiliate links. This means I get a small compensation if you buy anything there or register for their services. This does NOT lead to any additional costs for you, but it’s a good way to support my channel 🙂

I Adopted Rich People’s Habits, See How My Life Changed

Learn the secrets of success from those who built their own empires from scratch. You can try adopting the habits of super rich people and see how it will help you save money.
Successful people are rarely night owls; they go to bed and wake up quite early. So this was the first habit I decided to take on. By the end of the first week, I noticed that I was able to do way more before noon than I could ever do during the whole day. One more week into the experiment I started waking up completely well-rested and excited to start a new day. Self-made successes swear by exercising every day for at least 30 minutes. After just 10 days, it already became a habit. I became more concentrated and calmer.
If meditating helps successful people stay on top of their game, it should help me out too. Networking is like currency for successful people.
A lot of successful people (like Steve Jobs, for instance) keep a super minimalistic approach to fashion, often wearing the same outfit every day. Truly smart and successful people control their expenses and don’t spend their money on useless things.

TIMESTAMPS
Go to bed and wake up quite early 0:34
Exercise every day for at least 30 minutes 1:51
Meditate 3:01
Set goals and achieve them 3:57
Meet new people as much as you can 4:44
Read more useful books 5:34
Wear simple clothes 6:24
Be thrifty 7:10
Conclusion 8:08

SUMMARY
-With will power of steel, I decided to wake up at the same time every day and come to work an hour early. It took me 3 days to get the schedule right.
-The hardest part here wasn’t even the gym itself, it was exercising after working all day. After just 10 days, it already became a habit. I started sleeping better and waking up easier.
-Meditation turned out to be a really good way to get my head straight and renew my energy.
-Even though I didn’t manage to tackle all my tasks, I was able to do more things in the first week than I did during the entire previous month.
-I learned to find common ground with people from the get-go, met a lot of extraordinary individuals, and made some really good friends.
-I carried a book with me at all times and read it on the way to work and back home or during lunch. As a result, by the end of the first month, I had finished my fourth book.
-I no longer had to waste time every day choosing my outfit, deciding whether or not it matched or if it was trendy and whatnot.
-I started out by making a list of everything that I bought every day so that I could see what I spent my money on. This system helped me save 40% of my salary in the first month and almost 60% in the second.
-New habits really did completely change my life for the better.

In part 5 of the ConstraintLayout tutorial, we will learn how to use Placeholders to create templates and animate views.
We can replace the placeholder with any view we want, either by calling setContentId in Java or by setting the app:content attribute in xml.
When we replace the view dynamically, we can also very easily animate the transition with the TransitionManager.beginDelayedTransition method, where we pass the ConstraintsLayout itself as a parameter.
We can also build whole templates for portrait and landscape mode by putting the placeholders into a separate merge layout file, and then use them in another layout with the include tag.

Disclosure: The links marked with ➣ are affiliate links. This means I get a small compensation if you buy anything there or register for their services. This does NOT lead to any additional costs for you, but it’s a good way to support my channel 🙂