mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
map kinda works
This commit is contained in:
parent
4e7d59f775
commit
ecef170004
4 changed files with 75 additions and 16 deletions
|
|
@ -23,7 +23,6 @@ import android.view.ViewGroup
|
|||
import android.view.ViewGroup.LayoutParams.MATCH_PARENT
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.compose.Composable
|
||||
import androidx.ui.core.ContextAmbient
|
||||
|
||||
/**
|
||||
* Composes an Android [View] given a layout resource [resId]. The method handles the inflation
|
||||
|
|
@ -36,14 +35,7 @@ import androidx.ui.core.ContextAmbient
|
|||
@Composable
|
||||
// TODO(popam): support modifiers here
|
||||
fun AndroidView(@LayoutRes resId: Int, postInflationCallback: (View) -> Unit = { _ -> }) {
|
||||
val context = ContextAmbient.current
|
||||
|
||||
val r = AndroidViewHolder(context)
|
||||
r.postInflationCallback = postInflationCallback
|
||||
r.resId = resId
|
||||
|
||||
// Hmm - how is merely creating an AndroidViewHolder sufficient to have it end up in the
|
||||
// activities view hierarchy?
|
||||
AndroidViewHolder(postInflationCallback = postInflationCallback, resId = resId)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue