Browse Source

BoardActivity style changes

pull/24/head
Apostolos Fanakis 8 years ago
parent
commit
6895b46f70
  1. 11
      app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java
  2. 116
      app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardAdapter.java
  3. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsAdapter.java
  4. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsFragment.java
  5. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/profile/stats/StatsFragment.java
  6. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/profile/summary/SummaryFragment.java
  7. BIN
      app/src/main/res/drawable-hdpi/ic_arrow_drop_down.png
  8. BIN
      app/src/main/res/drawable-hdpi/ic_arrow_drop_up.png
  9. BIN
      app/src/main/res/drawable-hdpi/ic_pin.png
  10. BIN
      app/src/main/res/drawable-mdpi/ic_arrow_drop_down.png
  11. BIN
      app/src/main/res/drawable-mdpi/ic_arrow_drop_up.png
  12. BIN
      app/src/main/res/drawable-mdpi/ic_pin.png
  13. BIN
      app/src/main/res/drawable-xhdpi/ic_arrow_drop_down.png
  14. BIN
      app/src/main/res/drawable-xhdpi/ic_arrow_drop_up.png
  15. BIN
      app/src/main/res/drawable-xhdpi/ic_pin.png
  16. BIN
      app/src/main/res/drawable-xxhdpi/ic_arrow_drop_down.png
  17. BIN
      app/src/main/res/drawable-xxhdpi/ic_arrow_drop_up.png
  18. BIN
      app/src/main/res/drawable-xxhdpi/ic_pin.png
  19. BIN
      app/src/main/res/drawable-xxxhdpi/ic_arrow_drop_down.png
  20. BIN
      app/src/main/res/drawable-xxxhdpi/ic_arrow_drop_up.png
  21. BIN
      app/src/main/res/drawable-xxxhdpi/ic_pin.png
  22. 45
      app/src/main/res/layout/activity_board_sub_board.xml
  23. 39
      app/src/main/res/layout/activity_board_topic.xml
  24. 0
      app/src/main/res/layout/fragment_latest_posts.xml
  25. 0
      app/src/main/res/layout/fragment_latest_posts_row.xml
  26. 0
      app/src/main/res/layout/fragment_stats.xml
  27. 0
      app/src/main/res/layout/fragment_summary.xml
  28. 3
      app/src/main/res/values/strings.xml

11
app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardActivity.java

@ -45,7 +45,6 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo
private MaterialProgressBar progressBar; private MaterialProgressBar progressBar;
private BoardTask boardTask; private BoardTask boardTask;
private RecyclerView mainContent;
private BoardAdapter boardAdapter; private BoardAdapter boardAdapter;
private final ArrayList<Board> parsedSubBoards = new ArrayList<>(); private final ArrayList<Board> parsedSubBoards = new ArrayList<>();
private final ArrayList<Topic> parsedTopics = new ArrayList<>(); private final ArrayList<Topic> parsedTopics = new ArrayList<>();
@ -77,7 +76,7 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo
createDrawer(); createDrawer();
boardAdapter = new BoardAdapter(getApplicationContext(), parsedSubBoards, parsedTopics); boardAdapter = new BoardAdapter(getApplicationContext(), parsedSubBoards, parsedTopics);
mainContent = (RecyclerView) findViewById(R.id.board_recycler_view); RecyclerView mainContent = (RecyclerView) findViewById(R.id.board_recycler_view);
mainContent.setAdapter(boardAdapter); mainContent.setAdapter(boardAdapter);
final LinearLayoutManager layoutManager = new LinearLayoutManager(this); final LinearLayoutManager layoutManager = new LinearLayoutManager(this);
mainContent.setLayoutManager(layoutManager); mainContent.setLayoutManager(layoutManager);
@ -167,8 +166,7 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo
++pagesLoaded; ++pagesLoaded;
//Parse was successful //Parse was successful
progressBar.setVisibility(ProgressBar.INVISIBLE); progressBar.setVisibility(ProgressBar.INVISIBLE);
boardAdapter = new BoardAdapter(getApplicationContext(), parsedSubBoards, parsedTopics); boardAdapter.notifyDataSetChanged();
mainContent.swapAdapter(boardAdapter, false);
isLoadingMore = false; isLoadingMore = false;
} }
@ -225,15 +223,14 @@ public class BoardActivity extends BaseActivity implements BoardAdapter.OnLoadMo
String pTopicUrl, pSubject, pStartedBy, pLastPost, pStats; String pTopicUrl, pSubject, pStartedBy, pLastPost, pStats;
boolean pLocked = false, pSticky = false; boolean pLocked = false, pSticky = false;
Elements topicColumns = topicRow.select(">td"); Elements topicColumns = topicRow.select(">td");
//if (topicColumns.size() != 7) return false;
{ {
Element column = topicColumns.get(2); Element column = topicColumns.get(2);
Element tmp = column.select("span[id^=msg_] a").first(); Element tmp = column.select("span[id^=msg_] a").first();
pTopicUrl = tmp.attr("href"); pTopicUrl = tmp.attr("href");
pSubject = tmp.text(); pSubject = tmp.text();
if (topicColumns.get(1).select("img[id^=stickyicon]").first() != null) if (column.select("img[id^=stickyicon]").first() != null)
pSticky = true; pSticky = true;
if (topicColumns.get(1).select("img[id^=lockicon]").first() != null) if (column.select("img[id^=lockicon]").first() != null)
pLocked = true; pLocked = true;
} }
pStartedBy = topicColumns.get(3).text(); pStartedBy = topicColumns.get(3).text();

