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

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

  1. User

    Сделай отдельный Layout с фоновым цветом на который перенеси название , описание и рейтинг , так же сюда добавь кнопку "Перейти" иконки убери : <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:layout_alignParentBottom="true"
            android:minHeight="72dp"
            android:orientation="horizontal">
    
            <!-- Первая иконка -->
            <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" />
    
        </LinearLayout>
        
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:text="Genre"
            android:textStyle="bold" />
    
        <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" />
    
    </RelativeLayout>
    

    </androidx.cardview.widget.CardView>

  2. Assistant

    <!-Отдельный Layout с фоновым цветом-> <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">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/background_color"
        android:orientation="vertical">
    
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Title"
            android:textStyle="bold"
            android:padding="16dp"/>
    
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Description"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"/>
    
        <TextView
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Rating"
            android:textStyle="bold"
            android:paddingLeft="16dp"/>
    
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Перейти"
            android:layout_gravity="center"
            android:layout_marginTop="16dp"
            android:background="@drawable/button_background"
            android:textColor="@color/button_text_color" />
    
    </LinearLayout>
    

    </androidx.cardview.widget.CardView>

  3. User

    продублируй новый xml файл полностью

  4. Assistant

    <!-Отдельный Layout с фоновым цветом-> <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">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/background_color"
        android:orientation="vertical">
    
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Title"
            android:textStyle="bold"
            android:padding="16dp"/>
    
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Description"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"/>
    
        <TextView
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Rating"
            android:textStyle="bold"
            android:paddingLeft="16dp"/>
    
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Перейти"
            android:layout_gravity="center"
            android:layout_marginTop="16dp"
            android:background="@drawable/button_background"
            android:textColor="@color/button_text_color" />
    
    </LinearLayout>
    

    </androidx.cardview.widget.CardView>