wip decomposing channel

This commit is contained in:
geeksville 2020-04-07 16:04:58 -07:00
parent c70f296406
commit 17a1631892
6 changed files with 106 additions and 11 deletions

View file

@ -142,7 +142,8 @@ class MainActivity : AppCompatActivity(), Logging,
TabInfo(
"Channel",
R.drawable.ic_twotone_contactless_24,
ComposeFragment("Channel", 4) { ChannelContent(UIState.getChannel()) }),
ChannelFragment()
),
TabInfo(
"Map",
R.drawable.ic_twotone_map_24,

View file

@ -1,6 +1,10 @@
package com.geeksville.mesh.ui
import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.compose.Composable
import androidx.ui.core.ContextAmbient
import androidx.ui.foundation.Text
@ -21,6 +25,20 @@ import com.geeksville.mesh.model.toHumanString
object ChannelLog : Logging
class ChannelFragment : ScreenFragment("Channel"), Logging {
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View? = inflater.inflate(R.layout.channel_fragment, container, false)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
}
}
@Composable
fun ChannelContent(channel: Channel?) {