Set focus on the header section if there's a changelog

This commit is contained in:
wsdfhjxc 2018-08-15 22:23:13 +02:00
parent 10e275037b
commit 0af7c18750

View File

@ -437,6 +437,10 @@ public class AppDetailsRecyclerViewAdapter
sbWhatsNew.append(app.whatsNew); sbWhatsNew.append(app.whatsNew);
whatsNewView.setText(sbWhatsNew); whatsNewView.setText(sbWhatsNew);
whatsNewView.setVisibility(View.VISIBLE); whatsNewView.setVisibility(View.VISIBLE);
// Set focus on the header section to prevent auto scrolling to
// the changelog if its content becomes too long to fit on screen.
recyclerView.requestChildFocus(itemView, itemView);
} }
final Spanned desc = Html.fromHtml(app.description, null, new Utils.HtmlTagHandler()); final Spanned desc = Html.fromHtml(app.description, null, new Utils.HtmlTagHandler());
descriptionView.setMovementMethod(LinkMovementMethod.getInstance()); descriptionView.setMovementMethod(LinkMovementMethod.getInstance());