mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-314 Dashboard | Fix | Show untitled for an empty new object (#2514)
This commit is contained in:
parent
bd4f0bcad0
commit
2ee309eb48
3 changed files with 9 additions and 2 deletions
|
@ -20,7 +20,7 @@ class ObjectTypeHolder(
|
|||
image = null,
|
||||
name = item.name
|
||||
)
|
||||
tvTitle.text = if (item.name == "") "Untitled" else item.name
|
||||
tvTitle.text = item.name
|
||||
if (item.description.isNullOrBlank()) {
|
||||
tvSubtitle.gone()
|
||||
} else {
|
||||
|
|
|
@ -192,7 +192,12 @@ class FeaturedRelationGroupWidget : ConstraintLayout {
|
|||
if (color != null) {
|
||||
setTextColor(resources.dark(color, defaultTextColor))
|
||||
setBackgroundResource(R.drawable.rect_dv_cell_tag_item)
|
||||
background.setDrawableColor(resources.light(color, defaultBackground))
|
||||
background.setDrawableColor(
|
||||
resources.light(
|
||||
color,
|
||||
defaultBackground
|
||||
)
|
||||
)
|
||||
} else {
|
||||
setTextColor(defaultTextColor)
|
||||
setBackgroundResource(R.drawable.rect_dv_cell_tag_item)
|
||||
|
@ -215,6 +220,7 @@ class FeaturedRelationGroupWidget : ConstraintLayout {
|
|||
is DocumentRelationView.ObjectType -> {
|
||||
val view = TextView(context).apply {
|
||||
id = generateViewId()
|
||||
hint = context.resources.getString(R.string.untitled)
|
||||
text = relation.name
|
||||
isSingleLine = true
|
||||
maxLines = 1
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:hint="@string/untitled"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvSubtitle"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue