diff --git a/vector/sampledata/matrix.json b/vector/sampledata/matrix.json index 1c808168..e8bd85d1 100644 --- a/vector/sampledata/matrix.json +++ b/vector/sampledata/matrix.json @@ -3,32 +3,44 @@ { "displayName": "Long display name useful to test layout with a long display name", "mxid": "@longmatrixidbecausesometimesuserschooselongmxid:matrix.org", - "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": "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", + "roomTopic": "Welcome to Matrix HQ! Here is the rest of the room topic…" }, { "displayName": "benoit", "mxid": "@benoit:matrix.org", - "message": "Hello!" + "message": "Hello!", + "roomName": "Room name very loooooooong with some details", + "roomTopic": "Room topic very loooooooong with some details" }, { "displayName": "ganfra", "mxid": "@ganfra:matrix.org", - "message": "How are you?" + "message": "How are you?", + "roomName": "Room name very loooooooong with some details", + "roomTopic": "Room topic very loooooooong with some details" }, { "displayName": "Manu", "mxid": "@manu:matrix.org", - "message": "Great weather today!" + "message": "Great weather today!", + "roomName": "Room name very loooooooong with some details", + "roomTopic": "Room topic very loooooooong with some details" }, { "displayName": "Giom", "mxid": "@giom:matrix.org", - "message": "Let's do a picnic" + "message": "Let's do a picnic", + "roomName": "Room name very loooooooong with some details", + "roomTopic": "Room topic very loooooooong with some details" }, { "displayName": "Nad", "mxid": "@nadonomy:matrix.org", - "message": "Yes, great idea" + "message": "Yes, great idea", + "roomName": "Room name very loooooooong with some details", + "roomTopic": "Room topic very loooooooong with some details" } ] } diff --git a/vector/src/main/java/im/vector/riotredesign/features/invite/VectorInviteView.kt b/vector/src/main/java/im/vector/riotredesign/features/invite/VectorInviteView.kt index fa9e40bd..54b1476a 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/invite/VectorInviteView.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/invite/VectorInviteView.kt @@ -51,13 +51,13 @@ class VectorInviteView @JvmOverloads constructor(context: Context, attrs: Attrib fun render(sender: User, mode: Mode = Mode.LARGE) { if (mode == Mode.LARGE) { - updateLayoutParams { height = ConstraintLayout.LayoutParams.MATCH_CONSTRAINT } + updateLayoutParams { height = LayoutParams.MATCH_CONSTRAINT } AvatarRenderer.render(sender.avatarUrl, sender.userId, sender.displayName, inviteAvatarView) inviteIdentifierView.text = sender.userId inviteNameView.text = sender.displayName inviteLabelView.text = context.getString(R.string.send_you_invite) } else { - updateLayoutParams { height = ConstraintLayout.LayoutParams.WRAP_CONTENT } + updateLayoutParams { height = LayoutParams.WRAP_CONTENT } inviteAvatarView.visibility = View.GONE inviteIdentifierView.visibility = View.GONE inviteNameView.visibility = View.GONE diff --git a/vector/src/main/res/drawable/ic_plus_circle.xml b/vector/src/main/res/drawable/ic_plus_circle.xml index d8b21310..0b7b4eec 100644 --- a/vector/src/main/res/drawable/ic_plus_circle.xml +++ b/vector/src/main/res/drawable/ic_plus_circle.xml @@ -1,13 +1,22 @@ - - + - - + android:strokeWidth="1.4" + android:strokeColor="#03B381" + android:strokeLineCap="round" + android:strokeLineJoin="round" /> + diff --git a/vector/src/main/res/drawable/ic_tick.xml b/vector/src/main/res/drawable/ic_tick.xml index 3b8c8d83..11159342 100644 --- a/vector/src/main/res/drawable/ic_tick.xml +++ b/vector/src/main/res/drawable/ic_tick.xml @@ -1,9 +1,13 @@ - - - + + diff --git a/vector/src/main/res/drawable/ic_user.xml b/vector/src/main/res/drawable/ic_user.xml index e518f750..cc811c60 100644 --- a/vector/src/main/res/drawable/ic_user.xml +++ b/vector/src/main/res/drawable/ic_user.xml @@ -1,11 +1,22 @@ - - - + + + diff --git a/vector/src/main/res/layout/fragment_home_drawer.xml b/vector/src/main/res/layout/fragment_home_drawer.xml index 7fc45709..8bbd52c2 100644 --- a/vector/src/main/res/layout/fragment_home_drawer.xml +++ b/vector/src/main/res/layout/fragment_home_drawer.xml @@ -61,12 +61,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?attr/selectableItemBackground" - android:paddingStart="8dp" - android:paddingLeft="8dp" - android:paddingTop="8dp" - android:paddingEnd="16dp" - android:paddingRight="16dp" - android:paddingBottom="16dp" + android:padding="16dp" android:src="@drawable/ic_settings_x" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" /> diff --git a/vector/src/main/res/layout/fragment_room_preview_no_preview.xml b/vector/src/main/res/layout/fragment_room_preview_no_preview.xml index 7ec6b481..4cb9d375 100644 --- a/vector/src/main/res/layout/fragment_room_preview_no_preview.xml +++ b/vector/src/main/res/layout/fragment_room_preview_no_preview.xml @@ -1,8 +1,8 @@ @@ -45,7 +45,7 @@ android:textAppearance="@style/TextAppearance.Vector.Title" android:textSize="15sp" android:textStyle="bold" - tools:text="Matrix HQ" /> + tools:text="@sample/matrix.json/data/roomName" /> + tools:text="@sample/matrix.json/data/roomTopic" /> + app:bsv_use_flat_button="false" /> diff --git a/vector/src/main/res/layout/item_public_room.xml b/vector/src/main/res/layout/item_public_room.xml index 119cf7aa..8bfdccb8 100644 --- a/vector/src/main/res/layout/item_public_room.xml +++ b/vector/src/main/res/layout/item_public_room.xml @@ -38,7 +38,7 @@ app:layout_constraintEnd_toStartOf="@id/itemPublicRoomMembersCount" app:layout_constraintStart_toEndOf="@id/itemPublicRoomAvatar" app:layout_constraintTop_toTopOf="parent" - tools:text="@tools:sample/lorem/random" /> + tools:text="@sample/matrix.json/data/roomName" /> diff --git a/vector/src/main/res/layout/item_timeline_event_base.xml b/vector/src/main/res/layout/item_timeline_event_base.xml index 2ec5cf04..becff2a8 100644 --- a/vector/src/main/res/layout/item_timeline_event_base.xml +++ b/vector/src/main/res/layout/item_timeline_event_base.xml @@ -44,7 +44,7 @@ app:layout_constraintHorizontal_chainStyle="spread_inside" app:layout_constraintStart_toEndOf="@id/messageStartGuideline" app:layout_constraintTop_toTopOf="parent" - tools:text="@tools:sample/full_names" /> + tools:text="@sample/matrix.json/data/displayName" /> + tools:text="John doe changed their avatar" /> \ No newline at end of file diff --git a/vector/src/main/res/layout/item_timeline_event_text_message_stub.xml b/vector/src/main/res/layout/item_timeline_event_text_message_stub.xml index 93c17c39..5b1bb1b1 100644 --- a/vector/src/main/res/layout/item_timeline_event_text_message_stub.xml +++ b/vector/src/main/res/layout/item_timeline_event_text_message_stub.xml @@ -6,4 +6,4 @@ android:layout_height="wrap_content" android:textColor="@color/dark_grey" android:textSize="14sp" - tools:text="Alright finished work, heading there in about 20 mins…
Ping me when you’re outside" /> + tools:text="@sample/matrix.json/data/message" /> diff --git a/vector/src/main/res/layout/vector_invite_view.xml b/vector/src/main/res/layout/vector_invite_view.xml index 80f90eda..f5678791 100644 --- a/vector/src/main/res/layout/vector_invite_view.xml +++ b/vector/src/main/res/layout/vector_invite_view.xml @@ -22,25 +22,29 @@ + tools:text="@sample/matrix.json/data/displayName" /> + tools:text="@sample/matrix.json/data/mxid" />