Repository navigation
Test activity for gestures manager - #11449
Conversation
| </application> | ||
|
|
||
| </manifest> | ||
| </manifest> No newline at end of file |
There was a problem hiding this comment.
I think we need to sync our checkstyle configuration for the formatter. To remove the unnecessary changes introduced in this file.
There was a problem hiding this comment.
I thought it's a good time as any other to actually fix the formatting of the Manifest file. Let me know if you'd still rather like to adjust the checkstyle configuration.
| private AndroidGesturesManager gesturesManager; | ||
|
|
||
| private Marker marker = null; | ||
| private LatLng focalPointLatLng = null; |
There was a problem hiding this comment.
Do you think null initialization makes it clearer that this value will be nullified in the future to reflect its state? That was my intent here.
There was a problem hiding this comment.
I'm onboard if that is your way of showing that. For me the final keyword is the one that forces and notifies that something won't be set to null. In any case this is more about code style preference than technical reasoning.
There was a problem hiding this comment.
thinking about this, you could also add @Nullable annotation to force null checks with lint
|
|
||
| import static java.lang.annotation.RetentionPolicy.SOURCE; | ||
|
|
||
| public class GestureDetectorActivity extends AppCompatActivity { |
There was a problem hiding this comment.
could you add some class level javadoc on what this test activity is testing?
eg.
/**
* Test activity showcasing the data driven runtime style API.
*/
| if (alert.getAlertType() == GestureAlert.TYPE_PROGRESS && gestureAlert.equals(alert)) { | ||
| return; | ||
| } | ||
| } |
There was a problem hiding this comment.
not actionable but flagging that code for loops as above with inclusion of break/return increases cyclomatic complexity. This makes reading the code more difficult as it makes predicting the outcome harder.
There was a problem hiding this comment.
Interesting, thanks for pointing this out.
c8ec80f to
fb0e233
Compare
Closes #11406.
This activity can gradually expand as we add more features through the gestures library and
MapGestureDetector.