robinhood / ticker

An Android text view with scrolling text change animation
https://medium.com/robinhood-engineering/hello-ticker-20eaf6e51689
Apache License 2.0
4.38k stars 462 forks source link

No Autocompletion on Styleable Attributes #75

Closed naturalwarren closed 6 years ago

naturalwarren commented 6 years ago

I was using Ticker and noticed that I'm not getting autocomplete in Android Studio 3.0.1 on styleable attributes. I dug in a little bit and discovered that because <declare-styleable name="ticker_TickerView"> isn't named the same as its custom view class Studio can't autocomplete. There's a standard lint shipped for this:

https://android.googlesource.com/platform/tools/base/+/master/lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/CustomViewDetector.java

73 introduces a backwards incompatible change in preparation for a major release. Would you be open to a PR that renames the XML tag for v2.0.0? This change should be compile time safe and prompt folks to update their XML/source.

jinatonic commented 6 years ago

Ah, good catch, I've noticed that before but never spent the time to figure out why the autocompletion isn't working lol.. feel free to open PR.