Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 - Fixing after code review.

Signed-off-by: Ahmed Radhouane Belkilani <[email protected]>
  • Loading branch information
ahmed-radhouane committed Mar 3, 2022
1 parent 06d8461 commit 8c246c2
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 34 deletions.
2 changes: 1 addition & 1 deletion changelog.d/4642.bugfix
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Update the top bar in a room
Update the top bar in a room: remove topic and typing information
8 changes: 8 additions & 0 deletions library/ui-styles/src/main/res/values/style_action_button.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Widget.Vector.ActionButton" parent="Widget.AppCompat.ActionButton">
<item name="android:paddingStart">5dp</item>
<item name="android:paddingEnd">5dp</item>
<item name="android:minWidth">0dp</item>
</style>
</resources>
6 changes: 0 additions & 6 deletions library/ui-styles/src/main/res/values/theme_common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,4 @@
<item name="android:backgroundDimEnabled">false</item>
</style>

<style name="Theme.Vector.ActionButton" parent="@android:style/Widget.ActionButton">
<item name="android:paddingStart">5dp</item>
<item name="android:paddingEnd">5dp</item>
<item name="android:minWidth">0dp</item>
</style>

</resources>
2 changes: 1 addition & 1 deletion library/ui-styles/src/main/res/values/theme_dark.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@

<item name="vctr_toast_background">@color/vctr_toast_background_dark</item>

<item name="android:actionButtonStyle">@style/Theme.Vector.ActionButton</item>
<item name="android:actionButtonStyle">@style/Widget.Vector.ActionButton</item>

</style>

Expand Down
4 changes: 1 addition & 3 deletions library/ui-styles/src/main/res/values/theme_light.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,10 @@

<item name="vctr_toast_background">@color/vctr_toast_background_light</item>

<item name="android:actionButtonStyle">@style/Theme.Vector.ActionButton</item>
<item name="android:actionButtonStyle">@style/Widget.Vector.ActionButton</item>

</style>



<style name="Theme.Vector.Light" parent="Base.Theme.Vector.Light" />

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,6 @@ class TimelineFragment @Inject constructor(

private fun renderToolbar(roomSummary: RoomSummary?) {
if (!isThreadTimeLine()) {
views.includeRoomToolbar.roomToolbarSubtitleView.isVisible = false
views.includeRoomToolbar.roomToolbarContentView.isVisible = true
views.includeThreadToolbar.roomToolbarThreadConstraintLayout.isVisible = false
if (roomSummary == null) {
Expand Down
26 changes: 4 additions & 22 deletions vector/src/main/res/layout/view_room_detail_toolbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
android:id="@+id/roomToolbarDecorationImageView"
android:layout_width="11dp"
android:layout_height="13dp"
tools:ignore="MissingConstraints"
app:layout_constraintCircle="@id/roomToolbarAvatarImageView"
app:layout_constraintCircleAngle="120"
app:layout_constraintCircleRadius="18dp"/>
app:layout_constraintCircleRadius="18dp"
tools:ignore="MissingConstraints" />

<im.vector.app.core.ui.views.PresenceStateImageView
android:id="@+id/roomToolbarPresenceImageView"
Expand Down Expand Up @@ -69,31 +69,13 @@
android:maxLines="1"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.Vector.Widget.ActionBarTitle"
app:layout_constraintBottom_toTopOf="@id/roomToolbarSubtitleView"
app:layout_constraintBottom_toBottomOf="@id/roomToolbarAvatarImageView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@id/roomToolbarDecorationImageView"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toTopOf="@id/roomToolbarAvatarImageView"
app:layout_constraintVertical_chainStyle="packed"
app:layout_goneMarginStart="7dp"
tools:text="@sample/rooms.json/data/name" />

<TextView
android:id="@+id/roomToolbarSubtitleView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:ellipsize="end"
android:maxLines="1"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.Vector.Widget.ActionBarSubTitle"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@id/roomToolbarAvatarImageView"
app:layout_constraintTop_toBottomOf="@id/roomToolbarTitleView"
tools:text="@sample/rooms.json/data/topic"
tools:visibility="visible" />

</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit 8c246c2

Please sign in to comment.