package Ġcom . li uj in ch ao DS . fre sc or ot atio in Ċ Ċ import Ġandroid . app . Activity Ċ import Ġandroid . net . Uri Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . View Ċ import Ġcom . facebook . common . util . Uri Util Ċ import Ġcom . facebook . draw ee . backends . pipeline . F resco Ċ import Ġcom . facebook . draw ee . view . Simple Draw ee View Ċ import Ġcom . facebook . image pipeline . common . Rotation Options Ċ import Ġcom . facebook . image pipeline . request . Image RequestBuilder Ċ import Ġkotlinx . android . synt hetic . main . activity _ main .* Ċ Ċ class ĠMainActivity Ġ: ĠActivity () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ ĠF resco . initialize ( this ) ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . activity _ main ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġfail ( view : ĠView ) Ġ{ ĊĠĠĠĠĠĠĠ Ġimage . rotate ( Uri Util . get Uri For ResourceId ( R . drawable . image _ ic _ ex if ), ĠRotation Options . disable Rotation ()) ĊĠĠĠĠĠĠĠ Ġimage 1 . rotate ( Uri Util . get Uri For ResourceId ( R . drawable . image _ ic _ ex if ), ĠRotation Options . auto Rotate ()) ĊĠĠĠ Ġ} Ċ } ĊĊ Ċ fun ĠSimple Draw ee View . rotate ( uri : ĠUri , Ġrotation Options : ĠRotation Options ) Ġ{ ĊĠĠĠ Ġval Ġauto Image Request Ġ= ĠImage RequestBuilder . newBuilder With Source ( uri ) ĊĠĠĠĠĠĠĠ Ġ. setRotation Options ( rotation Options ) ĊĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠ Ġcontroller Ġ= ĠF resco . new Draw ee Controller Builder () ĊĠĠĠĠĠĠĠ Ġ. set Old Controller ( controller ) ĊĠĠĠĠĠĠĠ Ġ. setImage Request ( auto Image Request ) ĊĠĠĠĠĠĠĠ Ġ. build () Ċ } Ċ