aboutsummaryrefslogtreecommitdiff
path: root/WordPress/src/main/res/layout/reader_listitem_comment.xml
blob: 56618f79faca37675f1bbeff61b1356a0b17e68a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/layout_container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="@dimen/reader_card_margin"
    android:layout_marginRight="@dimen/reader_card_margin"
    android:background="@color/white"
    android:paddingLeft="@dimen/margin_medium"
    android:paddingRight="@dimen/margin_medium">

    <!-- spacer_comment_indent width and visibility set at run-time based on comment indent level -->
    <View
        android:id="@+id/spacer_comment_indent"
        android:layout_width="@dimen/reader_comment_indent_per_level"
        android:layout_height="wrap_content"
        android:visibility="gone" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/margin_large"
        android:layout_marginLeft="@dimen/reader_card_content_padding"
        android:layout_marginRight="@dimen/reader_card_content_padding"
        android:layout_marginTop="@dimen/margin_large"
        android:layout_toRightOf="@+id/spacer_comment_indent"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/layout_author"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <org.wordpress.android.widgets.WPNetworkImageView
                android:id="@+id/image_comment_avatar"
                android:layout_width="@dimen/avatar_sz_extra_small"
                android:layout_height="@dimen/avatar_sz_extra_small"
                android:layout_marginRight="@dimen/margin_small"
                tools:src="@drawable/gravatar_placeholder" />

            <org.wordpress.android.widgets.WPTextView
                android:id="@+id/text_comment_author"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:layout_marginLeft="@dimen/margin_medium"
                android:background="?android:selectableItemBackground"
                android:textColor="@color/grey_dark"
                android:textSize="@dimen/text_sz_medium"
                android:textStyle="bold"
                tools:text="text_comment_author" />
        </LinearLayout>

        <org.wordpress.android.widgets.WPTextView
            android:id="@+id/text_comment_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/margin_small"
            android:layout_marginTop="@dimen/margin_medium"
            android:focusable="false"
            android:focusableInTouchMode="false"
            android:lineSpacingMultiplier="1.1"
            android:textColor="@color/grey_dark"
            android:textSize="@dimen/text_sz_medium"
            app:wpFontFamily="merriweather"
            tools:text="text_comment_text" />

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <org.wordpress.android.widgets.WPTextView
                android:id="@+id/text_comment_date"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:textColor="@color/grey"
                android:textSize="@dimen/text_sz_medium"
                tools:text="date" />

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignWithParentIfMissing="true"
                android:layout_centerVertical="true"
                android:layout_toLeftOf="@+id/count_likes"
                android:orientation="horizontal">

                <ImageView
                    android:id="@+id/image_comment_reply"
                    android:layout_width="@dimen/reader_button_icon"
                    android:layout_height="@dimen/reader_button_icon"
                    android:layout_gravity="center_vertical"
                    android:layout_marginLeft="@dimen/margin_medium"
                    android:padding="@dimen/margin_extra_small"
                    app:srcCompat="@drawable/ic_action_reply" />

                <org.wordpress.android.widgets.WPTextView
                    android:id="@+id/text_comment_reply"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:text="@string/reader_label_reply"
                    android:textColor="@color/grey_lighten_10"
                    android:textSize="@dimen/text_sz_medium" />
            </LinearLayout>

            <org.wordpress.android.ui.reader.views.ReaderIconCountView
                android:id="@+id/count_likes"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginLeft="@dimen/margin_large" />

        </RelativeLayout>

    </LinearLayout>

    <!-- progress bar that appears while submitting a comment -->
    <ProgressBar
        android:id="@+id/progress_comment"
        style="?android:attr/progressBarStyleSmall"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:visibility="gone"
        tools:visibility="visible" />

</RelativeLayout>