Conversation
Now it can run on Android Studio 3.4 And Android Pie(9)
| val selected = mSelectedItems | ||
| val removed = mRemovedItems | ||
| if (selected is Serializable) { | ||
| if (true) { |
There was a problem hiding this comment.
Why not remove this line and 330?
There was a problem hiding this comment.
Android Studio tell me it is always true
There was a problem hiding this comment.
if (true) {
putSerializable(STATE_SELECTED, selected)
}
... is the same as ...
putSerializable(STATE_SELECTED, selected)
just remove the if condition
| toX: Int, toY: Int): Boolean { | ||
| var fromX = fromX | ||
| var fromY = fromY | ||
| var fx = fromX |
There was a problem hiding this comment.
inconsistent variable naming: Before there was fromX and toX. Now it is fx and toX. I suggest reverting back to the old naming style
There was a problem hiding this comment.
Android Studio:Name shadowed: fromX
There was a problem hiding this comment.
Ah, I overlooked the parameter names. However, that warning won't create issues in this code. You could attach @Suppress("NAME_SHADOWING") to those 2 variables.
Technically the old 194 - 195 code could have been named better as the fromX and fromY variables are modified in the code. Maybe something like _fromX and _fromY
Regardless, the names of fx and fy don't fit the variable naming standard and should be changed
|
update code |
see commit
it can build by Android Studio 3.4 and run on Android pie