Category "kotlin"

manage Multiple back stacks when using bottom navigation and navigation component

I am using bottom navigation and I have 3 main fragment in it (fragment 1, 2 and 3 in image) and there is some other fragments that I manage them in navigation

How to use this Android Week View Library

I'm trying to implement on my android application a calendar week view where I will show all the events in that week like a school schedule. After searching for

Composable calls are not allowed inside the calculation parameter of inline fun

I am trying to access the dao instance of my room database which is being used to store names(This code I wrote just to get familiar to jetpack compose). I trie

How to suppress Kotlin unused parameter warning in all test classes?

In parameterized tests I use hint parameter to clarify test case naming. From the static analyzer point of view this parameter is never used, so this warning fr

unescaping UTF-8 characters from file (InputStream)

I am trying to unescape UTF_8 characters like "\u00f6" to their UTF-8 representation. E.g. file contains "Aalk\u00f6rben" should become "Aalkörben". val tm

Remove key from map kotlin

I have a map as follows val parentMap= mutableMapOf<String,String>() parentMap["key1"]="value1" parentMap["key2"]="value2" parentMap["key3"]

Data binding causes memory leak even the binding has been nullified

I've done my research on memory leak when using Data Binding. Every posts said that one should assign null to binding object to resolve this issue. However, it

KOTLIN: Can I Call Multiple Class Methods Outside Apply block and Difference in Calling Methods Inside and Outside of Apply Block?

package com.example.learning fun main(args: Array<String>) { var person = Person("Ramu", 51, 50000F, 7.5F) person.apply{ name = "Sam"

Zebra write RFID in Android Kotlin preforming correctly with some tags but not others

I am working on a inventory management system where it's required to write asset ids (with length of maximum 17) in to an RFID tag. First the problem was that w

Setting Circular progressbar is not updating the progress

My Code is really simple and it has nothing fancy logic in it. I am just taking a value and trying to set the value. This value is coming from the a LiveData ob

Ktor - how to choose client engine for JVM platform?

We have JVM (JDK 8) and used okhttp as client engine by developers. Each time we makes a request, a new instance of client is created and closed finally. During

File pattern was reassigned to file type by 'Android' plugin. You can confirm or revert reassigning pattern

I am developing an app using Flutter 2.10.3 but I assume this issue is not related to Flutter. Since upgrading to Android Studio Bumblebee | 2021.1.1 Patch 2 I

Jetpack compose BottomNavigation - java.lang.IllegalStateException: Already attached to lifecycleOwner

When I double click the same item or if I go to each composable screen very quickly i receive an error, How do I solve this problem? I tried changing few things

Cannot call this method while RecyclerView is computing a layout or scrolling androidx.recyclerview.widget.RecyclerView

I have a recyclerview with check boxes and names, After checking the desirable checkboxes I want a list of them but the recyclerView recycles the items on scrol

How to remain on the same position after edit or delete data from nested recycler view

I have a nested recycler view that contains parent and child adapters. I am using Room DB for showing data on the recycler view. When I, add or delete data from

How to manage firebase sign-in in another class

I have 3 different Fragments to sign in. This is one of fragment to sign-in. @AndroidEntryPoint class SettingFragment : Fragment(){ lateinit var binding: Fragm

How to design this type of view in android

How to get this type of layout using StaggeredGridLayoutManager. Or I need to use some other thing? binding.allHistoryRV.run { layoutManager = Stag

Mockito+Kotlin+SpringBoot, `when` section doesn't mock, but invoke method meant to be mocked

I'm trying to modify existing test of kotlin+springboot project. Mockito.`when`(serviceA.getData(anyString())).thenReturn(data)// existing mocking Mockito.`when

How to call the system menu as in the Chrome browser to set the default browser

I have a Browser app, I need to set it as my default browser. I want to call such a system menu (as in the photo) only instead of Chrome - the name of my applic

Safari Browsers not loading videos or audio with wav file type

I have been digging into a bug with our website where videos and wav type audio files are not loading/showing up when viewed through the Safari browser. Instead