Code quality goodifier, RAM saver, performance watcher, mood upgrader, vector drawable optimizer, color previewer.
- Atomic can be replaced with volatile
- Allocation should be cached (new Gson(), new OkHttpClient())
BigDecimal|BigInteger
instantiation can be replaced with constant by stokito(BigDecimal|BigInteger).compareTo(ZERO)
can be replaced withsignum()
by stokito
- Heavyweight property delegation
- Declaration name is Java keyword
- Inline function leaks anonymous declaration which will be inlined to the call-site if called from another module
- Anonymous function won't be inlined; function cannot be inlined if it is a receiver of an extension function
Nullable argument to string concatenationshould be re-implemented in more reliable way- Boxed primitive array allocation
<include layout="?themeAttribute">
requires Marshmallow<drawable android:tint>
requires Lollipop<layer-list><item android:gravity>
requires Marshmallow@TargetApi
should be replaced with@RequiresApi
- Use of reflective
ObjectAnimator
/PropertyValuesHolder
- Use of attributes like
android.R.attr.enabled
in context where state attributes expected, likeandroid.R.attr.state_enabled
Color.parseColor(<constant expression>)
should be replaced with an integer literal- Useless resource element
- Drawables: single-item layer-lists, single stateless item selectors, insetless insets, empty shapes
- Vector drawables: empty paths and clip-paths, invisible paths, useless clip-paths and groups, attributes with no effect
- Animations and animators: empty and single-element sets
- Layouts: overridden attributes in (layout_margin|padding)(Left|Top|Right|Bottom|Start|End|Horizontal|Vertical|*)
- Android utility methods should be replaced with Kotlin extensions
setOnClickListener
doesn't work onRecyclerView
, onVideoView
before API 26- Kotlin Android Extensions are deprecated
- Drawable subclass should override
getConstantState()
Activity#onCreate(, PersistableBundle)
will highly likely not be called<AnyScrollableView>
should have an ID to save its scroll position
- Inlay hints when upcasting to interface, e. g.
putExtra(listas Serializable
) - Inlay hints when overriding an interface method, e. g.
@Overridefrom Runnable
,
override funRunnable.
run() - ARGB Color swatches in gutter, folding int literals to
#[AA]RRGGBB
, color picker for Android, pasting CSS colors as int literals - Backing property folding for Kotlin
- Live templates for SVG and Android Vector Drawable pathData
- Live templates for implementing
Property
forObjectAnimator