zoukankan      html  css  js  c++  java
  • 冲刺第十八天

    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 = "        本平台目前提供的服务仅包括理发预约服务,旨在帮助人们减少理发排队时所浪费的时间。
    
    " +
    47                 "服务流程:
    " +
    48                 "1、选择想要理发的理发店;
    " +
    49                 "2、查看主界面对应理发店下面的目前排队人数;
    " +
    50                 "3、若要预约点击预约按钮;
    " +
    51                 "4、再次确认是否预约;
    " +
    52                 "5、回主页面关注目前排队人数;
    " +
    53                 "6、人数较少时可以前往;
    
    " +
    54                 "注意事项:
    " +
    55                 "1、目前本软件所进行交易不包含任何费用交易,理发费用需使用者理发完成后自行缴纳理发店;
    " +
    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>
  • 相关阅读:
    中国大学MOOC-陈越、何钦铭-数据结构-2016秋期末考试
    Manifesto of the Communist Party
    PAT/字符串处理习题集(二)
    PAT/字符串处理习题集(一)
    PAT/进制转换习题集
    PAT/图形输出习题集
    2017-2018-2 《密码与安全新技术》第3周作业
    2017-2018-2 20179226 《网络攻防》第7周作业
    2017-2018-2 20179226 《网络攻防》第6周作业
    2017-2018-2 《密码与安全新技术》第2周作业
  • 原文地址:https://www.cnblogs.com/zhangzhongkun/p/11060901.html
Copyright © 2011-2022 走看看