请生成一个Android 新闻app界面代码
时间: 2024-02-27 12:53:39 浏览: 23
好的,以下是一个简单的 Android 新闻app 界面的代码示例:
```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="News Title"
android:textSize="20sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/image"
android:layout_below="@id/title"
android:layout_width="match_parent"
android:layout_height="200dp"
android:scaleType="centerCrop"
android:src="@drawable/news_image" />
<TextView
android:id="@+id/date"
android:layout_below="@id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="News Date"
android:textSize="14sp" />
<TextView
android:id="@+id/content"
android:layout_below="@id/date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="News Content"
android:textSize="16sp" />
<Button
android:id="@+id/read_more_button"
android:layout_below="@id/content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="Read More" />
</RelativeLayout>
```
这个界面包含一个新闻标题、一张新闻图片、新闻发布日期、新闻内容和一个“阅读更多”按钮。你可以根据自己的需要进行调整和修改。