Skip to content

Instantly share code, notes, and snippets.

@monkeydone
Created July 16, 2020 12:22
Show Gist options
  • Save monkeydone/59e2264f561032d4bc1c2a04bd714798 to your computer and use it in GitHub Desktop.
Save monkeydone/59e2264f561032d4bc1c2a04bd714798 to your computer and use it in GitHub Desktop.
#注解使用
@IntDef({ALIGN_BOTTOM, ALIGN_BASELINE, ALIGN_TOP, ALIGN_CENTER})
@Retention(RetentionPolicy.SOURCE)
public @interface Alignment {
}
public AlignImageSpan(Drawable d, @Alignment int verticalAlignment) {
super(d, verticalAlignment);
}
val span: ImageSpan = AlignImageSpan(drawable, AlignImageSpan.ALIGN_CENTER)
@monkeydone
Copy link
Author

monkeydone commented Aug 25, 2020

implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.47'

maven { url "https://jitpack.io" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment