Justin Yue
06/24/2021, 6:12 AMasync
would be my best bet since it returns a Deferred
that "represents a promise to provide a result later." However, I am not looking to wait for a result to be return. While I know I could probably return a dummy value (probably a boolean to represent the coroutine finished), are there any other alternatives to async
?Saidiali
06/24/2021, 8:18 AMHovhannes
06/24/2021, 11:45 AMCole K
06/24/2021, 11:48 PM<?xml version=“1.0” encoding=“utf-8"?>
<com.google.android.material.appbar.AppBarLayout xmlns:android=“http://schemas.android.com/apk/res/android”
android:layout_width=“match_parent”
android:layout_height=“wrap_content”
android:background=“@null”>
<FrameLayout
android:layout_width=“match_parent”
android:layout_height=“wrap_content”>
<com.comapny.apps.view.custom.ui.MyToolbar
android:id=“@+id/toolbar”
style=“@style/AppTheme.Toolbar”
android:layout_width=“match_parent”/>
<com.comapny.apps.view.custom.SearchView
android:id=“@+id/search_view”
android:layout_width=“match_parent”
android:layout_height=“wrap_content”
android:layout_gravity=“bottom”
android:visibility=“invisible”/>
</FrameLayout>
</com.google.android.material.appbar.AppBarLayout>It seems like I can only see the shadow under my search view when I
include
the layout in other views. When I use it as a custom ui component (<com.company.apps.view.custom.ui.SearchToolbar/>
), it does not show the shadow. Any idea as to why?aniruddha dhamal
06/25/2021, 4:23 PMSlackbot
06/26/2021, 5:25 AMVivek Modi
06/26/2021, 10:04 PMTimo Drick
06/26/2021, 11:16 PMDavid Martin
06/27/2021, 2:43 AMDavid Martin
06/27/2021, 2:44 AMMark
06/27/2021, 3:08 AMChar.toInt()
is marked as deprecated so I change it to Char.code
and add @OptIn(ExperimentalStdlibApi::class)
. This seems to work but how is that possible considering Char.code
is 1.5+?Alexandru Martin
06/27/2021, 1:14 PMPedro Azevedo
06/27/2021, 6:43 PMPedro Azevedo
06/27/2021, 8:03 PMPhongBM
06/28/2021, 2:23 AMNicolas Verinaud
06/28/2021, 2:16 PMAndroid Studio 4.2.1 / KMM Plugin 0.2.6
Sean Aguirre
06/29/2021, 1:14 AMXcode build phases (packForXcode task)
in the iOS framework distribution
on step 5 in the tutorial: https://kotlinlang.org/docs/mobile/create-first-app.html.
I did complete the initial set up just fine for step 1 FYI. Which is the KMM set up (https://kotlinlang.org/docs/mobile/setup.html)
Attached a screenshot of the drop down values. All it shows is Regular framework
and CocoaPods dependency manager
.
Any help would be appreciated, and if I'm going about setting up this project improperly (even though this is what the docs state) let me know. Thanks!Slackbot
06/29/2021, 7:15 AMJungIn Choi
06/29/2021, 9:05 AMSlackbot
06/29/2021, 1:38 PMAidooyaw1992
06/29/2021, 10:46 PMMAYANK SINGHAL
06/30/2021, 4:56 PMZun
06/30/2021, 6:51 PMSlackbot
07/01/2021, 3:58 AMharis mehmood
07/01/2021, 7:16 AMWaqas Tahir
07/01/2021, 10:30 AMJacare_krk
07/01/2021, 7:44 PMJorge Cordero
07/01/2021, 8:22 PMHovhannes
07/02/2021, 7:03 AMerror: [Dagger/MissingBinding] com.example.feed.feedApp cannot be provided without an @Inject constructor or an @Provides-annotated method.
public abstract static class SingletonC implements HiltWrapper_ActivityRetainedComponentManager_ActivityRetainedComponentBuilderEntryPoint,
^
com.example.feed.feedApp is injected at
com.example.feed.dagger.viewmodel.FeedViewModelModule.providePauseAbleObservable(feedApp)
com.example.feed.util.PauseAbleObservable<?> is injected at
com.example.feed.viewmodel.FeedViewModel(�, PauseAbleObservable)
com.example.feed.viewmodel.FeedViewModel is injected at
com.example.feed.viewmodel.FeedViewModel_HiltModules.BindsModule.binds(vm)
@dagger.hilt.android.internal.lifecycle.HiltViewModelMap java.util.Map<java.lang.String,javax.inject.Provider<androidx.lifecycle.ViewModel>> is requested at
dagger.hilt.android.internal.lifecycle.HiltViewModelFactory.ViewModelFactoriesEntryPoint.getHiltViewModelMap() [com.example.feed.feedApp_HiltComponents.SingletonC ? com.example.feed.feedApp_HiltComponents.ActivityRetainedC ? com.example.feed
FeedViewModelModule.kt
@Module
@InstallIn(ActivityComponent::class)
class FeedViewModelModule {
@Provides
fun providePauseAbleObservable(feedApp: FeedApp): PauseAbleObservable<*> {
return PauseAbleInterval(
{ System.currentTimeMillis() },
sportsFeedApp.resources.getInteger(R.integer.pollingPeriodSeconds).toLong(),
TimeUnit.SECONDS
)
}
}
PauseAbleObservable.kt
interface PauseAbleObservable<T> {
val observable: Observable<T>
fun pause()
fun resume()
}
FeedViewModel .kt
@HiltViewModel
class FeedViewModel @Inject constructor(
private val feedRepository: FeedRepository,
var pauseAbleObservable: PauseAbleObservable<*>
) : ViewModel() {....}
Ink
07/02/2021, 11:31 AMCategory
items in my list and now I want to add Header for each single section.
model.apply {
val archiveList: MutableList<ArchiveItem> = mutableListOf()
val itemList: MutableList<ListItem> = mutableListOf()
archives.map {
archiveList.add(
ArchiveItem(
category = it.translateToCategory(it.domain.toString()),
title = it.title,
agreementNumber = it.agreementNumber,
startDate = it.startDate
)
)
archiveList
.sortedBy { it.category }
.groupBy { it.category }
.apply {
itemList.add(ArchiveListHeader(title = "My category"))
}
}
itemList.addAll(archiveList)
items = itemList
}
Ink
07/02/2021, 11:31 AMCategory
items in my list and now I want to add Header for each single section.
model.apply {
val archiveList: MutableList<ArchiveItem> = mutableListOf()
val itemList: MutableList<ListItem> = mutableListOf()
archives.map {
archiveList.add(
ArchiveItem(
category = it.translateToCategory(it.domain.toString()),
title = it.title,
agreementNumber = it.agreementNumber,
startDate = it.startDate
)
)
archiveList
.sortedBy { it.category }
.groupBy { it.category }
.apply {
itemList.add(ArchiveListHeader(title = "My category"))
}
}
itemList.addAll(archiveList)
items = itemList
}
model.apply {
items = archives.groupBy { it.domain }
.map {
listOf(ArchiveListHeader(it.key ?: ""))
.plus(
it.value.map {
ArchiveItem(
category = it.translateToCategory(it.domain.toString()),
title = it.title,
agreementNumber = it.agreementNumber,
startDate = it.startDate
)
}
)
}
.flatten()
}