Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0613· OpenAIAi2 WildChat-4.8M (AI2)

Добавь отдельный блок с фоновым цветом на который перенеси название , описание и рейтинг…

  1. User

    Добавь отдельный блок с фоновым цветом на который перенеси название , описание и рейтинг , так же сюда добавь кнопку “Перейти” иконки убери , так же все размести красиво , не забудь что в конце ты должен предоставить полный xml: <androidx.cardview.widget.CardView xmlns:android=“http://schemas.android.com/apk/res/android” xmlns:app=“http://schemas.android.com/apk/res-auto” android:layout_width=“match_parent” android:layout_height=“200dp” app:cardCornerRadius=“4dp” app:cardElevation=“2dp”>

    <ImageView android:id=“@+id/cardBackgroundImage” android:layout_width=“match_parent” android:layout_height=“match_parent” android:adjustViewBounds=“true” android:scaleType=“centerCrop” />

    <ImageView android:id=“@+id/icon1” android:layout_width=“0dp” android:layout_height=“wrap_content” android:layout_weight=“0.2” android:src=“@drawable/icon1” />

    <TextView android:layout_width=“0dp” android:layout_height=“wrap_content” android:layout_weight=“0.6” android:text=“Title” android:textStyle=“bold” android:textColor=“@color/white”/>

    <ImageView android:id=“@+id/icon2” android:layout_width=“0dp” android:layout_height=“wrap_content” android:layout_weight=“0.2” android:src=“@drawable/icon2” />

    <TextView android:layout_width=“wrap_content” android:layout_height=“wrap_content” android:layout_below=“@id/cardBackgroundImage” android:layout_alignParentTop=“true” android:layout_alignParentEnd=“true” android:text=“Rating” android:textStyle=“bold” />

    </androidx.cardview.widget.CardView>

  2. Assistant

    <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="200dp" app:cardCornerRadius="4dp" app:cardElevation="2dp">

    </androidx.cardview.widget.CardView>

  3. User

    Блок с фоном должен знимать 30% от ширины блока и при этом не сдвигать картинку , ты так же забыл перенести все TextVirew в этот блок и красиво их внутри разместить

  4. Assistant

    <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="200dp" app:cardCornerRadius="4dp" app:cardElevation="2dp">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    
        <ImageView
            android:id="@+id/cardBackgroundImage"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:adjustViewBounds="true"
            android:scaleType="centerCrop" />
    
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:background="#C0C0C0"
            android:layout_alignParentTop="true"
            android:layout_marginHorizontal="30%">
    
            <TextView
                android:id="@+id/titleTextView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="Title"
                android:textStyle="bold"
                android:textColor="@color/white"
                android:padding="8dp" />
    
            <TextView
                android:id="@+id/genreTextView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="Genre"
                android:textStyle="bold"
                android:textColor="@color/white"
                android:padding="8dp" />
    
            <TextView
                android:id="@+id/ratingTextView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="Rating"
                android:textStyle="bold"
                android:textColor="@color/white"
                android:padding="8dp" />
    
            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Перейти"
                android:background="@color/blue"
                android:textColor="@color/white"
                android:layout_gravity="center" />
    
        </LinearLayout>
    
    </RelativeLayout>
    

    </androidx.cardview.widget.CardView>