Fully collapsing comments is now available (barebone).

This commit is contained in:
Alex Ning
2020-07-03 10:27:24 +08:00
parent 9a4edde8fb
commit 4f8b313b3c
7 changed files with 216 additions and 18 deletions

View File

@@ -121,6 +121,7 @@
android:text="@string/see_removed_comment"
android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
android:visibility="gone" />
</LinearLayout>

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:id="@+id/vertical_block_item_comment_fully_collapsed"
android:layout_width="0dp"
android:layout_height="match_parent" />
<TextView
android:id="@+id/user_name_text_view_item_comment_fully_collapsed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="16dp"
android:paddingEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" />
<TextView
android:id="@+id/score_text_view_item_comment_fully_collapsed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" />
<TextView
android:id="@+id/more_count_text_view_item_comment_fully_collapsed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="8dp"
android:paddingEnd="16dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" />
</LinearLayout>
<View
android:id="@+id/divider_item_load_comment_fully_collapsed"
android:layout_width="match_parent"
android:layout_height="1dp"
android:visibility="gone" />
</LinearLayout>

View File

@@ -352,6 +352,7 @@
<string name="settings_show_top_level_comments_first_title">Show Top-level Comments First</string>
<string name="settings_show_comment_divider_title">Show Comment Divider</string>
<string name="settings_comment_toolbar_hide_on_click">Click to Show/Hide Comment Toolbar</string>
<string name="settings_fully_collapse_comment_title">Fully Collapse Comment</string>
<string name="settings_comment_toolbar_hidden">Comment Toolbar Hidden by Default</string>
<string name="settings_show_absolute_number_of_votes_title">Show Absolute Number of Votes</string>
<string name="settings_show_elapsed_time">Show Elapsed Time in Posts and Comments</string>

View File

@@ -69,6 +69,11 @@
app:key="comment_toolbar_hide_on_click"
app:title="@string/settings_comment_toolbar_hide_on_click" />
<SwitchPreference
app:defaultValue="false"
app:key="fully_collapse_comment"
android:title="@string/settings_fully_collapse_comment_title" />
<SwitchPreference
app:defaultValue="true"
app:key="show_absolute_number_of_votes"