package Ġcom . m ire go . sample . ui . show case . animation . types Ċ Ċ import Ġandroidx . compose . animation . core . Animation Spec Ċ import Ġandroidx . compose . animation . core . animate Float As State Ċ import Ġandroidx . compose . foundation . Canvas Ċ import Ġandroidx . compose . foundation . background Ċ import Ġandroidx . compose . foundation . layout . Arrange ment Ċ import Ġandroidx . compose . foundation . layout . Column Ċ import Ġandroidx . compose . foundation . layout . Row Ċ import Ġandroidx . compose . foundation . layout . fill Max Width Ċ import Ġandroidx . compose . foundation . layout . padding Ċ import Ġandroidx . compose . foundation . layout . size Ċ import Ġandroidx . compose . foundation . remember Scroll State Ċ import Ġandroidx . compose . foundation . shape . Rounded Corner Shape Ċ import Ġandroidx . compose . foundation . vertical Scroll Ċ import Ġandroidx . compose . material . Material Theme Ċ import Ġandroidx . compose . material . Text Ċ import Ġandroidx . compose . runtime . Composable Ċ import Ġandroidx . compose . runtime . State Ċ import Ġandroidx . compose . runtime . derived State Of Ċ import Ġandroidx . compose . runtime . getValue Ċ import Ġandroidx . compose . ui . Alignment Ċ import Ġandroidx . compose . ui . Bias Alignment Ċ import Ġandroidx . compose . ui . Modifier Ċ import Ġandroidx . compose . ui . graphics . Color Ċ import Ġandroidx . compose . ui . tool ing . preview . Preview Ċ import Ġandroidx . compose . ui . unit . dp Ċ import Ġcom . m ire go . sample . ui . show case . Component Show case Top Bar Ċ import Ġcom . m ire go . sample . ui . the ming . Sample TextStyle Ċ import Ġcom . m ire go . sample . ui . the ming . medium Ċ import Ġcom . m ire go . sample . view models . show case . animation . types . Animation Type Show case ViewModel Ċ import Ġcom . m ire go . sample . view models . show case . animation . types . Animation Types Show case ViewModel Ċ import Ġcom . m ire go . sample . view models . show case . animation . types . Animation Types Show case ViewModel Preview Ċ import Ġcom . m ire go . tri kot . view models . decl arative . compose . extensions . animation Spec Ċ import Ġcom . m ire go . tri kot . view models . decl arative . compose . extensions . observe Animated Property As State Ċ import Ġcom . m ire go . tri kot . view models . decl arative . compose . extensions . observe As State Ċ import Ġcom . m ire go . tri kot . view models . decl arative . compose . view model . VM D Button Ċ import Ġcom . m ire go . tri kot . view models . decl arative . compose . view model . VM D Text Ċ Ċ @ Composable Ċ private Ġfun Ġanimate Horizontal Alignment As State ( ĊĠĠĠ Ġtarget Value : ĠFloat , ĊĠĠĠ Ġanimation Spec : ĠAnimation Spec < Float >, ĊĠĠĠ Ġvisibility Threshold : ĠFloat Ġ= Ġ 0 . 0 1 f , ĊĠĠĠ Ġfinished Listener : Ġ(( Float ) Ġ-> ĠUnit )? Ġ= Ġnull Ċ ): ĠState < Bias Alignment . Horizontal > Ġ{ ĊĠĠĠ Ġval Ġbias Ġby Ġanimate Float As State ( ĊĠĠĠĠĠĠĠ Ġtarget Value Ġ= Ġtarget Value , ĊĠĠĠĠĠĠĠ Ġanimation Spec Ġ= Ġanimation Spec , ĊĠĠĠĠĠĠĠ Ġvisibility Threshold Ġ= Ġvisibility Threshold , ĊĠĠĠĠĠĠĠ Ġfinished Listener Ġ= Ġfinished Listener ĊĠĠĠ Ġ) ĊĠĠĠ Ġreturn Ġderived State Of Ġ{ ĠB ias Alignment . Horizontal ( bias ) Ġ} Ċ } Ċ Ċ @ Composable Ċ fun ĠAnimation Types Show case View ( animation Types Show case ViewModel : ĠAnimation Types Show case ViewModel ) Ġ{ ĊĠĠĠ Ġval ĠviewModel : ĠAnimation Types Show case ViewModel Ġby Ġanimation Types Show case ViewModel . observe As State () ĊĊĠĠĠ ĠColumn ( ĊĠĠĠĠĠĠĠ Ġmodifier Ġ= ĠModifier ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. fill Max Width () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. vertical Scroll ( state Ġ= Ġremember Scroll State ()) ĊĠĠĠ Ġ) Ġ{ ĊĠĠĠĠĠĠĠ ĠComponent Show case Top Bar ( viewModel ) ĊĊĠĠĠĠĠĠĠ ĠAnimation Section ( viewModel . linear ) ĊĠĠĠĠĠĠĠ ĠAnimation Section ( viewModel . ease In ) ĊĠĠĠĠĠĠĠ ĠAnimation Section ( viewModel . ease Out ) ĊĠĠĠĠĠĠĠ ĠAnimation Section ( viewModel . ease In E ase Out ) ĊĠĠĠĠĠĠĠ ĠAnimation Section ( viewModel . cubic Bezier ) ĊĠĠĠĠĠĠĠ ĠAnimation Section ( viewModel . spring ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Composable Ċ private Ġfun ĠAnimation Section ( animation Type ViewModel : ĠAnimation Type Show case ViewModel ) Ġ{ ĊĠĠĠ Ġval ĠviewModel : ĠAnimation Type Show case ViewModel Ġby Ġanimation Type ViewModel . observe As State () ĊĊĠĠĠ Ġval Ġlinear Animated Property Ġby ĠviewModel . observe Animated Property As State ( ĊĠĠĠĠĠĠĠ Ġproperty Ġ= ĠviewModel :: is Trailing , ĊĠĠĠĠĠĠĠ Ġtransform Ġ= Ġ{ Ġis Trailing Ġ-> Ġif Ġ( is Trailing ) Ġ 1 f Ġelse Ġ- 1 f Ġ} ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġhorizontal Alignment Ġby Ġanimate Horizontal Alignment As State ( ĊĠĠĠĠĠĠĠ Ġtarget Value Ġ= Ġlinear Animated Property . value , ĊĠĠĠĠĠĠĠ Ġanimation Spec Ġ= Ġlinear Animated Property . animation Spec () ĊĠĠĠ Ġ) ĊĊĠĠĠ ĠColumn ( modifier Ġ= ĠModifier . fill Max Width (). padding ( start Ġ= Ġ 1 6 . dp , Ġend Ġ= Ġ 1 6 . dp , Ġtop Ġ= Ġ 1 6 . dp ), Ġhorizontal Alignment Ġ= Ġhorizontal Alignment ) Ġ{ ĊĠĠĠĠĠĠĠ ĠRow ( modifier Ġ= ĠModifier . fill Max Width (), Ġhorizontal Arrange ment Ġ= ĠArrange ment . Space Between , Ġvertical Alignment Ġ= ĠAlignment . Center Vert ically ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠV MD Text ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠviewModel Ġ= ĠviewModel . title , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġstyle Ġ= ĠSample TextStyle . title 2 ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ ĠV MD Button ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠviewModel Ġ= ĠviewModel . animate Button ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) Ġ{ Ġcontent Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠText ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġmodifier Ġ= ĠModifier ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. background ( Material Theme . colors . background , Ġshape Ġ= ĠRo unded Corner Shape ( 6 . dp )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. padding ( start Ġ= Ġ 8 . dp , Ġend Ġ= Ġ 8 . dp , Ġtop Ġ= Ġ 4 . dp , Ġbottom Ġ= Ġ 4 . dp ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtext Ġ= Ġcontent . text , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġstyle Ġ= ĠSample TextStyle . body . medium (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcolor Ġ= ĠMaterial Theme . colors . primary ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ ĠCanvas ( modifier Ġ= ĠModifier . size ( 3 0 . dp ). padding ( top Ġ= Ġ 1 0 . dp ), Ġon Draw Ġ= Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdraw Circle ( Color . Red ) ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Preview ( show System Ui Ġ= Ġtrue ) Ċ @ Composable Ċ fun ĠAnimation Types Show case View Preview () Ġ{ ĊĠĠĠ ĠAnimation Types Show case View ( animation Types Show case ViewModel Ġ= ĠAnimation Types Show case ViewModel Preview ()) Ċ } Ċ