• Deepak Gahlot

    Deepak Gahlot

    1 year ago
    Hi All, Can we have custom indication on the selectable param under Modifier
    Deepak Gahlot
    Cicero
    +1
    10 replies
    Copy to Clipboard
  • carbaj0

    carbaj0

    1 year ago
    class ProduceStateScopeImpl<T>(
        state: MutableState<T>,
        override val coroutineContext: CoroutineContext
    ) : ProduceStateScope<T>, MutableState<T> by state {
    
        override suspend fun awaitDispose(onDispose: () -> Unit): Nothing {
            try {
                suspendCancellableCoroutine<Nothing> { }
            } finally {
                onDispose()
            }
        }
    }
    Why
    suspendCancellableCoroutine<Nothing> { }
    is being executed?
    carbaj0
    Zach Klippenstein (he/him) [MOD]
    +1
    16 replies
    Copy to Clipboard
  • n

    nglauber

    1 year ago
    I’m facing a strange behavior with focus + keyboard type… All the
    TextField
    are numeric and when I move the focus to the previous
    TextField
    , the keyboard type changes very quickly to the alpha numeric and then changes again to the numeric… 😕 Here’s my code:https://gist.github.com/nglauber/312052d2989aff50b9331aa6e0f816f7 And here’s the gif:
    n
    n
    +3
    9 replies
    Copy to Clipboard
  • FunkyMuse

    FunkyMuse

    1 year ago
    Hey guys, i'm trying to show the modal bottom sheet above the bottom navigation bar
    val zIndex = if (state.targetValue == ModalBottomSheetValue.Hidden) {
        0f
    } else {
        2f
    }
    
    ModalBottomSheetLayout(
        modifier = Modifier.navigationBarsPadding().zIndex(zIndex)
    it worked on beta03, it doesn't work anymore, is there an issue related to this? My BottomNavigationComposable has a zIndex of 1f
    FunkyMuse
    Lucien Guimaraes
    +1
    4 replies
    Copy to Clipboard
  • Colton Idle

    Colton Idle

    1 year ago
    I want to show an AlertDialog (material alert dialog) but have it display my custom composable inside of it. The reasons why I want an alertDialog is because I want the size of an AlertDialog and I want it's container as well (i.e. an alertDialog seems to be on a rounded corner material card) Should I start with
    Dialog
    and try to morph it into alertDialog design, or is there a way to pass a composable into an AlertDialog that I'm missing?
    Colton Idle
    l
    4 replies
    Copy to Clipboard
  • a

    alexsullivan114

    1 year ago
    I'm struggling a bit with getting a shadow to show for an image (like an elevated profile photo). I'm using the
    shadow
    modifier as follows:
    @Composable
    @Preview
    private fun ProfileItem() {
      Box(modifier = Modifier.background(Color.White).padding(20.dp)) {
        Image(
            painter = painterResource(id = R.drawable.charles),
            contentScale = ContentScale.Crop,
            contentDescription = "Profile Image",
            modifier = Modifier
                .size(48.dp)
                .shadow(8.dp, CircleShape)
        )
      }
    }
    This results in a circular avatar-esque image, but there's no shadow. However, if I swap out the
    Image
    Composable with a
    Text
    Composable, I see a shadow:
    @Composable
    @Preview
    private fun ProfileItem() {
      Box(modifier = Modifier.background(Color.White).padding(20.dp)) {
        Text("Testing shadow", modifier = Modifier.size(48.dp).shadow(8.dp, CircleShape))
      }
    }
    I've tried playing around with padding, nesting boxes, and using a surface instead of the shadow modifier, all without any luck. I'm sure I'm missing something obvious - any ideas?
    a
    Chris Sinco [G]
    +1
    36 replies
    Copy to Clipboard
  • Neal Sanche

    Neal Sanche

    1 year ago
    In handling a deep link in Compose navigation I'm seeing a couple of strange things that I can't figure out. First is the deep link seems to be delivered to the app twice. Second, the backstack seems to be recreated properly, however, the ViewModel I've linked to the sub navigation gets recreated when the app handles the deep link. That's really unexpected. I feel like I must be doing something very wrong at this point. Any ideas?
    Neal Sanche
    i
    10 replies
    Copy to Clipboard
  • Billy Newman

    Billy Newman

    1 year ago
    Hello all, I am struggling to implement an onClick handler for a Compose TextField. Current functionality is to handle the TextField click but disable manually editing of the field. For my use case I would like to handle the click and do something else. I would like the click animation to still happen. This is the layout I used that worked:
    <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/editText"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:focusable="true"
                android:focusableInTouchMode="false"
                android:textIsSelectable="false"
                android:cursorVisible="false"
                android:clickable="false"
                android:inputType="textNoSuggestions"
                android:text='@{value}'
                android:onClick="@{() -> clickListener.invoke() }"/>
    Billy Newman
    Zach Klippenstein (he/him) [MOD]
    15 replies
    Copy to Clipboard
  • m

    Marko Novakovic

    1 year ago
    I want to create layout like this. Cloud above everything else and user should be able to move the cloud around. Cloud is menu that opens on
    +
    . Problem I have with my current implementation is that top layer with cloud is consuming all inputs so I can’t interact with rest of the app. Do you have any ideas how to do this. Code in 🧵
    m
    Chris Sinco [G]
    +1
    16 replies
    Copy to Clipboard
  • Luis Mierez

    Luis Mierez

    1 year ago
    I’m trying to figure out why I keep getting an error when trying to add compose to my project. Haven’t been able to find an answer from searching online, so maybe y’all can help me. I’ll post the stack trace in thread
    Luis Mierez
    i
    +1
    27 replies
    Copy to Clipboard