This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO add <meta-data android:value="GlideModule" android:name="....OkHttpProgressGlideModule" /> | |
// TODO add <meta-data android:value="GlideModule" tools:node="remove" android:name="com.bumptech.glide.integration.okhttp.OkHttpGlideModule" /> | |
// or not use 'okhttp@aar' in Gradle depdendencies | |
public class OkHttpProgressGlideModule implements GlideModule { | |
@Override public void applyOptions(Context context, GlideBuilder builder) { } | |
@Override public void registerComponents(Context context, Glide glide) { | |
OkHttpClient client = new OkHttpClient(); | |
client.networkInterceptors().add(createInterceptor(new DispatchingProgressListener())); | |
glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(client)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChipsView<T : Parcelable>(ctx: Context, attr: AttributeSet) : ConstraintLayout(ctx, attr) { | |
... | |
private fun addSubviews() { | |
val flow = Flow(context).apply { | |
id = generateViewId() | |
setWrapMode(Flow.WRAP_CHAIN) | |
setHorizontalStyle(Flow.CHAIN_PACKED) | |
setHorizontalAlign(Flow.HORIZONTAL_ALIGN_START) | |
setHorizontalBias(0f) |