feat: added showing card name in title bar
This commit is contained in:
@@ -3,6 +3,7 @@ package ru.omni_devel.cards
|
||||
import android.os.Bundle
|
||||
import android.view.WindowManager
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
@@ -50,6 +51,9 @@ class ShowCardActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
val cardCodeView: ImageView = findViewById(R.id.cardCodeView)
|
||||
val cardNameElement: TextView = findViewById(R.id.cardName)
|
||||
|
||||
cardNameElement.text = cardInfo.name
|
||||
|
||||
val code = generateCode(cardInfo.codeValue, cardInfo.codeType)
|
||||
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:id="@+id/cardName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="OmniCards"
|
||||
android:text="Adding card"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/toolbar2"
|
||||
|
||||
@@ -19,34 +19,25 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:id="@+id/cardName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="OmniCards"
|
||||
android:text="Card name"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/toolbar2"
|
||||
app:layout_constraintStart_toStartOf="@+id/toolbar2"
|
||||
app:layout_constraintTop_toTopOf="@+id/toolbar2" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="vertical"
|
||||
<ImageView
|
||||
android:id="@+id/cardCodeView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/toolbar2"
|
||||
app:layout_constraintVertical_bias="0.0">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cardCodeView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
android:scaleType="fitCenter"/>
|
||||
</LinearLayout>
|
||||
app:layout_constraintTop_toBottomOf="@+id/toolbar2" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user