diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java index 64526741..cc5d596b 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java @@ -181,7 +181,6 @@ class TopicAdapter extends RecyclerView.Adapter { //Post's WebView parameters holder.post.setClickable(true); holder.post.setWebViewClient(new LinkLauncher()); - holder.post.setLayerType(View.LAYER_TYPE_SOFTWARE, null); //Avoids errors about layout having 0 width/height holder.thumbnail.setMinimumWidth(1); @@ -484,6 +483,14 @@ class TopicAdapter extends RecyclerView.Adapter { //notifyDataSetChanged(); } + //Fix for WebView not rendering with Hardware Acceleration + @Override + public void onViewAttachedToWindow(RecyclerView.ViewHolder holder) { + super.onViewAttachedToWindow(holder); + if (holder instanceof PostViewHolder) + ((PostViewHolder) holder).post.reload(); + } + @Override public int getItemCount() { return postsList.size();