gabrielfv
07/23/2020, 5:32 PMinterface Foo<A : Bar, B : Baz>
And a series of implementations which I want to bind into a dagger map, is it possible to bind them like so?
@Binds
@IntoMap
@FooKey(ExampleFoo::class)
fun bindExampleFoo(exampleFoo: ExampleFoo): Foo<*, *>
To me, if I have a key like this:
@MapKey
annotation class FooKey(val value: KClass<out Foo<*, *>>)
It will fail me with a weird error message:
error: incompatible types: Class<ExampleFoo> cannot be converted to Class<? extends Foo<?,?>>
vesp
07/23/2020, 8:06 PMAnaniya
07/24/2020, 8:42 AMAlejandro Rios
07/24/2020, 12:24 PMCode Coverage
besides Jacoco or Sonar?, i'm looking if there's an alternative to do that on an Android project that's written in Kotlinvgonda
07/24/2020, 8:03 PMpollux-
07/24/2020, 10:50 PMChristopher Elías
07/25/2020, 6:06 AMpackagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/main.kotlin_module'
}
but it have no effects. Im using also Kotlin Gradle DSL. and my AS version is Android Studio 4.0.1
Build #AI-193.6911.18.40.6626763, built on June 24, 2020
Runtime version: 1.8.0_242-release-1644-b01 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1237M
Cores: 8
Registry: ide.new.welcome.screen.force=true, ide.balloon.shadow.size=0
Non-Bundled Plugins: org.jetbrains.kotlin, com.google.services.firebase, com.thoughtworks.gaugeKulwinder Singh
07/25/2020, 8:33 AMopen class BaseViewModel {
private val _event = SingleLiveEvent<Events>()
val event: LiveData<Events> = _event
sealed class Events {
data class ShowMessage(val message: String) : Events()
}
}
class LoginViewModel : BaseViewModel() {
object LoginSuccess : Events()
//Cannot access '<init>': it is private in 'Events'.
// This type is sealed, so it can be inherited by only its own nested classes or objects.
}
is there a way to achieve it somehow ? i'm getting -> Cannot access '<init>': it is private in 'Events'.This type is sealed, so it can be inherited by only its own nested classes or objects.
Eugene
07/27/2020, 10:37 AMJustin Tullgren
07/28/2020, 2:40 PMDeepti M
07/28/2020, 4:23 PMpollux-
07/28/2020, 7:44 PMArchie
07/29/2020, 6:03 AMFragmentTransaction
ourselves, we have situation where we need to jump to a certain destination fragment but also have to create the backstack along the way. For example:
A -> B -> C -> D
so in code we do:
fun jumpToDFromA() {
// Assuming in in A
fragmentManger.beginTransaction()
.replace(id, B())
.addToBackStack("state1")
.setReorderingAllowed(true)
.commit()
fragmentManger.beginTransaction()
.replace(id, C())
.addToBackStack("state2")
.setReorderingAllowed(true)
.commit()
fragmentManger.beginTransaction()
.replace(id, D())
.addToBackStack("state3")
.setReorderingAllowed(true)
.commit()
}
With this, I am able to Jump to D
but also have the backstack A -> B -> C
.
Is this possible to do in Navigation Component
?Vincent Williams
07/29/2020, 8:06 PMtasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}
this is the default clean task. Does this need to look different for multi-module projects or will this work just fine?
maybe delete(rootProject.buildDir)
needs to be run on each buildDir? im not sure thoughChethan
07/30/2020, 7:04 AMritesh
07/30/2020, 8:12 AMSYSTEM_ALERT_WINDOW
to display an overlay across all activities.
Why not use SYSTEM_ALERT_WINDOW
and Services like every other stackoverflow solution tells me to do that.
Requirement is to add a chat feature in the app, that would be available across all activities in minimized view once initiated - you can start a chat within one activity and keep it live when changing activities.
Solution -> Use this permission, and create a service, to overlay across all screens.
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
Problem with the requirement we have ->
1. I don't need a view visible over all applications - a view visible only to our app.
2. Using the above solution requires run time permission from users for api level above >=M.
3. User can disable this permission from settings, and overlay won’t work.
4. this permission is not available on all devices, and I suspect that it will be retired in a year or two.Kulwinder Singh
07/30/2020, 12:49 PMGeorge Theocharis
07/30/2020, 1:40 PMArpan Sarkar
07/30/2020, 5:28 PM:user
and :admin
in admin module if i create any Navigation Resource File it showing in the Navigation Editor Design tab, but if i crate any Navigation Resource File in the user module its not showing in the Navigation Editor Design tab. But every defined actions are working properly. I tried deleting .idea
folder Invalidating Cache, still same issue. How can is resolve this issue?vesp
07/30/2020, 5:45 PMexternalStorageVolumes
only return two elements max? Will the first element always be phone storage that isn't removable?
2. Is that map
efficient? I think it looks a little verbose and I'm not sure how to tighten it upOG
07/30/2020, 5:59 PMHorv
07/30/2020, 10:18 PMobserveAsState
allan.conda
07/31/2020, 7:18 AM.not()
?ja.son
07/31/2020, 2:35 PMJoshua
07/31/2020, 5:40 PMDeepti M
07/31/2020, 8:47 PMMarcin Środa
08/01/2020, 6:26 AMfun test(channel: List<String> = listOf(), channelGroups: List<String> = listOf())
Any idea how to set one parameter as “required”? I understand that the best way will be separate function to 2 different usecases, but in my scenario I need to accept:
• not empty channel list
• not empty channel groups
• both not empty channel and channel groupsRemy Benza
08/01/2020, 12:28 PMSlackbot
08/01/2020, 3:14 PMbrandonmcansh
08/02/2020, 12:41 AMbrandonmcansh
08/02/2020, 12:41 AMAfzal Najam
08/03/2020, 3:43 AMbrandonmcansh
08/03/2020, 12:21 PM