2021年3月7日星期日

Is it possible to not trigger ripple effect on scroll?

Actual Result: Ripple effect triggered on scroll

Expected Result: Ripple effect is only triggered on click just like in Android Views

Code:

class MainActivity : AppCompatActivity() {      override fun onCreate(savedInstanceState: Bundle?) {          super.onCreate(savedInstanceState)          setContent {              MyApp {                  Content()              }          }      }  }    @Preview  @Composable  fun Content() {      val items = List(100) { "Item number $it" }      LazyColumn {          items(items = items) { item ->              Text(                  text = item,                  modifier = Modifier                      .fillMaxWidth()                      .clickable { }                      .padding(16.dp)              )          }      }  }  

Video:

Actual Result

https://stackoverflow.com/questions/66524166/is-it-possible-to-not-trigger-ripple-effect-on-scroll March 08, 2021 at 12:06PM

没有评论:

发表评论