diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index da03d8866f..5dd499e43b 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/app/src/main/java/im/vector/riotredesign/core/extensions/CharSequence.kt b/app/src/main/java/im/vector/riotredesign/core/extensions/CharSequence.kt index f2e6f70b0b..cd17367946 100644 --- a/app/src/main/java/im/vector/riotredesign/core/extensions/CharSequence.kt +++ b/app/src/main/java/im/vector/riotredesign/core/extensions/CharSequence.kt @@ -2,5 +2,5 @@ package im.vector.riotredesign.core.extensions fun CharSequence.firstCharAsString(): String { - return this[0].toString() + return if (isNotEmpty()) this[0].toString() else "" } \ No newline at end of file diff --git a/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomCategoryItem.kt b/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomCategoryItem.kt new file mode 100644 index 0000000000..dd9b6716b1 --- /dev/null +++ b/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomCategoryItem.kt @@ -0,0 +1,16 @@ +package im.vector.riotredesign.features.home.room.list + +import android.support.annotation.DrawableRes +import im.vector.riotredesign.R +import im.vector.riotredesign.core.epoxy.KotlinModel + +data class RoomCategoryItem( + val title: CharSequence, + @DrawableRes val expandDrawable: Int, + val listener: (() -> Unit)? = null +) : KotlinModel(R.layout.item_room_category) { + + override fun bind() { + + } +} diff --git a/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomSummaryController.kt b/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomSummaryController.kt index c601157fcb..b30191eb81 100644 --- a/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomSummaryController.kt +++ b/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomSummaryController.kt @@ -3,6 +3,7 @@ package im.vector.riotredesign.features.home.room.list import android.content.Context import com.airbnb.epoxy.Typed2EpoxyController import im.vector.matrix.android.api.session.room.model.RoomSummary +import im.vector.riotredesign.R import im.vector.riotredesign.features.home.RoomSummaryViewHelper class RoomSummaryController(private val context: Context, @@ -10,6 +11,13 @@ class RoomSummaryController(private val context: Context, ) : Typed2EpoxyController, RoomSummary>() { override fun buildModels(summaries: List?, selected: RoomSummary?) { + RoomCategoryItem( + title = "DIRECT MESSAGES", + expandDrawable = R.drawable.ic_expand_more_white + ) + .id("direct_messages") + .addTo(this) + summaries?.forEach { val roomSummaryViewHelper = RoomSummaryViewHelper(it) RoomSummaryItem( @@ -27,4 +35,4 @@ class RoomSummaryController(private val context: Context, fun onRoomSelected(room: RoomSummary) } -} \ No newline at end of file +} diff --git a/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomSummaryItem.kt b/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomSummaryItem.kt index e1b7db4782..c4b10606d2 100644 --- a/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomSummaryItem.kt +++ b/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomSummaryItem.kt @@ -16,7 +16,7 @@ data class RoomSummaryItem( ) : KotlinModel(R.layout.item_room) { private val titleView by bind(R.id.titleView) - private val avatarImageView by bind(R.id.toolbarAvatarImageView) + private val avatarImageView by bind(R.id.avatarImageView) private val rootView by bind(R.id.itemRoomLayout) override fun bind() { diff --git a/app/src/main/res/color/color_room_title.xml b/app/src/main/res/color/color_room_title.xml new file mode 100644 index 0000000000..1cda9bf68b --- /dev/null +++ b/app/src/main/res/color/color_room_title.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-hdpi/ic_add_circle_white.png b/app/src/main/res/drawable-hdpi/ic_add_circle_white.png new file mode 100644 index 0000000000..97e105bc68 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_add_circle_white.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_expand_less_white.png b/app/src/main/res/drawable-hdpi/ic_expand_less_white.png new file mode 100644 index 0000000000..a0861f5996 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_expand_less_white.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_expand_more_white.png b/app/src/main/res/drawable-hdpi/ic_expand_more_white.png new file mode 100644 index 0000000000..74cffcf202 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_expand_more_white.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_search_white.png b/app/src/main/res/drawable-hdpi/ic_search_white.png new file mode 100644 index 0000000000..a3210742d6 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_search_white.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_add_circle_white.png b/app/src/main/res/drawable-mdpi/ic_add_circle_white.png new file mode 100644 index 0000000000..e7959eb502 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_add_circle_white.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_expand_less_white.png b/app/src/main/res/drawable-mdpi/ic_expand_less_white.png new file mode 100644 index 0000000000..c735c8ca25 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_expand_less_white.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_expand_more_white.png b/app/src/main/res/drawable-mdpi/ic_expand_more_white.png new file mode 100644 index 0000000000..e72148d7c9 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_expand_more_white.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_search_white.png b/app/src/main/res/drawable-mdpi/ic_search_white.png new file mode 100644 index 0000000000..97351f02fe Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_search_white.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_add_circle_white.png b/app/src/main/res/drawable-xhdpi/ic_add_circle_white.png new file mode 100644 index 0000000000..08f5e12811 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_add_circle_white.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_expand_less_white.png b/app/src/main/res/drawable-xhdpi/ic_expand_less_white.png new file mode 100644 index 0000000000..0008f33b1d Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_expand_less_white.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_expand_more_white.png b/app/src/main/res/drawable-xhdpi/ic_expand_more_white.png new file mode 100644 index 0000000000..a0f9e645e1 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_expand_more_white.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_search_white.png b/app/src/main/res/drawable-xhdpi/ic_search_white.png new file mode 100644 index 0000000000..f9d04518b1 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_search_white.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_add_circle_white.png b/app/src/main/res/drawable-xxhdpi/ic_add_circle_white.png new file mode 100644 index 0000000000..0fdbc572a7 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_add_circle_white.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_expand_less_white.png b/app/src/main/res/drawable-xxhdpi/ic_expand_less_white.png new file mode 100644 index 0000000000..0e07727633 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_expand_less_white.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_expand_more_white.png b/app/src/main/res/drawable-xxhdpi/ic_expand_more_white.png new file mode 100644 index 0000000000..9173968c8f Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_expand_more_white.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_search_white.png b/app/src/main/res/drawable-xxhdpi/ic_search_white.png new file mode 100644 index 0000000000..722ff81956 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_search_white.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_add_circle_white.png b/app/src/main/res/drawable-xxxhdpi/ic_add_circle_white.png new file mode 100644 index 0000000000..91967dbf08 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_add_circle_white.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_expand_less_white.png b/app/src/main/res/drawable-xxxhdpi/ic_expand_less_white.png new file mode 100644 index 0000000000..27403f79ef Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_expand_less_white.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_expand_more_white.png b/app/src/main/res/drawable-xxxhdpi/ic_expand_more_white.png new file mode 100644 index 0000000000..dde85bb770 Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_expand_more_white.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_search_white.png b/app/src/main/res/drawable-xxxhdpi/ic_search_white.png new file mode 100644 index 0000000000..47cc04fbef Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_search_white.png differ diff --git a/app/src/main/res/layout/item_room.xml b/app/src/main/res/layout/item_room.xml index e822c5d95d..c19e5a54f3 100644 --- a/app/src/main/res/layout/item_room.xml +++ b/app/src/main/res/layout/item_room.xml @@ -10,7 +10,7 @@ android:minHeight="48dp"> - diff --git a/app/src/main/res/layout/item_room_category.xml b/app/src/main/res/layout/item_room_category.xml new file mode 100644 index 0000000000..c0115b5a35 --- /dev/null +++ b/app/src/main/res/layout/item_room_category.xml @@ -0,0 +1,42 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 8f3ff78e9e..5dd52be53e 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -9,5 +9,10 @@ #a5a5a6 #5f6268 #7bb2ea - + #929eb4 + #c1c9d6 + #2e2f32 + #9fa9ba + #a5aab2 + #ebedf8