n
Size: a a a
n
l
АМ
АМ
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/notif_background"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_weight="1"
android:padding="2dp">
<ImageView
android:id="@+id/notifImage"
android:layout_width="@dimen/_48sdp"
android:layout_height="@dimen/_48sdp"
android:layout_gravity="center_vertical|center_horizontal"
android:src="@drawable/frame_like" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:orientation="vertical"
android:padding="4dp">
<TextView
android:id="@+id/notifTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:maxLines="1"
android:fontFamily="@font/sf_pro_display_bold"
android:text="Title"
android:textColor="@color/white" />
<TextView
android:id="@+id/notifTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:maxLines="1"
android:fontFamily="@font/sf_pro_display_regular"
android:text="Notification detail text"
android:textColor="@color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:padding="2dp">
<Button
android:layout_width="40dp"
android:layout_height="@dimen/_36sdp"
android:layout_gravity="center"
android:padding="8dp"
android:background="@drawable/oval_btn_white"
android:fontFamily="@font/sf_pro_display_regular"
android:textColor="#ea7d24" />
</LinearLayout>
</LinearLayout>
S(
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/notif_background"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_weight="1"
android:padding="2dp">
<ImageView
android:id="@+id/notifImage"
android:layout_width="@dimen/_48sdp"
android:layout_height="@dimen/_48sdp"
android:layout_gravity="center_vertical|center_horizontal"
android:src="@drawable/frame_like" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:orientation="vertical"
android:padding="4dp">
<TextView
android:id="@+id/notifTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:maxLines="1"
android:fontFamily="@font/sf_pro_display_bold"
android:text="Title"
android:textColor="@color/white" />
<TextView
android:id="@+id/notifTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:maxLines="1"
android:fontFamily="@font/sf_pro_display_regular"
android:text="Notification detail text"
android:textColor="@color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:padding="2dp">
<Button
android:layout_width="40dp"
android:layout_height="@dimen/_36sdp"
android:layout_gravity="center"
android:padding="8dp"
android:background="@drawable/oval_btn_white"
android:fontFamily="@font/sf_pro_display_regular"
android:textColor="#ea7d24" />
</LinearLayout>
</LinearLayout>
a
VD
АМ
N
ИТ
АА
shape
добавленное в свойство background
у объекта? Мне необходимо менять цвет shape
программно. public ViewHolderColorsRV(View itemView) {
super(itemView);
layer = itemView;
text = itemView.findViewById(R.id.color_shape); //TextView
background_shape = text.findViewById(R.id.brush_solid); //Shape
}
IK
АМ
<androidx.cardview.widget.CardViewКак-то так но есть и другие либы
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:elevation="4dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/perf_image"
android:layout_width="wrap_content"
android:layout_height="200dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
app:imageUrl="@{schedule.image_url}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.github.mmin18.widget.RealtimeBlurView
android:id="@+id/blurView"
android:layout_width="match_parent"
android:layout_height="70dp"
app:layout_constraintBottom_toBottomOf="@id/perf_image"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:realtimeBlurRadius="10dp"
app:realtimeOverlayColor="#60000000" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
M
IK
<androidx.cardview.widget.CardViewКак-то так но есть и другие либы
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:elevation="4dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/perf_image"
android:layout_width="wrap_content"
android:layout_height="200dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
app:imageUrl="@{schedule.image_url}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.github.mmin18.widget.RealtimeBlurView
android:id="@+id/blurView"
android:layout_width="match_parent"
android:layout_height="70dp"
app:layout_constraintBottom_toBottomOf="@id/perf_image"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:realtimeBlurRadius="10dp"
app:realtimeOverlayColor="#60000000" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
АМ
IK
AD
M