Fixed
Status Update
Comments
uc...@google.com <uc...@google.com>
ni...@google.com <ni...@google.com>
da...@google.com <da...@google.com> #2
Yes, this is working as designed, although we can probably make it less confusing.
See also:https://developer.android.com/topic/libraries/data-binding/expressions#data_object (and switch over to the Java example). Specifically, this: "The expression @{user.firstName} used for the android:text attribute accesses the ... getFirstName() method in the latter class."
Dev note: If you write "getStdAvgPrice" in Java and call it from Kotlin, the popup shows 'stdAvgPrice (from getStdAvgPrice())' Probably we should do something like that instead of showing "getStdAvgPrice" but inserting something different.
Kainan: Anything to add?
See also:
Dev note: If you write "getStdAvgPrice" in Java and call it from Kotlin, the popup shows 'stdAvgPrice (from getStdAvgPrice())' Probably we should do something like that instead of showing "getStdAvgPrice" but inserting something different.
Kainan: Anything to add?
kn...@google.com <kn...@google.com> #3
Starting from 3.5 beta, getter methods(e.g. getFirstName()) will be replaced with fields(e.g. firstName) both in suggestions and actual completion text.
pe...@google.com <pe...@google.com>
da...@google.com <da...@google.com> #4
I just looked at the IntelliJ APIs and I see how to do this. Should be pretty straightforward; will work on it super quick.
da...@google.com <da...@google.com> #5
Fix should land in 3.6 Canary 7
========================
Using Roar's original example
EnterpriseStat.java:
class EnterpriseStat {
String getAvgStatPrice();
}
and you write your data banding expression:
whatever_layout.xml:
"@{enterpriseStat.<caret>}"
you should see the following completion element in your popup:
"avgStatPrice (from getAvgStatPrice())"
and when you select it, it inserts "avgStatPrice", which is the behavior originally filed, but hopefully now makes more sense.
Roar, after 3.6 canary 7, please ping this bug if this either isn't working for you functionally, or it's working but the behavior isn't clear. Thank you!
========================
Using Roar's original example
EnterpriseStat.java:
class EnterpriseStat {
String getAvgStatPrice();
}
and you write your data banding expression:
whatever_layout.xml:
"@{enterpriseStat.<caret>}"
you should see the following completion element in your popup:
"avgStatPrice (from getAvgStatPrice())"
and when you select it, it inserts "avgStatPrice", which is the behavior originally filed, but hopefully now makes more sense.
Roar, after 3.6 canary 7, please ping this bug if this either isn't working for you functionally, or it's working but the behavior isn't clear. Thank you!
Description
AI-191.6183.87.35.5471097, JRE 1.8.0_202-release-1483-b01x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1600x900, 1920x1080
AS: 3.5 Canary 12; Android Gradle Plugin: 3.5.0-alpha12; Gradle: 5.3.1; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
IMPORTANT: Please read
---
When working with bindings in xml layout, the setter and getter functions are shown as suggestions, not the actual variables. Clicking the getter, the actual variable is inserted not the getter.
Trying to enter getter mnemonic ( getVariable()) , the suggestion disappears
Is this by design (was not like this in AS3.4Cx) ?
See pictures
(Concise?: You should show VARIABLE and setter, not getter...)
RG