Закругленная картинка на главном экране
This commit is contained in:
parent
5cf8fe6f0d
commit
9e5f249714
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="200dp"
|
android:layout_width="200dp"
|
||||||
android:id="@+id/examName"
|
android:id="@+id/name_list"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
android:text="First Exam"
|
android:text="@string/list_name"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
@ -26,16 +26,16 @@
|
|||||||
android:id="@+id/examPic"
|
android:id="@+id/examPic"
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_below="@+id/examName"
|
android:layout_below="@+id/name_list"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
android:layout_marginTop="7dp" />
|
android:layout_marginTop="7dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/examDate"
|
android:id="@+id/time"
|
||||||
android:layout_toEndOf="@+id/examPic"
|
android:layout_toEndOf="@+id/examPic"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/examName"
|
android:layout_below="@+id/name_list"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
@ -47,16 +47,36 @@
|
|||||||
android:id="@+id/examPic2"
|
android:id="@+id/examPic2"
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_below="@+id/examDate"
|
android:layout_below="@+id/time"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
android:layout_marginTop="7dp" />
|
android:layout_marginTop="7dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/examMessage"
|
android:id="@+id/identificator"
|
||||||
android:layout_toEndOf="@+id/examPic2"
|
android:layout_toEndOf="@+id/examPic2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/examDate"
|
android:layout_below="@+id/time"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="Best Of Luck"
|
||||||
|
android:textSize="16sp"/>
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/examPic2"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_below="@+id/time"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="7dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/type"
|
||||||
|
android:layout_toEndOf="@+id/examPic2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/time"
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
|
@ -37,19 +37,31 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
<ImageView
|
android:id="@+id/photo2"
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
app:cardCornerRadius="12dp"
|
||||||
|
android:layout_margin="5dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/scan"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:elevation="10dp">
|
||||||
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
android:id="@+id/photo"
|
android:id="@+id/photo"
|
||||||
android:layout_width="120dp"
|
android:layout_width="120dp"
|
||||||
android:layout_height="120dp"
|
android:layout_height="120dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
|
style="@style/roundedImageView"
|
||||||
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/scan"
|
app:layout_constraintBottom_toTopOf="@+id/scan"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/fullname"
|
android:id="@+id/fullname"
|
||||||
style="@style/Theme.UiTemplate.TextH3"
|
style="@style/Theme.UiTemplate.TextH3"
|
||||||
@ -60,7 +72,7 @@
|
|||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/photo"
|
app:layout_constraintTop_toBottomOf="@+id/photo2"
|
||||||
tools:text="@tools:sample/full_names" />
|
tools:text="@tools:sample/full_names" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
<style name="Theme.UiTemplate.CardView" parent="Widget.MaterialComponents.CardView">
|
<style name="Theme.UiTemplate.CardView" parent="Widget.MaterialComponents.CardView">
|
||||||
<item name="cardBackgroundColor">@color/BackgroundGray</item>
|
<item name="cardBackgroundColor">@color/BackgroundGray</item>
|
||||||
<item name="cardElevation">0dp</item>
|
<item name="cardElevation">0dp</item>
|
||||||
<item name="cardCornerRadius">30dp</item>
|
<item name="cardCornerRadius">120dp</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
8
app/src/main/res/values/rounded_image_view_style.xml
Normal file
8
app/src/main/res/values/rounded_image_view_style.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<style name="roundedImageView" parent="">
|
||||||
|
<item name="cornerFamily">rounded</item>
|
||||||
|
<item name="cornerSize">20dp</item>
|
||||||
|
<item name="cornerRadius">50dp</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
4
app/src/main/res/values/strings_entry_list.xml
Normal file
4
app/src/main/res/values/strings_entry_list.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="list_name">Entry History</string>
|
||||||
|
</resources>
|
Loading…
x
Reference in New Issue
Block a user