Room profile: make link in room topic clickable

This commit is contained in:
Benoit Marty 2020-01-16 16:36:56 +01:00
parent 17ed8da57a
commit cd44b60bd5
3 changed files with 11 additions and 13 deletions

View File

@ -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.", "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",
"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", "displayName": "benoit",

View File

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<im.vector.riotx.core.platform.StateView xmlns:android="http://schemas.android.com/apk/res/android" <im.vector.riotx.core.platform.StateView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/memberProfileStateView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/memberProfileStateView"
android:background="?riotx_background" android:background="?riotx_background"
android:padding="16dp"> android:padding="16dp">
@ -28,7 +27,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:gravity="center_vertical" android:gravity="center_vertical"
android:singleLine="true"
android:textAppearance="@style/Vector.Toolbar.Title" android:textAppearance="@style/Vector.Toolbar.Title"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold" android:textStyle="bold"
@ -41,7 +39,6 @@
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:singleLine="true"
android:textAppearance="@style/Vector.Toolbar.Title" android:textAppearance="@style/Vector.Toolbar.Title"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"
@ -69,7 +66,9 @@
android:gravity="center" android:gravity="center"
android:textSize="14sp" android:textSize="14sp"
android:visibility="gone" 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" />
</LinearLayout> </LinearLayout>
</im.vector.riotx.core.platform.StateView> </im.vector.riotx.core.platform.StateView>

View File

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?riotx_background" android:background="?riotx_background"
android:padding="16dp" android:orientation="vertical"
android:orientation="vertical"> android:padding="16dp">
<ImageView <ImageView
android:id="@+id/roomProfileAvatarView" android:id="@+id/roomProfileAvatarView"
@ -22,11 +21,10 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:gravity="center_vertical" android:gravity="center_vertical"
android:singleLine="true"
android:textAppearance="@style/Vector.Toolbar.Title" android:textAppearance="@style/Vector.Toolbar.Title"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold" android:textStyle="bold"
tools:text="Random" /> tools:text="@sample/matrix.json/data/roomName" />
<TextView <TextView
android:id="@+id/roomProfileAliasView" android:id="@+id/roomProfileAliasView"
@ -39,7 +37,7 @@
android:textAppearance="@style/Vector.Toolbar.Title" android:textAppearance="@style/Vector.Toolbar.Title"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"
tools:text="#random:matrix.org" /> tools:text="@sample/matrix.json/data/roomAlias" />
<TextView <TextView
android:id="@+id/roomProfileTopicView" android:id="@+id/roomProfileTopicView"
@ -48,10 +46,11 @@
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginStart="40dp" android:layout_marginStart="40dp"
android:layout_marginEnd="40dp" android:layout_marginEnd="40dp"
android:autoLink="web"
android:fontFamily="sans-serif" android:fontFamily="sans-serif"
android:gravity="center" android:gravity="center"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="normal" android:textStyle="normal"
tools:text="Here is a room topic, it can be multi-line but should always be displayed in full 🍱" /> tools:text="@sample/matrix.json/data/roomTopic" />
</LinearLayout> </LinearLayout>