Closed carmas123 closed 7 years ago
A workaround is to wrap those calls using a java class.
public class MaterialScrollBarHack
{
// Hack to make widget work
public static void Helper(Context context, RecyclerView recyclerView)
{
DragScrollBar materialScrollBar = new DragScrollBar(context, recyclerView, true);
materialScrollBar.setHandleColour(ContextCompat.getColor(context, R.color.colorPrimary));
materialScrollBar.addIndicator(new CustomIndicator(context), true);
}
}
// Call this in Kotlin
MaterialScrollBarHack.Helper(context, recyclerView)
Hi, if you try to use MaterialScrollBar with Kotlin and try to call method addIndicator(indicator, false) or other DragScrollBar methods you got an error:
java.lang.IllegalAccessError: Illegal class access: 'com.example.app.BaseListFragment' attempting to access 'com.turingtechnologies.materialscrollbar.Indicator'