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
android android-5.0-lollipop


source to share


No one has answered this question yet

See similar questions:

8
initializeScrollbars undefined?
1
Android: enable scrollbars in canvas mode

or similar:

815
Android "Only the original thread that created the view hierarchy can touch its views."
666
Android getResources (). GetDrawable () deprecated API 22
545
Extract Android software version
402
Launching custom android app from android browser
305
Changing the Android Studio API Level
202
Android: remove left margin from custom layout
96
How to use the new SD Card Access API introduced for Android 5.0 (Lollipop)?
33
Android custom view constructor
1
How to create a new Custom View object
0
Is there really no clean way to programmatically add scrollbars to a custom view?



All Articles
Loading...
X
Show
Funny
Dev
Pics