冲刺第十八天
ServiceActivity.java
1 package com.example.lileme.ThreeFragment.MyselfDetile; 2 3 import android.support.v7.app.AppCompatActivity; 4 import android.os.Bundle; 5 import android.view.View; 6 import android.widget.ImageView; 7 import android.widget.TextView; 8 9 import com.example.lileme.R; 10 11 public class ServiceActivity extends AppCompatActivity { 12 private ImageView mIvback; //返回键 13 private TextView mTvtitle; //标题 14 private TextView mTvtext; //获取服务介绍 15 String text; //服务介绍 16 17 @Override 18 protected void onCreate(Bundle savedInstanceState) { 19 super.onCreate(savedInstanceState); 20 setContentView( R.layout.activity_service); 21 mIvback = findViewById(R.id.iv_back); 22 mTvtitle = findViewById(R.id.tv_title); 23 mTvtext = findViewById(R.id.tv_text); 24 mTvtext.setText(gettext(text)); 25 Listener(); 26 } 27 public void Listener(){ 28 Onclick onclick=new Onclick(); 29 mIvback.setOnClickListener(onclick); 30 mTvtitle.setOnClickListener(onclick); 31 } 32 class Onclick implements View.OnClickListener{ 33 34 @Override 35 public void onClick(View v) { 36 switch (v.getId()){ 37 case R.id.iv_back: 38 finish(); 39 break; 40 } 41 } 42 } 43 44 45 public String gettext(String text){ 46 text = " 本平台目前提供的服务仅包括理发预约服务,旨在帮助人们减少理发排队时所浪费的时间。\n\n" + 47 "服务流程:\n" + 48 "1、选择想要理发的理发店;\n" + 49 "2、查看主界面对应理发店下面的目前排队人数;\n" + 50 "3、若要预约点击预约按钮;\n" + 51 "4、再次确认是否预约;\n" + 52 "5、回主页面关注目前排队人数;\n" + 53 "6、人数较少时可以前往;\n\n" + 54 "注意事项:\n" + 55 "1、目前本软件所进行交易不包含任何费用交易,理发费用需使用者理发完成后自行缴纳理发店;\n" + 56 "2、本次预约发起后,即表示您已进行隐私信息授权,平台将对您你的信息严格保密;"; 57 return text; 58 } 59 }
activity_service.xml
1 <?xml version="1.0" encoding="utf-8"?> 2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="match_parent" 4 android:layout_height="match_parent"> 5 <LinearLayout 6 android:id="@+id/ll_1" 7 android:layout_width="match_parent" 8 android:layout_height="wrap_content" 9 android:orientation="horizontal" 10 android:background="@color/indexcolor"> 11 <ImageView 12 android:id="@+id/iv_back" 13 android:layout_width="25dp" 14 android:layout_height="30dp" 15 android:background="@drawable/back" 16 android:scaleY="0.8" 17 android:layout_gravity="center_vertical" 18 android:layout_marginTop="5dp" 19 android:layout_marginBottom="5dp" 20 android:layout_marginLeft="5dp"/> 21 <LinearLayout 22 android:layout_width="match_parent" 23 android:layout_height="wrap_content" 24 android:orientation="vertical"> 25 <TextView 26 android:id="@+id/tv_title" 27 android:layout_width="wrap_content" 28 android:layout_height="wrap_content" 29 android:text="服务介绍" 30 android:textSize="20sp" 31 android:layout_gravity="center_horizontal" 32 android:layout_marginTop="5dp" 33 android:layout_marginBottom="5dp" 34 android:layout_marginRight="15dp"/> 35 </LinearLayout> 36 </LinearLayout> 37 <TextView 38 android:id="@+id/tv_text" 39 android:layout_width="match_parent" 40 android:layout_height="wrap_content" 41 android:layout_below="@+id/ll_1" 42 android:text="asdasdasda" 43 android:textSize="12sp" 44 android:textColor="#3C3C3C" 45 android:layout_margin="10dp" 46 android:gravity="center_vertical" 47 /> 48 </RelativeLayout>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~