https://kotlinlang.org logo
#android
Title
# android
t

thymecypher

07/31/2018, 2:03 AM
@neuber You need to import the package to use it in another source file.
n

neuber

07/31/2018, 2:04 AM
hi
t

thymecypher

07/31/2018, 2:05 AM
MainActivity.kt
Replace
Copy code
import com.example.neube.smartdrive.device.components.SmartDriveDriver
import com.example.neube.smartdrive.device.components.SmartDriveDriver.MotorNumber
with
Copy code
import com.example.neube.smartdrive.device.components.SmartDriveDriver.*
import com.example.neube.smartdrive.device.components.SmartDriveDriver.MotorNumber.*
n

neuber

07/31/2018, 2:07 AM
I think you not understood
I want to pass two parameters simultaneously instead of one fan.motornumber.direction = MotorNumber.Two.Direction.Right and not fan.motornumber= MotorNumber.Two
t

thymecypher

07/31/2018, 2:10 AM
You can't assign two values with one statement like that.
There are lengthy ways but I wouldn't recommend them.
n

neuber

07/31/2018, 2:15 AM
Please, what is the best way for me to do this?