• Nat Strangerweather

    Nat Strangerweather

    1 year ago
    is anyone aware of some sample code for the button animation featured here: https://material.io/blog/jetpack-compose-beta. I am talking about the top left one.
    Nat Strangerweather
    d
    6 replies
    Copy to Clipboard
  • Colton Idle

    Colton Idle

    1 year ago
    Getting this error:
    java.lang.IllegalArgumentException: navigation destination -2074115716 is not a direct child of this NavGraph
    Simple repro code in thread
    Colton Idle
    2 replies
    Copy to Clipboard
  • d

    Daniel Burnhan

    1 year ago
    Hey guys. Have a few more questions on compose navigation. Im using the navigation component. How are you guys handling global states like logged in and logged out? Before I was handling like the following
    class MyAppModel: ViewModel{
        val loggedInState: Flow<Boolean>
    }
    
    class MainActivity : ComponentActivity() {
        override fun onCreate(savedInstanceState: Bundle?) {
            super.onCreate(savedInstanceState)
            "SETUP APP MODEL HERE"
            val myAppModel= MyAppModel()
            setContent {
                MyUI(myAppModel)
            }
        }
    }
    
    @Composable
    fun MyUI(vm: MyAppModel){
        val loggedIn = vm.loggedInState.asLiveData().observeAsState()
        when (loggedIn.value){
            is true -> DasboardUI()
            is false -> AuthUI()
        }
    }
    Now that I have a navgraph. It seems like Ill have to have to observe this state in every path in the navgraph to be able to react to it? Otherwise I could create two separate navigation hosts and have them separate for Authentication workflow and the rest of the app?
    d
    i
    +1
    11 replies
    Copy to Clipboard
  • j

    Jason Inbody

    1 year ago
    What does the error
    java.lang.IllegalStateException: pending composition has not been applied
    imply? I recently copy and pasted some google map code and now I'm getting this error
    j
    4 replies
    Copy to Clipboard
  • Philip Dukhov

    Philip Dukhov

    1 year ago
    Hello! I had a discussion about text field focus on issue tracker, but probably slack is a better place to continue it. I can’t understand, why would text field need focus after keyboard is dismissed? Google engineer says: “It allows the user to dismiss the keyboard, but still continue typing on the keyboard without the user having to hit tab multiple times to re-focus on the TextField that was previously focused.“. What means “hit tab multiple times to re-focus” here? User needs one click on text field to start editing, no matter focused it or not, am I missing something? Is there another way to show keyboard for a focused text field?
    Philip Dukhov
    Albert Chang
    3 replies
    Copy to Clipboard
  • a

    Abhishek Dewan

    1 year ago
    Could someone please advise as to why during recomposition the scaffold state seems to be working as intended by the isTopBarEditing state is always reset to false. This is SearchTab is part of a bottom navigation bar and anytime I navigate away and come back to it, the scaffold state seem to hold the position of the SearchResults composable without a problem but isTopBarEditing is always reset to false (added snippet in thread)
    a
    Albert Chang
    3 replies
    Copy to Clipboard
  • Michal Jezierski

    Michal Jezierski

    1 year ago
    Hello, is it possible to focus BasicTextField by calling requestFocus on FocusRequester (or other way) BUT WITHOUT triggering keyboard ?
    Michal Jezierski
    Alexandre Elias [G]
    +1
    3 replies
    Copy to Clipboard
  • a

    allan.conda

    1 year ago
    We have a requirement to have a row with two boxes, and the width of each box is same as the widest box. Any idea how to achieve this optimally in Compose? I have a working solution but it requires multiple passes and flickers in the process.
    a
    Dominaezzz
    +2
    4 replies
    Copy to Clipboard
  • Todor Grudev

    Todor Grudev

    1 year ago
    Hello 🙂 what’s the best way to access a string resource inside a coroutine scope? Code in a :thread-please:
    Todor Grudev
    Albert Chang
    4 replies
    Copy to Clipboard
  • d

    dimsuz

    1 year ago
    I am getting some weird kotlin compiler internal error exception while compiling specific
    rc02
    -based composable. It says it can't inline
    Box$default
    . Is this some known bug or should I report it? Exception: https://gist.github.com/dimsuz/99c94126807cfa6ca1dc515228a8913a
    d
    1 replies
    Copy to Clipboard