|
@ -6,7 +6,6 @@ import android.graphics.Typeface; |
|
|
import android.os.Build; |
|
|
import android.os.Build; |
|
|
import android.os.Bundle; |
|
|
import android.os.Bundle; |
|
|
import android.support.v7.widget.RecyclerView; |
|
|
import android.support.v7.widget.RecyclerView; |
|
|
import android.text.Html; |
|
|
|
|
|
import android.view.LayoutInflater; |
|
|
import android.view.LayoutInflater; |
|
|
import android.view.View; |
|
|
import android.view.View; |
|
|
import android.view.ViewGroup; |
|
|
import android.view.ViewGroup; |
|
@ -232,9 +231,10 @@ class BoardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { |
|
|
}); |
|
|
}); |
|
|
topicViewHolder.topicSubject.setTypeface(Typeface.createFromAsset(context.getAssets() |
|
|
topicViewHolder.topicSubject.setTypeface(Typeface.createFromAsset(context.getAssets() |
|
|
, "fonts/fontawesome-webfont.ttf")); |
|
|
, "fonts/fontawesome-webfont.ttf")); |
|
|
String lockedSticky = topic.isUnread() ? |
|
|
topicViewHolder.topicUnreadDot.setTypeface(Typeface.createFromAsset(context.getAssets(), "fonts/fontawesome-webfont.ttf")); |
|
|
Html.fromHtml("<font size=\"1\" color=\""+ context.getResources().getColor(R.color.accent) + "\">" + context.getString(R.string.fa_circle) + "</font> ").toString() : ""; |
|
|
if (topic.isUnread()) |
|
|
lockedSticky += topic.getSubject(); |
|
|
topicViewHolder.topicUnreadDot.setVisibility(View.VISIBLE); |
|
|
|
|
|
String lockedSticky = topic.getSubject(); |
|
|
if (topic.isLocked()) |
|
|
if (topic.isLocked()) |
|
|
lockedSticky += " " + context.getResources().getString(R.string.fa_lock); |
|
|
lockedSticky += " " + context.getResources().getString(R.string.fa_lock); |
|
|
if (topic.isSticky()) { |
|
|
if (topic.isSticky()) { |
|
@ -290,7 +290,7 @@ class BoardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { |
|
|
|
|
|
|
|
|
private static class TopicViewHolder extends RecyclerView.ViewHolder { |
|
|
private static class TopicViewHolder extends RecyclerView.ViewHolder { |
|
|
final LinearLayout topicRow, topicExpandable; |
|
|
final LinearLayout topicRow, topicExpandable; |
|
|
final TextView topicSubject, topicStartedBy, topicStats, topicLastPost; |
|
|
final TextView topicSubject, topicStartedBy, topicStats, topicLastPost, topicUnreadDot; |
|
|
final ImageButton showHideExpandable; |
|
|
final ImageButton showHideExpandable; |
|
|
|
|
|
|
|
|
TopicViewHolder(View topic) { |
|
|
TopicViewHolder(View topic) { |
|
@ -298,6 +298,7 @@ class BoardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { |
|
|
topicRow = topic.findViewById(R.id.topic_row_linear); |
|
|
topicRow = topic.findViewById(R.id.topic_row_linear); |
|
|
topicExpandable = topic.findViewById(R.id.topic_expandable); |
|
|
topicExpandable = topic.findViewById(R.id.topic_expandable); |
|
|
showHideExpandable = topic.findViewById(R.id.topic_expand_collapse_button); |
|
|
showHideExpandable = topic.findViewById(R.id.topic_expand_collapse_button); |
|
|
|
|
|
topicUnreadDot = topic.findViewById(R.id.topic_unread_dot); |
|
|
topicSubject = topic.findViewById(R.id.topic_subject); |
|
|
topicSubject = topic.findViewById(R.id.topic_subject); |
|
|
topicStartedBy = topic.findViewById(R.id.topic_started_by); |
|
|
topicStartedBy = topic.findViewById(R.id.topic_started_by); |
|
|
topicStats = topic.findViewById(R.id.topic_stats); |
|
|
topicStats = topic.findViewById(R.id.topic_stats); |
|
|