In this tutorial, we will learn how to convert one negative number to positive in Kotlin. We will learn two different ways to do that.
ReadOn Android and iOS, if you tap one button, the opacity of it decreases during the time you pressed it down. TouchableHighlight is used to implement similar effects. It decreases the opacity of the wrapped view on pressed.
ReadIf you know iOS development, then you must be aware of the term safe area. In react native, SafeAreaView component is used for iOS version 11 or later devices. It renders nested contents. So, this view is used as the parent of all views.
ReadStatus bar can be styled starting from Android Kitkat. You can change the color of the status bar and change the style in Android.
ReadSectionList in react-native is similar to FlatList. The only difference is that FlatList is a simple list but SectionList is a list with sections. The list is divided into different sections with a header for each section.
ReadIn this tutorial, I will show you how we can fetch data from a URL and load it into a FlatList in react native. We will use async/await to load the data and using react hook, we will populate it in a list. and async/await
ReadFlatList is used to show a list of items in react-native. It is actually a list view with the most important list features like header support, footer support, separator support, pull to refresh support, multiple columns, scrollable to an index programmatically, scroll loading, etc.
ReadPartitioning or dividing a list or any other collection is easy in Kotlin. Kotlin provides one inbuilt method that makes it easier for us. In this post, I will show you how to do partition using and without using the provided function.
ReadIn this tutorial, we will learn how to remove all negative numbers from a mutable list. For example, if the list is 1,2,3,4,5,-6,-7,-8,9, it will remove all negative numbers and convert it to 1,2,3,4,5,9.
ReadFor normal classes, if we want to access any of its property, like calling a method or accessing any variable in the class, we need to create one object for that class. If we don't want to create one class instance and access its members, we need to create one companion object. Unlike other programming languages like Java or Python, Kotlin doesn't have the concept of static function.
Read