I have a ScrollView, in it a TextView is created programmatically with text and images, which is taken from a string.xml file. In this way:
spanned = Html.fromHtml(byIdName(getContext(), text), new Html.ImageGetter() { public Drawable getDrawable(String source) { Resources resources = getContext().getResources(); int identifier = resources.getIdentifier(source, "drawable", getContext().getPackageName()); Drawable res = resources.getDrawable(identifier); res.setBounds(0, 0, px, hx); return res; } }, null);
And if there are more than four pictures, then when the fifth one is on the screen, scrolling (scrolling) starts to slow down unpleasantly. When the fifth (or subsequent) picture goes off the screen, the scrolling is smooth again. With the first four pictures there is no such problem.
I can’t get to the bottom, what’s the matter and how can I fix it?