2024.6.4

更改前端功能界面<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp"
android:background="@drawable/background1"
tools:context=".Index">

<TextView
android:id="@+id/textView_time"
android:layout_width="match_parent"
android:layout_height="95dp"
android:layout_marginTop="20dp"
android:gravity="center"
android:text="当前时间: "
android:textColor="#1C1602"
android:textSize="30sp" />

<!-- 调整轮播图部分,保持在五分之三 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.6"
android:orientation="vertical"
android:layout_marginTop="0dp"
android:layout_marginBottom="16dp">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.viewpager.widget.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="400dp" />

<ImageButton
android:id="@+id/prev_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="false"
android:layout_marginTop="80dp"
android:background="@android:color/transparent"
android:src="@drawable/ic_prev" />

<ImageButton
android:id="@+id/next_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="false"
android:layout_marginTop="80dp"
android:background="@android:color/transparent"
android:src="@drawable/ic_next" />
</RelativeLayout>
</LinearLayout>

<!-- 保持按钮布局在最下方 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center">

<Button
android:id="@+id/Clicksocial"
android:onClick="Socialclick"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="8dp"
android:background="?android:attr/selectableItemBackground"
android:gravity="center"
android:padding="16dp"
android:text="社交"
android:textColor="#000000"
android:textSize="16sp"
android:drawableTop="@drawable/ic_social"
android:drawablePadding="8dp" />

<Button
android:id="@+id/ClickSOS"
android:onClick="SOSclick"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="8dp"
android:background="?android:attr/selectableItemBackground"
android:gravity="center"
android:padding="16dp"
android:text="SOS"
android:textColor="#000000"
android:textSize="16sp"
android:drawableTop="@drawable/ic_sos"
android:drawablePadding="8dp" />

<Button
android:id="@+id/Clickhelp"
android:onClick="Helpclick"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="8dp"
android:background="?android:attr/selectableItemBackground"
android:gravity="center"
android:padding="16dp"
android:text="帮扶"
android:textColor="#000000"
android:textSize="16sp"
android:drawableTop="@drawable/ic_help"
android:drawablePadding="8dp" />
</LinearLayout>

</LinearLayout>
posted @   我也不想的  阅读(3)  评论(0编辑  收藏  举报
(评论功能已被禁用)
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
点击右上角即可分享
微信分享提示