Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

Homework_View_@_Resources#61

Open
AnGuru-60 wants to merge 1 commit intoAndroid-Developer-Basic:masterAndroid-Developer-Basic/View-Resources:masterfrom
AnGuru-60:masterAnGuru-60/View-Resources:masterCopy head branch name to clipboard
Open

Homework_View_@_Resources#61
AnGuru-60 wants to merge 1 commit intoAndroid-Developer-Basic:masterAndroid-Developer-Basic/View-Resources:masterfrom
AnGuru-60:masterAnGuru-60/View-Resources:masterCopy head branch name to clipboard

Conversation

@AnGuru-60
Copy link

No description provided.

android:layout_marginHorizontal="10dp"
android:layout_marginEnd="12dp"
android:text="@string/login"
android:textColor="#3E5F90"

Choose a reason for hiding this comment

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

Лучше избегать хардкорных значений, хоть у нас учебные проекты

import androidx.recyclerview.widget.RecyclerView
class CartViewHolder(view: View) : RecyclerView.ViewHolder(view) {

private val title: TextView by lazy { view.findViewById(R.id.name) }

Choose a reason for hiding this comment

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

В ViewHolder это неэффективно, так как findViewById вызывается при каждом создании холдера. Лучше инициализировать напрямую в конструкторе без lazy


class MainActivity : AppCompatActivity() {

private val login_Dialog by lazy { createMaterialDialog() }

Choose a reason for hiding this comment

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

Принято использовать camelCase для имен переменных. Давайте использовать loginDialog для соответствия конвенциям языка

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.