116
app/src/main/java/gr/thmmy/mthmmy/activities/board/BoardAdapter.java

@ -9,6 +9,7 @@ import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
@ -40,6 +41,8 @@ class BoardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private final Context context; private final Context context;
private ArrayList<Board> parsedSubBoards = new ArrayList<>(); private ArrayList<Board> parsedSubBoards = new ArrayList<>();
private ArrayList<Topic> parsedTopics = new ArrayList<>(); private ArrayList<Topic> parsedTopics = new ArrayList<>();
private final ArrayList<Boolean> boardExpandableVisibility = new ArrayList<>();
private final ArrayList<Boolean> topicExpandableVisibility = new ArrayList<>();
BoardAdapter(Context context, ArrayList<Board> parsedSubBoards, ArrayList<Topic> parsedTopics) { BoardAdapter(Context context, ArrayList<Board> parsedSubBoards, ArrayList<Topic> parsedTopics) {
this.context = context; this.context = context;
@ -119,6 +122,11 @@ class BoardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
final Board subBoard = parsedSubBoards.get(position - 1); final Board subBoard = parsedSubBoards.get(position - 1);
final SubBoardViewHolder subBoardViewHolder = (SubBoardViewHolder) holder; final SubBoardViewHolder subBoardViewHolder = (SubBoardViewHolder) holder;
if (boardExpandableVisibility.size() != parsedSubBoards.size()) {
for (int i = boardExpandableVisibility.size(); i < parsedSubBoards.size(); ++i)
boardExpandableVisibility.add(false);
}
subBoardViewHolder.boardRow.setOnClickListener(new View.OnClickListener() { subBoardViewHolder.boardRow.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@ -131,14 +139,40 @@ class BoardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
context.startActivity(intent); context.startActivity(intent);
} }
}); });
if (boardExpandableVisibility.get(subBoardViewHolder.getAdapterPosition() - 1)) {
subBoardViewHolder.boardExpandable.setVisibility(View.VISIBLE);
subBoardViewHolder.showHideExpandable.setImageResource(R.drawable.ic_arrow_drop_up);
} else {
subBoardViewHolder.boardExpandable.setVisibility(View.GONE);
subBoardViewHolder.showHideExpandable.setImageResource(R.drawable.ic_arrow_drop_down);
}
subBoardViewHolder.showHideExpandable.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
final boolean visible = boardExpandableVisibility.get(subBoardViewHolder.getAdapterPosition() - 1);
if (visible) {
subBoardViewHolder.boardExpandable.setVisibility(View.GONE);
subBoardViewHolder.showHideExpandable.setImageResource(R.drawable.ic_arrow_drop_down);
} else {
subBoardViewHolder.boardExpandable.setVisibility(View.VISIBLE);
subBoardViewHolder.showHideExpandable.setImageResource(R.drawable.ic_arrow_drop_up);
}
boardExpandableVisibility.set(subBoardViewHolder.getAdapterPosition() - 1, !visible);
}
});
subBoardViewHolder.boardTitle.setText(subBoard.getTitle()); subBoardViewHolder.boardTitle.setText(subBoard.getTitle());
subBoardViewHolder.boardMods.setText(context.getString(R.string.child_board_mods, subBoard.getMods())); subBoardViewHolder.boardMods.setText(subBoard.getMods());
subBoardViewHolder.boardStats.setText(subBoard.getStats()); subBoardViewHolder.boardStats.setText(subBoard.getStats());
subBoardViewHolder.boardLastPost.setText(subBoard.getLastPost()); subBoardViewHolder.boardLastPost.setText(subBoard.getLastPost());
} else if (holder instanceof TopicViewHolder) { } else if (holder instanceof TopicViewHolder) {
final Topic topic = parsedTopics.get(position - parsedSubBoards.size() - 1 - 1); final Topic topic = parsedTopics.get(position - parsedSubBoards.size() - 1 - 1);
final TopicViewHolder topicViewHolder = (TopicViewHolder) holder; final TopicViewHolder topicViewHolder = (TopicViewHolder) holder;
if (topicExpandableVisibility.size() != parsedTopics.size()) {
for (int i = topicExpandableVisibility.size(); i < parsedTopics.size(); ++i)
topicExpandableVisibility.add(false);
}
topicViewHolder.topicRow.setOnClickListener(new View.OnClickListener() { topicViewHolder.topicRow.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@ -151,13 +185,40 @@ class BoardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
context.startActivity(intent); context.startActivity(intent);
} }
}); });
topicViewHolder.topicSubject.setText(topic.getSubject()); if (topicExpandableVisibility.get(topicViewHolder.getAdapterPosition() - parsedSubBoards
String lockedSticky = ""; .size() - 2)) {
topicViewHolder.topicExpandable.setVisibility(View.VISIBLE);
topicViewHolder.showHideExpandable.setImageResource(R.drawable.ic_arrow_drop_up);
} else {
topicViewHolder.topicExpandable.setVisibility(View.GONE);
topicViewHolder.showHideExpandable.setImageResource(R.drawable.ic_arrow_drop_down);
}
topicViewHolder.showHideExpandable.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
final boolean visible = topicExpandableVisibility.get(topicViewHolder.
getAdapterPosition() - parsedSubBoards.size() - 2);
if (visible) {
topicViewHolder.topicExpandable.setVisibility(View.GONE);
topicViewHolder.showHideExpandable.setImageResource(R.drawable.ic_arrow_drop_down);
} else {
topicViewHolder.topicExpandable.setVisibility(View.VISIBLE);
topicViewHolder.showHideExpandable.setImageResource(R.drawable.ic_arrow_drop_up);
}
topicExpandableVisibility.set(topicViewHolder.getAdapterPosition() -
parsedSubBoards.size() - 2, !visible);
}
});
topicViewHolder.topicSubject.setTypeface(Typeface.createFromAsset(context.getAssets()
, "fonts/fontawesome-webfont.ttf"));
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()) {
lockedSticky += context.getResources().getString(R.string.fa_sticky); //topicViewHolder.topicSubject.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_pin, 0);
topicViewHolder.topicLockedSticky.setText(lockedSticky); lockedSticky += " " + context.getResources().getString(R.string.fa_sticky);
}
topicViewHolder.topicSubject.setText(lockedSticky);
topicViewHolder.topicStartedBy.setText(context.getString(R.string.topic_started_by, topic.getStarter())); topicViewHolder.topicStartedBy.setText(context.getString(R.string.topic_started_by, topic.getStarter()));
topicViewHolder.topicStats.setText(topic.getStats()); topicViewHolder.topicStats.setText(topic.getStats());
topicViewHolder.topicLastPost.setText(context.getString(R.string.topic_last_post, topic.getLastPost())); topicViewHolder.topicLastPost.setText(context.getString(R.string.topic_last_post, topic.getLastPost()));
@ -176,31 +237,36 @@ class BoardAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
} }
private static class SubBoardViewHolder extends RecyclerView.ViewHolder { private static class SubBoardViewHolder extends RecyclerView.ViewHolder {
final LinearLayout boardRow; final LinearLayout boardRow, boardExpandable;
final TextView boardTitle, boardMods, boardStats, boardLastPost; final TextView boardTitle, boardMods, boardStats, boardLastPost;
final ImageButton showHideExpandable;
SubBoardViewHolder(View itemView) { SubBoardViewHolder(View board) {
super(itemView); super(board);
boardRow = (LinearLayout) itemView.findViewById(R.id.child_board_row); boardRow = (LinearLayout) board.findViewById(R.id.child_board_row);
boardTitle = (TextView) itemView.findViewById(R.id.child_board_title); boardExpandable = (LinearLayout) board.findViewById(R.id.child_board_expandable);
boardMods = (TextView) itemView.findViewById(R.id.child_board_mods); showHideExpandable = (ImageButton) board.findViewById(R.id.child_board_expand_collapse_button);
boardStats = (TextView) itemView.findViewById(R.id.child_board_stats); boardTitle = (TextView) board.findViewById(R.id.child_board_title);
boardLastPost = (TextView) itemView.findViewById(R.id.child_board_last_post); boardMods = (TextView) board.findViewById(R.id.child_board_mods);
boardStats = (TextView) board.findViewById(R.id.child_board_stats);
boardLastPost = (TextView) board.findViewById(R.id.child_board_last_post);
} }
} }
private static class TopicViewHolder extends RecyclerView.ViewHolder { private static class TopicViewHolder extends RecyclerView.ViewHolder {
final LinearLayout topicRow; final LinearLayout topicRow, topicExpandable;
final TextView topicSubject, topicLockedSticky, topicStartedBy, topicStats, topicLastPost; final TextView topicSubject, topicStartedBy, topicStats, topicLastPost;
final ImageButton showHideExpandable;
TopicViewHolder(View itemView) { TopicViewHolder(View topic) {
super(itemView); super(topic);
topicRow = (LinearLayout) itemView.findViewById(R.id.topic_row_linear); topicRow = (LinearLayout) topic.findViewById(R.id.topic_row_linear);
topicSubject = (TextView) itemView.findViewById(R.id.topic_subject); topicExpandable = (LinearLayout) topic.findViewById(R.id.topic_expandable);
topicLockedSticky = (TextView) itemView.findViewById(R.id.topic_locked_sticky); showHideExpandable = (ImageButton) topic.findViewById(R.id.topic_expand_collapse_button);
topicStartedBy = (TextView) itemView.findViewById(R.id.topic_started_by); topicSubject = (TextView) topic.findViewById(R.id.topic_subject);
topicStats = (TextView) itemView.findViewById(R.id.topic_stats); topicStartedBy = (TextView) topic.findViewById(R.id.topic_started_by);
topicLastPost = (TextView) itemView.findViewById(R.id.topic_last_post); topicStats = (TextView) topic.findViewById(R.id.topic_stats);
topicLastPost = (TextView) topic.findViewById(R.id.topic_last_post);
} }
} }

