Java I';我在做一个简单的设计时,在某处犯了一个错误

Java I';我在做一个简单的设计时,在某处犯了一个错误,java,android,android-studio,Java,Android,Android Studio,无论我在设计中做了什么,我都想把我写的东西和照片放在一起,但我不能做设计,我想知道我哪里出了问题我在学习新的东西,并试图做一个像照片中那样的设计 我将使用recycler视图和card视图创建其余部分 解释够了,我希望我不想把你弄糊涂 <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http:

无论我在设计中做了什么,我都想把我写的东西和照片放在一起,但我不能做设计,我想知道我哪里出了问题我在学习新的东西,并试图做一个像照片中那样的设计 我将使用recycler视图和card视图创建其余部分 解释够了,我希望我不想把你弄糊涂

<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/imageView6"
            android:layout_width="60dp"
            android:layout_height="60dp"
            android:contentDescription="TODO" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:orientation="vertical">

            <TextView
                android:id="@+id/textView4"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:text="text" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/textView5"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="Date" />
            </LinearLayout>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/textView3"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:text="text" />

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/imageView7"
                android:layout_width="60dp"
                android:layout_height="60dp"" />
        </LinearLayout>
    </LinearLayout>

</androidx.cardview.widget.CardView>



将中心部分拆分为两个线性布局。还向包含日期的
文本视图添加了
android:gravity=“center | bottom”

<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <ImageView
        android:id="@+id/imageView6"
        android:layout_width="60dp"
        android:layout_height="60dp"
        android:contentDescription="TODO" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/textView4"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:text="text" />


            <TextView
                android:id="@+id/textView3"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:text="text" />

        </LinearLayout>

        <TextView
            android:id="@+id/textView5"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center|bottom"
            android:text="Date" />

    </LinearLayout>
    <ImageView
        android:id="@+id/imageView7"
        android:layout_width="60dp"
        android:layout_height="60dp" />
</LinearLayout> </androidx.cardview.widget.CardView>

不清楚您想要实现什么,还有什么错。@Nicolas我想在图像中进行设计您是否尝试将文本视图的重力属性设置为居中?