feat: added card view with full brightness, and center no cards text

This commit is contained in:
2026-06-09 14:13:32 +03:00
parent 0e9cbcccfe
commit 1b0d535912
11 changed files with 186 additions and 10 deletions
@@ -2,6 +2,7 @@ package ru.omni_devel.cards
import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.Button
import android.widget.LinearLayout
import android.widget.TextView
@@ -55,6 +56,7 @@ class MainActivity : AppCompatActivity() {
text.text = "Add a card to get started"
text.layoutParams = params
text.textAlignment = View.TEXT_ALIGNMENT_CENTER
cardsList.addView(text)
} else {
@@ -71,6 +73,14 @@ class MainActivity : AppCompatActivity() {
button.layoutParams = params
button.cornerRadius = (12 * resources.displayMetrics.density).toInt()
button.setOnClickListener {
val intent = Intent(this, ShowCardActivity::class.java)
intent.putExtra("cardId", card.id)
startActivity(intent)
}
cardsList.addView(button)
}
}