dji-sdk / Mobile-SDK-Android

DJI Mobile SDK for Android: http://developer.dji.com/mobile-sdk/
Other
972 stars 580 forks source link

ExpandableListAdapter.java code change inquiry #521

Open Jai-GAY opened 4 years ago

Jai-GAY commented 4 years ago

why change to this convertView.setOnClickListener(v -> { from this convertView.setOnClickListener(new View.OnClickListener() {

Change log

dji-dev commented 4 years ago

Agent comment from William Wong in Zendesk ticket #34273:

Dear Client Thank you for contacting DJI.

Hi, 4.12 version is release and there are many changes now. Please update your sdk version to 4.12 and have a look to the change log please.

Hopefully our solution can help you. Kindly Regards, DJI Developer Support

Jai-GAY commented 4 years ago

OK, I got the latest 4.12 version, still, it did not mention where the v come from?

Do you mean the change log from here? If no, could you guide me the change log explanation towards this file changes?

dji-dev commented 4 years ago

Agent comment from William Wong in Zendesk ticket #34273:

Dear Client Thank you for contacting DJI.

I think the v-> is just a short form of the previous expression. Becasue the previous expression is too long, just fold it to a short form. Their behaviour is the same.

Hopefully our solution can help you. Kindly Regards, DJI Developer Support

Jai-GAY commented 4 years ago

I see, then I do not see the necessity to confuse the users where other lines are still using the long form

luoyexk commented 4 years ago

https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html#lambda-expressions-in-gui-applications

Jai-GAY commented 4 years ago

Anyway. Note that Android does not support the serialization of lambda expressions. What is lambda expression?

I suggest reverting back the codes.