From 3b12f5eec7117aced17b25bf24fd23b19c94a016 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 3 Jun 2019 14:37:22 +0200 Subject: [PATCH] Room preview toolbar + link on topic --- .../RoomPreviewNoPreviewFragment.kt | 5 +++ .../fragment_room_preview_no_preview.xml | 44 ++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/riotredesign/features/roomdirectory/roompreview/RoomPreviewNoPreviewFragment.kt b/vector/src/main/java/im/vector/riotredesign/features/roomdirectory/roompreview/RoomPreviewNoPreviewFragment.kt index efb881fcb5..074995557a 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/roomdirectory/roompreview/RoomPreviewNoPreviewFragment.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/roomdirectory/roompreview/RoomPreviewNoPreviewFragment.kt @@ -63,6 +63,11 @@ class RoomPreviewNoPreviewFragment : VectorBaseFragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + // Toolbar + AvatarRenderer.render(roomPreviewData.avatarUrl, roomPreviewData.roomId, roomPreviewData.roomName, roomPreviewNoPreviewToolbarAvatar) + roomPreviewNoPreviewToolbarTitle.text = roomPreviewData.roomName + + // Screen AvatarRenderer.render(roomPreviewData.avatarUrl, roomPreviewData.roomId, roomPreviewData.roomName, roomPreviewNoPreviewAvatar) roomPreviewNoPreviewName.text = roomPreviewData.roomName roomPreviewNoPreviewTopic.setTextOrHide(roomPreviewData.topic) 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 948d65b916..e18416dcc7 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 @@ -15,7 +15,48 @@ android:id="@+id/roomPreviewNoPreviewToolbar" style="@style/VectorToolbarStyle" android:layout_width="match_parent" - android:layout_height="wrap_content" /> + android:layout_height="?actionBarSize" + android:background="?attr/colorPrimary" + app:contentInsetStartWithNavigation="0dp" + app:popupTheme="@style/ThemeOverlay.AppCompat.Light" + app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> + + + + + + + + + + +