Showing posts from January, 2019
The coolest programming algorithms for beginners, explained humanly (Part 1)

The main definition is “to contain it self” . In 1904, an  advert image showed a woman who held a cacao pack with exactly the same image of her on the packet. Of course, in photography and graphics this effect has been used multiple times, but also in mathematics and computer science.

Binary search
In a very few words, it means, searching an element from a list dividing that list in 2 parts. If is less than the middle item, than it will look in the first part, dividing again that list. The guide of binary search is to compare elements till it finds the one that equals to what we are searching for.
For example looking for "4", having the elements above. First, it compares 4 with 7 and decide that 7 bigger, so it start looking for 4 in the first part. Then, it divides again the left part of…
Android 3.3 and its amazing Navigation feature

I hope this article will be read by persons who want to work as android developers, but they considered it is too complicated or the interface is not very friendly.

Android 3.3 comes with new features in order to make app development easier. The best thing in my opinion is the Navigation component, which make easier the view of the entire app.

Now it’s easier to handle the User Interface flow, to handle Up and Back actions properly by default, to be more creative but in the same time to respect the logic standards.

How to use it?

1.Add the dependencies in the project Gradle file:
 implementation "android.arch.navigation:navigation-fragment:$nav_version" // use -ktx for Kotlin
implementation "android.arch.navigation:navigation-ui:$nav_version" // use -ktx for Kotlin

2.Create a new folder in “Res” and then add a new xml file(for resource-type select navigation).

3. Go to "Design" option- like at Layout files whe…
AndroidX or "No more stress with the compatibility of the Android Support Libraries"

Android already have 10 years since it has been release and of course, numerous versions with new features added and constant improvements.  Developers had to make sure they have always the same version of the Android Support Library or otherwise some problems might appear in Gradle. Ta-na-na! the solution is migrating to AndroidX.

-Android Studio has to be 3.2.1(Toolbar-Help-About to check the android version);
-You need to have compile at least have compileSdk 28(Android 9.0);
-In build.gradle(Project) has to be classpath

How to migrate: Toolbar->
Migrate to AndroidX.

I It t will appear a message of possible errors and then the option “Do Refractor”. Also, the option to zip the project folder and to save it somewhere in your computer. In a few moment the Gradle will sync, I personally didn’t have any problems with my project.