mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 18:35:40 +03:00
Design review
This commit is contained in:
parent
e2320cd3b2
commit
564404d4ae
9 changed files with 53 additions and 75 deletions
|
@ -26,6 +26,7 @@ import im.vector.app.R
|
||||||
import im.vector.app.core.epoxy.VectorEpoxyHolder
|
import im.vector.app.core.epoxy.VectorEpoxyHolder
|
||||||
import im.vector.app.core.epoxy.VectorEpoxyModel
|
import im.vector.app.core.epoxy.VectorEpoxyModel
|
||||||
import im.vector.app.core.extensions.setTextOrHide
|
import im.vector.app.core.extensions.setTextOrHide
|
||||||
|
import im.vector.app.core.utils.DebouncedClickListener
|
||||||
|
|
||||||
@EpoxyModelClass(layout = R.layout.item_contact_action)
|
@EpoxyModelClass(layout = R.layout.item_contact_action)
|
||||||
abstract class ActionItem : VectorEpoxyModel<ActionItem.Holder>() {
|
abstract class ActionItem : VectorEpoxyModel<ActionItem.Holder>() {
|
||||||
|
@ -36,7 +37,7 @@ abstract class ActionItem : VectorEpoxyModel<ActionItem.Holder>() {
|
||||||
|
|
||||||
override fun bind(holder: Holder) {
|
override fun bind(holder: Holder) {
|
||||||
super.bind(holder)
|
super.bind(holder)
|
||||||
holder.view.setOnClickListener(clickAction)
|
holder.view.setOnClickListener(clickAction?.let { DebouncedClickListener(it) })
|
||||||
// If name is empty, use userId as name and force it being centered
|
// If name is empty, use userId as name and force it being centered
|
||||||
holder.actionTitleText.setTextOrHide(title)
|
holder.actionTitleText.setTextOrHide(title)
|
||||||
if (actionIconRes != null) {
|
if (actionIconRes != null) {
|
||||||
|
|
|
@ -59,18 +59,18 @@ class UserListController @Inject constructor(private val session: Session,
|
||||||
// For now we remove this option if in invite to existing room flow (and not create DM)
|
// For now we remove this option if in invite to existing room flow (and not create DM)
|
||||||
&& currentState.existingRoomId == null) {
|
&& currentState.existingRoomId == null) {
|
||||||
actionItem {
|
actionItem {
|
||||||
id(R.drawable.ic_invite_people)
|
id(R.drawable.ic_share)
|
||||||
title(stringProvider.getString(R.string.invite_friends))
|
title(stringProvider.getString(R.string.invite_friends))
|
||||||
actionIconRes(R.drawable.ic_invite_people)
|
actionIconRes(R.drawable.ic_share)
|
||||||
clickAction(View.OnClickListener {
|
clickAction(View.OnClickListener {
|
||||||
callback?.onInviteFriendClick()
|
callback?.onInviteFriendClick()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
actionItem {
|
actionItem {
|
||||||
id(R.drawable.ic_book)
|
id(R.drawable.ic_baseline_perm_contact_calendar_24)
|
||||||
title(stringProvider.getString(R.string.contacts_book_title))
|
title(stringProvider.getString(R.string.contacts_book_title))
|
||||||
actionIconRes(R.drawable.ic_book)
|
actionIconRes(R.drawable.ic_baseline_perm_contact_calendar_24)
|
||||||
clickAction(View.OnClickListener {
|
clickAction(View.OnClickListener {
|
||||||
callback?.onContactBookClick()
|
callback?.onContactBookClick()
|
||||||
})
|
})
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M19,3h-1L18,1h-2v2L8,3L8,1L6,1v2L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,5c0,-1.1 -0.9,-2 -2,-2zM12,6c1.66,0 3,1.34 3,3s-1.34,3 -3,3 -3,-1.34 -3,-3 1.34,-3 3,-3zM18,18L6,18v-1c0,-2 4,-3.1 6,-3.1s6,1.1 6,3.1v1z"/>
|
||||||
|
</vector>
|
|
@ -1,72 +1,36 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="30dp"
|
android:width="24dp"
|
||||||
android:height="30dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="30"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="30">
|
android:viewportHeight="24">
|
||||||
<path
|
<path
|
||||||
android:pathData="M29.0625,8.4375C28.5447,8.4375 28.125,8.0177 28.125,7.5L28.125,2.6953C28.125,2.243 27.757,1.875 27.3047,1.875L22.5,1.875C21.9822,1.875 21.5625,1.4552 21.5625,0.9375C21.5625,0.4198 21.9822,0 22.5,0L27.3047,0C28.7909,0 30,1.2091 30,2.6953L30,7.5C30,8.0177 29.5803,8.4375 29.0625,8.4375Z"
|
android:pathData="M15,3L20,3A1,1 0,0 1,21 4L21,9A1,1 0,0 1,20 10L15,10A1,1 0,0 1,14 9L14,4A1,1 0,0 1,15 3z"
|
||||||
android:strokeWidth="1"
|
android:strokeWidth="2"
|
||||||
android:fillColor="#000000"
|
android:fillColor="#00000000"
|
||||||
android:fillType="evenOdd"
|
android:strokeColor="#000000"/>
|
||||||
android:strokeColor="#00000000"/>
|
|
||||||
<path
|
<path
|
||||||
android:pathData="M0.9375,8.4375C0.4197,8.4375 0,8.0177 0,7.5L0,2.6953C0,1.2091 1.2091,0 2.6953,0L7.5,0C8.0178,0 8.4375,0.4198 8.4375,0.9375C8.4375,1.4552 8.0178,1.875 7.5,1.875L2.6953,1.875C2.243,1.875 1.875,2.243 1.875,2.6953L1.875,7.5C1.875,8.0177 1.4553,8.4375 0.9375,8.4375Z"
|
android:pathData="M14.25,16.5L20.75,16.5A0.25,0.25 0,0 1,21 16.75L21,18.25A0.25,0.25 0,0 1,20.75 18.5L14.25,18.5A0.25,0.25 0,0 1,14 18.25L14,16.75A0.25,0.25 0,0 1,14.25 16.5z"
|
||||||
android:strokeWidth="1"
|
android:fillColor="#000000"/>
|
||||||
android:fillColor="#000000"
|
|
||||||
android:fillType="evenOdd"
|
|
||||||
android:strokeColor="#00000000"/>
|
|
||||||
<path
|
<path
|
||||||
android:pathData="M7.5,30L2.6953,30C1.2091,30 0,28.7909 0,27.3047L0,22.5C0,21.9823 0.4197,21.5625 0.9375,21.5625C1.4553,21.5625 1.875,21.9823 1.875,22.5L1.875,27.3047C1.875,27.757 2.243,28.125 2.6953,28.125L7.5,28.125C8.0178,28.125 8.4375,28.5448 8.4375,29.0625C8.4375,29.5802 8.0178,30 7.5,30Z"
|
android:pathData="M18.5,14.25L18.5,20.75A0.25,0.25 0,0 1,18.25 21L16.75,21A0.25,0.25 0,0 1,16.5 20.75L16.5,14.25A0.25,0.25 0,0 1,16.75 14L18.25,14A0.25,0.25 0,0 1,18.5 14.25z"
|
||||||
android:strokeWidth="1"
|
android:fillColor="#000000"/>
|
||||||
android:fillColor="#000000"
|
|
||||||
android:fillType="evenOdd"
|
|
||||||
android:strokeColor="#00000000"/>
|
|
||||||
<path
|
<path
|
||||||
android:pathData="M27.3047,30L22.5,30C21.9822,30 21.5625,29.5802 21.5625,29.0625C21.5625,28.5448 21.9822,28.125 22.5,28.125L27.3047,28.125C27.757,28.125 28.125,27.757 28.125,27.3047L28.125,22.5C28.125,21.9823 28.5447,21.5625 29.0625,21.5625C29.5803,21.5625 30,21.9823 30,22.5L30,27.3047C30,28.7909 28.7909,30 27.3047,30Z"
|
android:pathData="M4,14L9,14A1,1 0,0 1,10 15L10,20A1,1 0,0 1,9 21L4,21A1,1 0,0 1,3 20L3,15A1,1 0,0 1,4 14z"
|
||||||
android:strokeWidth="1"
|
android:strokeWidth="2"
|
||||||
android:fillColor="#000000"
|
android:fillColor="#00000000"
|
||||||
android:fillType="evenOdd"
|
android:strokeColor="#000000"/>
|
||||||
android:strokeColor="#00000000"/>
|
|
||||||
<path
|
<path
|
||||||
android:pathData="M11.3672,14.0625L6.4453,14.0625C4.9591,14.0625 3.75,12.8534 3.75,11.3672L3.75,6.4453C3.75,4.9591 4.9591,3.75 6.4453,3.75L11.3672,3.75C12.8534,3.75 14.0625,4.9591 14.0625,6.4453L14.0625,11.3672C14.0625,12.8534 12.8534,14.0625 11.3672,14.0625ZM6.4453,5.625C5.993,5.625 5.625,5.993 5.625,6.4453L5.625,11.3672C5.625,11.8195 5.993,12.1875 6.4453,12.1875L11.3672,12.1875C11.8195,12.1875 12.1875,11.8195 12.1875,11.3672L12.1875,6.4453C12.1875,5.993 11.8195,5.625 11.3672,5.625L6.4453,5.625Z"
|
android:pathData="M4,3L9,3A1,1 0,0 1,10 4L10,9A1,1 0,0 1,9 10L4,10A1,1 0,0 1,3 9L3,4A1,1 0,0 1,4 3z"
|
||||||
android:strokeWidth="1"
|
android:strokeWidth="2"
|
||||||
android:fillColor="#000000"
|
android:fillColor="#00000000"
|
||||||
android:fillType="nonZero"
|
android:strokeColor="#000000"/>
|
||||||
android:strokeColor="#00000000"/>
|
|
||||||
<path
|
<path
|
||||||
android:pathData="M11.3672,26.25L6.4453,26.25C4.9591,26.25 3.75,25.0409 3.75,23.5547L3.75,18.6328C3.75,17.1466 4.9591,15.9375 6.4453,15.9375L11.3672,15.9375C12.8534,15.9375 14.0625,17.1466 14.0625,18.6328L14.0625,23.5547C14.0625,25.0409 12.8534,26.25 11.3672,26.25ZM6.4453,17.8125C5.993,17.8125 5.625,18.1805 5.625,18.6328L5.625,23.5547C5.625,24.007 5.993,24.375 6.4453,24.375L11.3672,24.375C11.8195,24.375 12.1875,24.007 12.1875,23.5547L12.1875,18.6328C12.1875,18.1805 11.8195,17.8125 11.3672,17.8125L6.4453,17.8125Z"
|
android:pathData="M5.75,5.5L7.25,5.5A0.25,0.25 0,0 1,7.5 5.75L7.5,7.25A0.25,0.25 0,0 1,7.25 7.5L5.75,7.5A0.25,0.25 0,0 1,5.5 7.25L5.5,5.75A0.25,0.25 0,0 1,5.75 5.5z"
|
||||||
android:strokeWidth="1"
|
android:fillColor="#000000"/>
|
||||||
android:fillColor="#000000"
|
|
||||||
android:fillType="nonZero"
|
|
||||||
android:strokeColor="#00000000"/>
|
|
||||||
<path
|
<path
|
||||||
android:pathData="M23.5547,14.0625L18.6328,14.0625C17.1466,14.0625 15.9375,12.8534 15.9375,11.3672L15.9375,6.4453C15.9375,4.9591 17.1466,3.75 18.6328,3.75L23.5547,3.75C25.0409,3.75 26.25,4.9591 26.25,6.4453L26.25,11.3672C26.25,12.8534 25.0409,14.0625 23.5547,14.0625ZM18.6328,5.625C18.1805,5.625 17.8125,5.993 17.8125,6.4453L17.8125,11.3672C17.8125,11.8195 18.1805,12.1875 18.6328,12.1875L23.5547,12.1875C24.007,12.1875 24.375,11.8195 24.375,11.3672L24.375,6.4453C24.375,5.993 24.007,5.625 23.5547,5.625L18.6328,5.625Z"
|
android:pathData="M5.75,16.5L7.25,16.5A0.25,0.25 0,0 1,7.5 16.75L7.5,18.25A0.25,0.25 0,0 1,7.25 18.5L5.75,18.5A0.25,0.25 0,0 1,5.5 18.25L5.5,16.75A0.25,0.25 0,0 1,5.75 16.5z"
|
||||||
android:strokeWidth="1"
|
android:fillColor="#000000"/>
|
||||||
android:fillColor="#000000"
|
|
||||||
android:fillType="nonZero"
|
|
||||||
android:strokeColor="#00000000"/>
|
|
||||||
<path
|
<path
|
||||||
android:pathData="M21.918,21.918L21.918,25.2871C21.918,25.7563 21.5376,26.1367 21.0684,26.1367C20.5991,26.1367 20.2188,25.7563 20.2188,25.2871L20.2188,21.918L16.8496,21.918C16.3804,21.918 16,21.5376 16,21.0684C16,20.5991 16.3804,20.2188 16.8496,20.2188L20.2188,20.2188L20.2188,16.8496C20.2188,16.3804 20.5991,16 21.0684,16C21.5376,16 21.918,16.3804 21.918,16.8496L21.918,20.2188L25.2871,20.2188C25.7563,20.2188 26.1367,20.5991 26.1367,21.0684C26.1367,21.5376 25.7563,21.918 25.2871,21.918L21.918,21.918Z"
|
android:pathData="M16.75,5.5L18.25,5.5A0.25,0.25 0,0 1,18.5 5.75L18.5,7.25A0.25,0.25 0,0 1,18.25 7.5L16.75,7.5A0.25,0.25 0,0 1,16.5 7.25L16.5,5.75A0.25,0.25 0,0 1,16.75 5.5z"
|
||||||
android:strokeWidth="1"
|
android:fillColor="#000000"/>
|
||||||
android:fillColor="#000000"
|
|
||||||
android:fillType="evenOdd"
|
|
||||||
android:strokeColor="#00000000"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M9.375,10.3125L8.4375,10.3125C7.9197,10.3125 7.5,9.8927 7.5,9.375L7.5,8.4375C7.5,7.9198 7.9197,7.5 8.4375,7.5L9.375,7.5C9.8928,7.5 10.3125,7.9198 10.3125,8.4375L10.3125,9.375C10.3125,9.8927 9.8928,10.3125 9.375,10.3125Z"
|
|
||||||
android:strokeWidth="1"
|
|
||||||
android:fillColor="#000000"
|
|
||||||
android:fillType="evenOdd"
|
|
||||||
android:strokeColor="#00000000"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M21.5625,10.3125L20.625,10.3125C20.1072,10.3125 19.6875,9.8927 19.6875,9.375L19.6875,8.4375C19.6875,7.9198 20.1072,7.5 20.625,7.5L21.5625,7.5C22.0803,7.5 22.5,7.9198 22.5,8.4375L22.5,9.375C22.5,9.8927 22.0803,10.3125 21.5625,10.3125Z"
|
|
||||||
android:strokeWidth="1"
|
|
||||||
android:fillColor="#000000"
|
|
||||||
android:fillType="evenOdd"
|
|
||||||
android:strokeColor="#00000000"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M9.375,22.5L8.4375,22.5C7.9197,22.5 7.5,22.0802 7.5,21.5625L7.5,20.625C7.5,20.1073 7.9197,19.6875 8.4375,19.6875L9.375,19.6875C9.8928,19.6875 10.3125,20.1073 10.3125,20.625L10.3125,21.5625C10.3125,22.0802 9.8928,22.5 9.375,22.5Z"
|
|
||||||
android:strokeWidth="1"
|
|
||||||
android:fillColor="#000000"
|
|
||||||
android:fillType="evenOdd"
|
|
||||||
android:strokeColor="#00000000"/>
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -110,7 +110,7 @@
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="?colorAccent"
|
android:textColor="?colorAccent"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
app:icon="@drawable/ic_invite_people"
|
app:icon="@drawable/ic_share"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
app:iconSize="20dp"
|
app:iconSize="20dp"
|
||||||
app:iconTint="?colorAccent"
|
app:iconTint="?colorAccent"
|
||||||
|
|
|
@ -93,6 +93,7 @@
|
||||||
android:maxHeight="80dp"
|
android:maxHeight="80dp"
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
android:paddingBottom="16dp"
|
android:paddingBottom="16dp"
|
||||||
|
android:textSize="16sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/chipGroupScrollView" />
|
app:layout_constraintTop_toBottomOf="@+id/chipGroupScrollView" />
|
||||||
|
|
|
@ -10,9 +10,11 @@
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/actionIconImageView"
|
android:id="@+id/actionIconImageView"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_width="44dp"
|
android:layout_width="44dp"
|
||||||
android:layout_height="44dp"
|
android:layout_height="44dp"
|
||||||
android:padding="12dp"
|
android:padding="10dp"
|
||||||
android:tint="?riotx_text_secondary"
|
android:tint="?riotx_text_secondary"
|
||||||
tools:src="@drawable/ic_invite_people" />
|
tools:src="@drawable/ic_invite_people" />
|
||||||
|
|
||||||
|
|
|
@ -426,7 +426,7 @@
|
||||||
|
|
||||||
<string name="permissions_action_not_performed_missing_permissions">Sorry. Action not performed, due to missing permissions</string>
|
<string name="permissions_action_not_performed_missing_permissions">Sorry. Action not performed, due to missing permissions</string>
|
||||||
<string name="permissions_denied_qr_code">To scan a QR code, you need to allow camera access.</string>
|
<string name="permissions_denied_qr_code">To scan a QR code, you need to allow camera access.</string>
|
||||||
<string name="permissions_denied_add_contact">To check your address book, you need to allow Contact permission.</string>
|
<string name="permissions_denied_add_contact">Allow permission to access your contacts.</string>
|
||||||
|
|
||||||
<!-- medias slider string -->
|
<!-- medias slider string -->
|
||||||
<string name="media_slider_saved">Saved</string>
|
<string name="media_slider_saved">Saved</string>
|
||||||
|
@ -1757,7 +1757,7 @@
|
||||||
<string name="room_filtering_footer_open_room_directory">View the room directory</string>
|
<string name="room_filtering_footer_open_room_directory">View the room directory</string>
|
||||||
|
|
||||||
<string name="room_directory_search_hint">Name or ID (#example:matrix.org)</string>
|
<string name="room_directory_search_hint">Name or ID (#example:matrix.org)</string>
|
||||||
<string name="user_directory_search_hint">Name or ID (like %s)</string>
|
<string name="user_directory_search_hint">Search by name or ID</string>
|
||||||
|
|
||||||
<string name="labs_swipe_to_reply_in_timeline">Enable swipe to reply in timeline</string>
|
<string name="labs_swipe_to_reply_in_timeline">Enable swipe to reply in timeline</string>
|
||||||
<string name="labs_show_unread_notifications_as_tab">Add a dedicated tab for unread notifications on main screen.</string>
|
<string name="labs_show_unread_notifications_as_tab">Add a dedicated tab for unread notifications on main screen.</string>
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<style name="VectorSnackBarStyle" parent="@style/Widget.MaterialComponents.Snackbar">
|
<style name="VectorSnackBarStyle" parent="@style/Widget.MaterialComponents.Snackbar">
|
||||||
<item name="android:background">@color/notification_accent_color</item>
|
<!-- <item name="android:background">@color/notification_accent_color</item>-->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="VectorSnackBarButton" parent="@style/Widget.MaterialComponents.Button">
|
<style name="VectorSnackBarButton" parent="@style/Widget.MaterialComponents.Button.TextButton">
|
||||||
<item name="android:textColor">@color/white</item>
|
<!-- <item name="android:textColor">@color/white</item>-->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="VectorSnackBarText" parent="@style/Widget.MaterialComponents.Snackbar.TextView">
|
<style name="VectorSnackBarText" parent="@style/Widget.MaterialComponents.Snackbar.TextView">
|
||||||
<item name="android:textColor">@color/white</item>
|
<!-- <item name="android:textColor">@color/white</item>-->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue