Remove initializeScrollBars () from custom view in Android API level 21

I have one custom class that has initializeScrollBars () in its constructor.

This method has been removed in API 21, so I cannot build an application on Lollipop 5.0. I searched and found that android does not officially exist.

( https://developer.android.com/sdk/api_diff/21/changes/android.view.View.html ).

I checked this link: initializeScrollbars undefined? and noticed that one developer suggests that we remove this method and let it define R.styleable.View_scrollbars attr in the View class, which is not internal.

I just do not understand.

Google answered this question as:

"The API was removed because R.styleable is not public or stable. There is no safe way to pass a TypedArray to this method. Do not call the method." (Link: https://github.com/GDG-Korea/PinterestLikeAdapterView/issues/31 )

  • Can anyone please guide me on how to remove the initializeScrollbars () method from the custom view?

  • Is it possible to just remove initializeScrollbars () from the constructor?

  • What is the best way to initialize custom view scrollbars?

+3


source to share





All Articles