From cd44b60bd5f5cf3829406f439aa047c5e6fc76a7 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 16 Jan 2020 16:36:56 +0100 Subject: [PATCH] Room profile: make link in room topic clickable --- vector/sampledata/matrix.json | 2 +- .../layout/view_stub_room_member_profile_header.xml | 9 ++++----- .../res/layout/view_stub_room_profile_header.xml | 13 ++++++------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/vector/sampledata/matrix.json b/vector/sampledata/matrix.json index b9c55b91ba..5328ec81b7 100644 --- a/vector/sampledata/matrix.json +++ b/vector/sampledata/matrix.json @@ -6,7 +6,7 @@ "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", "roomAlias": "#matrix:matrix.org", - "roomTopic": "Welcome to Matrix HQ! Here is the rest of the room topic…" + "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." }, { "displayName": "benoit", diff --git a/vector/src/main/res/layout/view_stub_room_member_profile_header.xml b/vector/src/main/res/layout/view_stub_room_member_profile_header.xml index 82bf0e7d7b..dcaa4bd553 100644 --- a/vector/src/main/res/layout/view_stub_room_member_profile_header.xml +++ b/vector/src/main/res/layout/view_stub_room_member_profile_header.xml @@ -1,10 +1,9 @@ - @@ -28,7 +27,6 @@ android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:gravity="center_vertical" - android:singleLine="true" android:textAppearance="@style/Vector.Toolbar.Title" android:textSize="20sp" android:textStyle="bold" @@ -41,7 +39,6 @@ android:layout_gravity="center_horizontal" android:layout_marginTop="8dp" android:layout_marginBottom="16dp" - android:singleLine="true" android:textAppearance="@style/Vector.Toolbar.Title" android:textSize="14sp" android:textStyle="bold" @@ -69,7 +66,9 @@ android:gravity="center" android:textSize="14sp" android:visibility="gone" - tools:text="Here is a room topic, it can be multi-line but should always be displayed in full 🍱" /> + tools:text="Here is a profile status" + tools:visibility="visible" /> + \ No newline at end of file diff --git a/vector/src/main/res/layout/view_stub_room_profile_header.xml b/vector/src/main/res/layout/view_stub_room_profile_header.xml index 6a0d0fc5de..76dfef4aa5 100644 --- a/vector/src/main/res/layout/view_stub_room_profile_header.xml +++ b/vector/src/main/res/layout/view_stub_room_profile_header.xml @@ -1,12 +1,11 @@ - + android:orientation="vertical" + android:padding="16dp"> + tools:text="@sample/matrix.json/data/roomName" /> + tools:text="@sample/matrix.json/data/roomAlias" /> + tools:text="@sample/matrix.json/data/roomTopic" />