2
app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsAdapter.java

@ -50,7 +50,7 @@ class LatestPostsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
if (viewType == VIEW_TYPE_ITEM) { if (viewType == VIEW_TYPE_ITEM) {
View view = LayoutInflater.from(parent.getContext()). View view = LayoutInflater.from(parent.getContext()).
inflate(R.layout.profile_fragment_latest_posts_row, parent, false); inflate(R.layout.fragment_latest_posts_row, parent, false);
return new LatestPostViewHolder(view); return new LatestPostViewHolder(view);
} else if (viewType == VIEW_TYPE_LOADING) { } else if (viewType == VIEW_TYPE_LOADING) {
View view = LayoutInflater.from(parent.getContext()). View view = LayoutInflater.from(parent.getContext()).

2
app/src/main/java/gr/thmmy/mthmmy/activities/profile/latestPosts/LatestPostsFragment.java

@ -87,7 +87,7 @@ public class LatestPostsFragment extends BaseFragment implements LatestPostsAdap
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.profile_fragment_latest_posts, container, false); final View rootView = inflater.inflate(R.layout.fragment_latest_posts, container, false);
latestPostsAdapter = new LatestPostsAdapter(fragmentInteractionListener, parsedTopicSummaries); latestPostsAdapter = new LatestPostsAdapter(fragmentInteractionListener, parsedTopicSummaries);
mainContent = (RecyclerView) rootView.findViewById(R.id.profile_latest_posts_recycler); mainContent = (RecyclerView) rootView.findViewById(R.id.profile_latest_posts_recycler);
mainContent.setAdapter(latestPostsAdapter); mainContent.setAdapter(latestPostsAdapter);

2
app/src/main/java/gr/thmmy/mthmmy/activities/profile/stats/StatsFragment.java

@ -94,7 +94,7 @@ public class StatsFragment extends Fragment {
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.profile_fragment_stats, container, false); final View rootView = inflater.inflate(R.layout.fragment_stats, container, false);
mainContent = (LinearLayout) rootView.findViewById(R.id.main_content); mainContent = (LinearLayout) rootView.findViewById(R.id.main_content);
progressBar = (MaterialProgressBar) rootView.findViewById(R.id.progressBar); progressBar = (MaterialProgressBar) rootView.findViewById(R.id.progressBar);
if (haveParsed) if (haveParsed)

2
app/src/main/java/gr/thmmy/mthmmy/activities/profile/summary/SummaryFragment.java

@ -78,7 +78,7 @@ public class SummaryFragment extends Fragment {
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
final View rootView = inflater.inflate(R.layout.profile_fragment_summary, container, false); final View rootView = inflater.inflate(R.layout.fragment_summary, container, false);
mainContent = (LinearLayout) rootView.findViewById(R.id.profile_activity_content); mainContent = (LinearLayout) rootView.findViewById(R.id.profile_activity_content);
if (!parsedProfileSummaryData.isEmpty()) if (!parsedProfileSummaryData.isEmpty())
populateLayout(); populateLayout();

BIN
app/src/main/res/drawable-hdpi/ic_arrow_drop_down.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

BIN
app/src/main/res/drawable-hdpi/ic_arrow_drop_up.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

BIN
app/src/main/res/drawable-hdpi/ic_pin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

BIN
app/src/main/res/drawable-mdpi/ic_arrow_drop_down.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

BIN
app/src/main/res/drawable-mdpi/ic_arrow_drop_up.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

BIN
app/src/main/res/drawable-mdpi/ic_pin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

BIN
app/src/main/res/drawable-xhdpi/ic_arrow_drop_down.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

BIN
app/src/main/res/drawable-xhdpi/ic_arrow_drop_up.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

BIN
app/src/main/res/drawable-xhdpi/ic_pin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

BIN
app/src/main/res/drawable-xxhdpi/ic_arrow_drop_down.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

BIN
app/src/main/res/drawable-xxhdpi/ic_arrow_drop_up.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

BIN
app/src/main/res/drawable-xxhdpi/ic_pin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

BIN
app/src/main/res/drawable-xxxhdpi/ic_arrow_drop_down.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

BIN
app/src/main/res/drawable-xxxhdpi/ic_arrow_drop_up.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

BIN
app/src/main/res/drawable-xxxhdpi/ic_pin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

45
app/src/main/res/layout/activity_board_sub_board.xml

@ -7,32 +7,54 @@
android:background="@color/card_background" android:background="@color/card_background"
android:clickable="true" android:clickable="true"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="10dp" android:paddingLeft="16dp"
android:paddingRight="10dp"> android:paddingRight="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:orientation="horizontal">
<TextView <TextView
android:id="@+id/child_board_title" android:id="@+id/child_board_title"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/child_board_title" android:text="@string/child_board_title"
android:textColor="@color/accent"/> android:textColor="@color/accent"
android:textSize="22sp"/>
<ImageButton
android:id="@+id/child_board_expand_collapse_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/card_background"
android:contentDescription="@string/child_board_button"
android:src="@drawable/ic_arrow_drop_down"/>
</LinearLayout>
<LinearLayout
android:id="@+id/child_board_expandable"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<TextView <TextView
android:id="@+id/child_board_mods" android:id="@+id/child_board_mods"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="7dp"
android:layout_marginRight="7dp"
android:text="@string/child_board_mods" android:text="@string/child_board_mods"
android:textColor="@color/secondary_text"/> android:textColor="@color/secondary_text"
android:textStyle="italic"/>
<TextView <TextView
android:id="@+id/child_board_stats" android:id="@+id/child_board_stats"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="7dp"
android:layout_marginRight="7dp"
android:text="@string/child_board_stats" android:text="@string/child_board_stats"
android:textColor="@color/secondary_text"/> android:textColor="@color/secondary_text"/>
@ -40,8 +62,7 @@
android:id="@+id/child_board_last_post" android:id="@+id/child_board_last_post"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="7dp"
android:layout_marginRight="7dp"
android:text="@string/child_board_last_post" android:text="@string/child_board_last_post"
android:textColor="@color/secondary_text"/> android:textColor="@color/secondary_text"/>
</LinearLayout> </LinearLayout>
</LinearLayout>

39
app/src/main/res/layout/activity_board_topic.xml

@ -6,36 +6,46 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="true" android:clickable="true"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="10dp" android:paddingLeft="16dp"
android:paddingRight="10dp"> android:paddingRight="16dp">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:id="@+id/topic_subject" android:id="@+id/topic_subject"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:text="@string/topic_subject" android:text="@string/topic_subject"
android:textColor="@color/primary_text"/> android:textColor="@color/primary_text"
android:textSize="18sp"/>
<TextView <ImageButton
android:id="@+id/topic_locked_sticky" android:id="@+id/topic_expand_collapse_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/topic_locked_sticky" android:background="@color/background"
android:textColor="@color/accent"/> android:contentDescription="@string/child_board_button"
android:src="@drawable/ic_arrow_drop_down"/>
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/topic_expandable"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<TextView <TextView
android:id="@+id/topic_started_by" android:id="@+id/topic_started_by"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="7dp"
android:layout_marginRight="7dp"
android:text="@string/topic_started_by" android:text="@string/topic_started_by"
android:textColor="@color/secondary_text"/> android:textColor="@color/secondary_text"/>
@ -43,8 +53,6 @@
android:id="@+id/topic_stats" android:id="@+id/topic_stats"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="7dp"
android:layout_marginRight="7dp"
android:text="@string/topic_stats" android:text="@string/topic_stats"
android:textColor="@color/secondary_text"/> android:textColor="@color/secondary_text"/>
@ -52,8 +60,7 @@
android:id="@+id/topic_last_post" android:id="@+id/topic_last_post"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="7dp"
android:layout_marginRight="7dp"
android:text="@string/topic_last_post" android:text="@string/topic_last_post"
android:textColor="@color/secondary_text"/> android:textColor="@color/secondary_text"/>
</LinearLayout> </LinearLayout>
</LinearLayout>

0
app/src/main/res/layout/profile_fragment_latest_posts.xml → app/src/main/res/layout/fragment_latest_posts.xml

0
app/src/main/res/layout/profile_fragment_latest_posts_row.xml → app/src/main/res/layout/fragment_latest_posts_row.xml

0
app/src/main/res/layout/profile_fragment_stats.xml → app/src/main/res/layout/fragment_stats.xml

0
app/src/main/res/layout/profile_fragment_summary.xml → app/src/main/res/layout/fragment_summary.xml

3
app/src/main/res/values/strings.xml

@ -19,7 +19,8 @@
<!--Board Activity--> <!--Board Activity-->
<string name="child_board_title">Child Boards</string> <string name="child_board_title">Child Boards</string>
<string name="child_board_mods">Moderators: %1$s</string> <string name="child_board_button">Exp/Coll</string>
<string name="child_board_mods">Moderators</string>
<string name="child_board_stats">Stats</string> <string name="child_board_stats">Stats</string>
<string name="child_board_last_post">Last post</string> <string name="child_board_last_post">Last post</string>
<string name="topic_title">Topics</string> <string name="topic_title">Topics</string>

Loading…
Cancel
Save