Skip to content

Homework#62

Open
aksenovasmail-git wants to merge 1 commit intoAndroid-Developer-Basic:masterfrom
aksenovasmail-git:master
Open

Homework#62
aksenovasmail-git wants to merge 1 commit intoAndroid-Developer-Basic:masterfrom
aksenovasmail-git:master

Conversation

@aksenovasmail-git
Copy link

No description provided.


<item name="colorOnSurface">#C4C6CF</item>
<item name="colorOnBackground">#C4C6CF</item>
<color name="login_toolbar_content">#C4C6CF</color>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Внутри style можно использовать только item для определения атрибутов темы
Тег color допустим только в файлах типа colors.xml. Это вызывает ошибку компиляции: "Can not extract resource from ParsedResource"

import otus.gpb.homework.viewandresources.databinding.ItemCartBinding
import otus.gpb.homework.viewandresources.model.CartItem

data class CartItem(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Дублируется data class CartItem, хотя он уже определен в model/CartItem.kt и импортирован

<item name="android:textColor">?attr/colorOnSurface</item>
<item name="android:textSize">20sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">?attr/colorOnBackground</item>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Дважды указан android:textColor. Последний перезаписывает первый, поэтому применяется только ?attr/colorOnBackground. Удалите один из них, оставив нужный по макету.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants