mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Split sample step 2: messages
This commit is contained in:
parent
e34574f658
commit
2b632a2d52
@ -1,42 +1,36 @@
|
|||||||
{
|
{
|
||||||
"data": [
|
"data": [
|
||||||
{
|
{
|
||||||
"message": "William Shakespeare (bapt. 26 April 1564 – 23 April 1616) was an English poet, playwright and actor, widely regarded as the greatest writer in the English language and the world's greatest dramatist. He is often called England's national poet and the \"Bard of Avon\". His extant works, including collaborations, consist of approximately 39 plays, 154 sonnets, two long narrative poems, and a few other verses, some of uncertain authorship. His plays have been translated into every major living language and are performed more often than those of any other playwright.\n\nShakespeare was born and raised in Stratford-upon-Avon, Warwickshire. At the age of 18, he married Anne Hathaway, with whom he had three children: Susanna and twins Hamnet and Judith. Sometime between 1585 and 1592, he began a successful career in London as an actor, writer, and part-owner of a playing company called the Lord Chamberlain's Men, later known as the King's Men. At age 49 (around 1613), he appears to have retired to Stratford, where he died three years later. Few records of Shakespeare's private life survive; this has stimulated considerable speculation about such matters as his physical appearance, his sexuality, his religious beliefs, and whether the works attributed to him were written by others. Such theories are often criticised for failing to adequately note that few records survive of most commoners of the period.\n\nShakespeare produced most of his known works between 1589 and 1613. His early plays were primarily comedies and histories and are regarded as some of the best work produced in these genres. Until about 1608, he wrote mainly tragedies, among them Hamlet, Othello, King Lear, and Macbeth, all considered to be among the finest works in the English language. In the last phase of his life, he wrote tragicomedies (also known as romances) and collaborated with other playwrights.\n\nMany of Shakespeare's plays were published in editions of varying quality and accuracy in his lifetime. However, in 1623, two fellow actors and friends of Shakespeare's, John Heminges and Henry Condell, published a more definitive text known as the First Folio, a posthumous collected edition of Shakespeare's dramatic works that included all but two of his plays. The volume was prefaced with a poem by Ben Jonson, in which Jonson presciently hails Shakespeare in a now-famous quote as \"not of an age, but for all time\".\n\nThroughout the 20th and 21st centuries, Shakespeare's works have been continually adapted and rediscovered by new movements in scholarship and performance. His plays remain popular and are studied, performed, and reinterpreted through various cultural and political contexts around the world.",
|
|
||||||
"roomName": "Matrix HQ",
|
"roomName": "Matrix HQ",
|
||||||
"roomAlias": "#matrix:matrix.org",
|
"roomAlias": "#matrix:matrix.org",
|
||||||
"spaceName": "Runner's world",
|
"spaceName": "Runner's world",
|
||||||
"roomTopic": "Welcome to Matrix HQ! Here is the rest of the room topic, with a https://www.example.org url and a phone number: 0102030405 which should not be clickable."
|
"roomTopic": "Welcome to Matrix HQ! Here is the rest of the room topic, with a https://www.example.org url and a phone number: 0102030405 which should not be clickable."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"message": "Hello!",
|
|
||||||
"roomName": "Room name very loooooooong with some details",
|
"roomName": "Room name very loooooooong with some details",
|
||||||
"roomAlias": "#matrix:matrix.org",
|
"roomAlias": "#matrix:matrix.org",
|
||||||
"spaceName": "Matrix Org",
|
"spaceName": "Matrix Org",
|
||||||
"roomTopic": "Room topic very loooooooong with some details"
|
"roomTopic": "Room topic very loooooooong with some details"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"message": "How are you?",
|
|
||||||
"roomName": "Room name very loooooooong with some details",
|
"roomName": "Room name very loooooooong with some details",
|
||||||
"roomAlias": "#matrix:matrix.org",
|
"roomAlias": "#matrix:matrix.org",
|
||||||
"spaceName": "Rennes",
|
"spaceName": "Rennes",
|
||||||
"roomTopic": "Room topic very loooooooong with some details"
|
"roomTopic": "Room topic very loooooooong with some details"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"message": "Great weather today!",
|
|
||||||
"roomName": "Room name very loooooooong with some details",
|
"roomName": "Room name very loooooooong with some details",
|
||||||
"roomAlias": "#matrix:matrix.org",
|
"roomAlias": "#matrix:matrix.org",
|
||||||
"spaceName": "Est London",
|
"spaceName": "Est London",
|
||||||
"roomTopic": "Room topic very loooooooong with some details"
|
"roomTopic": "Room topic very loooooooong with some details"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"message": "Let's do a picnic",
|
|
||||||
"roomName": "Room name very loooooooong with some details",
|
"roomName": "Room name very loooooooong with some details",
|
||||||
"roomAlias": "#matrix:matrix.org",
|
"roomAlias": "#matrix:matrix.org",
|
||||||
"spaceName": "Element HQ",
|
"spaceName": "Element HQ",
|
||||||
"roomTopic": "Room topic very loooooooong with some details"
|
"roomTopic": "Room topic very loooooooong with some details"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"message": "Yes, great idea",
|
|
||||||
"roomName": "Room name very loooooooong with some details",
|
"roomName": "Room name very loooooooong with some details",
|
||||||
"roomAlias": "#matrix:matrix.org",
|
"roomAlias": "#matrix:matrix.org",
|
||||||
"spaceName": "My Company",
|
"spaceName": "My Company",
|
||||||
|
22
vector/sampledata/messages.json
Normal file
22
vector/sampledata/messages.json
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"message": "William Shakespeare (bapt. 26 April 1564 – 23 April 1616) was an English poet, playwright and actor, widely regarded as the greatest writer in the English language and the world's greatest dramatist. He is often called England's national poet and the \"Bard of Avon\". His extant works, including collaborations, consist of approximately 39 plays, 154 sonnets, two long narrative poems, and a few other verses, some of uncertain authorship. His plays have been translated into every major living language and are performed more often than those of any other playwright.\n\nShakespeare was born and raised in Stratford-upon-Avon, Warwickshire. At the age of 18, he married Anne Hathaway, with whom he had three children: Susanna and twins Hamnet and Judith. Sometime between 1585 and 1592, he began a successful career in London as an actor, writer, and part-owner of a playing company called the Lord Chamberlain's Men, later known as the King's Men. At age 49 (around 1613), he appears to have retired to Stratford, where he died three years later. Few records of Shakespeare's private life survive; this has stimulated considerable speculation about such matters as his physical appearance, his sexuality, his religious beliefs, and whether the works attributed to him were written by others. Such theories are often criticised for failing to adequately note that few records survive of most commoners of the period.\n\nShakespeare produced most of his known works between 1589 and 1613. His early plays were primarily comedies and histories and are regarded as some of the best work produced in these genres. Until about 1608, he wrote mainly tragedies, among them Hamlet, Othello, King Lear, and Macbeth, all considered to be among the finest works in the English language. In the last phase of his life, he wrote tragicomedies (also known as romances) and collaborated with other playwrights.\n\nMany of Shakespeare's plays were published in editions of varying quality and accuracy in his lifetime. However, in 1623, two fellow actors and friends of Shakespeare's, John Heminges and Henry Condell, published a more definitive text known as the First Folio, a posthumous collected edition of Shakespeare's dramatic works that included all but two of his plays. The volume was prefaced with a poem by Ben Jonson, in which Jonson presciently hails Shakespeare in a now-famous quote as \"not of an age, but for all time\".\n\nThroughout the 20th and 21st centuries, Shakespeare's works have been continually adapted and rediscovered by new movements in scholarship and performance. His plays remain popular and are studied, performed, and reinterpreted through various cultural and political contexts around the world."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Hello!"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "How are you?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Great weather today!"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Let's do a picnic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Yes, great idea"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -61,7 +61,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/spaceAvatarImageView"
|
app:layout_constraintStart_toEndOf="@id/spaceAvatarImageView"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/spaceNameView"
|
app:layout_constraintTop_toBottomOf="@+id/spaceNameView"
|
||||||
tools:text="@sample/matrix.json/data/message"
|
tools:text="@sample/messages.json/data/message"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -179,7 +179,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@+id/roomNameView"
|
app:layout_constraintStart_toStartOf="@+id/roomNameView"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/roomNameView"
|
app:layout_constraintTop_toBottomOf="@+id/roomNameView"
|
||||||
tools:text="@sample/matrix.json/data/message" />
|
tools:text="@sample/messages.json/data/message" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/roomTypingView"
|
android:id="@+id/roomTypingView"
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="@+id/roomInvitationNameView"
|
app:layout_constraintEnd_toEndOf="@+id/roomInvitationNameView"
|
||||||
app:layout_constraintStart_toStartOf="@+id/roomInvitationNameView"
|
app:layout_constraintStart_toStartOf="@+id/roomInvitationNameView"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/roomInvitationNameView"
|
app:layout_constraintTop_toBottomOf="@+id/roomInvitationNameView"
|
||||||
tools:text="@sample/matrix.json/data/message" />
|
tools:text="@sample/messages.json/data/message" />
|
||||||
|
|
||||||
<!-- Margin bottom does not work, so I use space -->
|
<!-- Margin bottom does not work, so I use space -->
|
||||||
<Space
|
<Space
|
||||||
|
@ -58,6 +58,6 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@+id/messageMemberNameView"
|
app:layout_constraintStart_toStartOf="@+id/messageMemberNameView"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/messageMemberNameView"
|
app:layout_constraintTop_toBottomOf="@+id/messageMemberNameView"
|
||||||
tools:text="@sample/matrix.json/data/message" />
|
tools:text="@sample/messages.json/data/message" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -70,7 +70,7 @@
|
|||||||
app:layout_constraintEnd_toStartOf="@id/joinSuggestedRoomButton"
|
app:layout_constraintEnd_toStartOf="@id/joinSuggestedRoomButton"
|
||||||
app:layout_constraintStart_toStartOf="@+id/roomNameView"
|
app:layout_constraintStart_toStartOf="@+id/roomNameView"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/roomNameView"
|
app:layout_constraintTop_toBottomOf="@+id/roomNameView"
|
||||||
tools:text="@sample/matrix.json/data/message" />
|
tools:text="@sample/messages.json/data/message" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/joinSuggestedRoomButton"
|
android:id="@+id/joinSuggestedRoomButton"
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="?riotx_text_primary"
|
android:textColor="?riotx_text_primary"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
tools:text="@sample/matrix.json/data/message" />
|
tools:text="@sample/messages.json/data/message" />
|
||||||
|
|
||||||
<im.vector.app.features.home.room.detail.timeline.url.PreviewUrlView
|
<im.vector.app.features.home.room.detail.timeline.url.PreviewUrlView
|
||||||
android:id="@+id/messageUrlPreview"
|
android:id="@+id/messageUrlPreview"
|
||||||
|
Loading…
Reference in New Issue
Block a user