Material-components-android: [Transition] Transition between Activities 'not a valid ancestor'

Created on 26 Feb 2020  路  2Comments  路  Source: material-components/material-components-android

Description: Full description of issue here

Expected behavior:
error

Source code: https://material.io/develop/android/theming/motion/#container-transform. (I did not apply the same here.) Note: The activity starts from the adapter.
```@SuppressLint("SetTextI18n")
override fun onBindViewHolder(holder: OrderViewHolder, position: Int){
val order: Order = data[position]
val customer: Customer = order.customer

    holder.username.text = "${customer.name} ${customer.surname}"
    holder.miniAddress.text = "${customer.provinceString}/${customer.districtString}"

    holder.card.setOnClickListener{
        context.startActivity(
            Intent(context, OrderContentActivity::class.java),
            ActivityOptions.makeSceneTransitionAnimation(
                MainActivity.self(),
                holder.linear,
                "shared_element_container"
            ).toBundle()
        )
    }
}

Android API version: 29

Material Library version: 1.2.0-alpha5

Device: Samsung M20

bug

Most helpful comment

Oh okey, I solved the problem from this url; https://github.com/material-components/material-components-android/blob/master/docs/theming/Motion.md#container-transform
The content of the documentation here is incomplete; https://material.io/develop/android/theming/motion/#container-transform

All 2 comments

Oh okey, I solved the problem from this url; https://github.com/material-components/material-components-android/blob/master/docs/theming/Motion.md#container-transform
The content of the documentation here is incomplete; https://material.io/develop/android/theming/motion/#container-transform

Thanks for the information, i got this problem too

Was this page helpful?
0 / 5 - 0 ratings