冲刺第十六天

SuggestionActivity.java
 1 package com.example.lileme.ThreeFragment.MyselfDetile;
 2 
 3 import android.os.Bundle;
 4 import android.support.v7.app.AppCompatActivity;
 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 SuggestionActivity extends AppCompatActivity {
12     private ImageView mIvback;     //返回键
13     private TextView mTvtitle;     //标题
14     @Override
15     protected void onCreate(Bundle savedInstanceState) {
16         super.onCreate(savedInstanceState);
17         setContentView(R.layout.activity_suggestion);
18         mIvback=findViewById(R.id.iv_back);
19         mTvtitle=findViewById(R.id.tv_title);
20         Listener();
21     }
22     public void Listener(){
23         Onclick οnclick=new Onclick();
24         mIvback.setOnClickListener(onclick);
25         mTvtitle.setOnClickListener(onclick);
26     }
27     class Onclick implements View.OnClickListener{
28 
29         @Override
30         public void onClick(View v) {
31             switch (v.getId()){
32                 case R.id.iv_back:
33                     finish();
34                     break;
35             }
36         }
37     }
38 }

activity_suggestion.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     <LinearLayout
 38         android:id="@+id/emile"
 39         android:layout_width="match_parent"
 40         android:layout_height="wrap_content"
 41         android:orientation="horizontal"
 42         android:layout_below="@+id/ll_1"
 43         android:gravity="center_vertical">
 44         <TextView
 45             android:id="@+id/tv_email"
 46             android:layout_width="wrap_content"
 47             android:layout_height="50dp"
 48             android:layout_below="@+id/tv_suggestion"
 49             android:drawableLeft="@drawable/email"
 50             android:gravity="center_vertical"
 51             android:text="投诉邮箱"
 52             android:textSize="17sp"
 53             android:layout_marginLeft="10dp"
 54             android:drawablePadding="10dp"
 55             android:layout_marginRight="8dp"/>
 56         <TextView
 57             android:layout_width="wrap_content"
 58             android:layout_height="wrap_content"
 59             android:text="1403053171@qq.com"
 60             android:textSize="15sp"
 61             android:layout_marginLeft="80dp"/>
 62     </LinearLayout>
 63 
 64     <View
 65         android:layout_width="match_parent"
 66         android:layout_height="1dp"
 67         android:layout_below="@id/emile"
 68         android:background="#B3B3B3"/>
 69     <LinearLayout
 70         android:id="@+id/phone"
 71         android:layout_below="@+id/emile"
 72         android:layout_width="match_parent"
 73         android:layout_height="wrap_content"
 74         android:orientation="horizontal">
 75         <TextView
 76             android:id="@+id/tv_phone"
 77             android:layout_width="wrap_content"
 78             android:layout_height="50dp"
 79             android:layout_below="@+id/emile"
 80             android:drawableLeft="@drawable/phone"
 81             android:gravity="center_vertical"
 82             android:text="客服电话"
 83             android:textSize="17sp"
 84             android:layout_marginLeft="10dp"
 85             android:drawablePadding="10dp"
 86             android:layout_marginRight="8dp"
 87             />
 88         <TextView
 89             android:layout_width="wrap_content"
 90             android:layout_height="wrap_content"
 91             android:textSize="15sp"
 92             android:text="18203232573"
 93             android:layout_marginLeft="130dp"/>
 94     </LinearLayout>
 95     <View
 96         android:layout_width="match_parent"
 97         android:layout_height="1dp"
 98         android:layout_below="@id/phone"
 99         android:background="#B3B3B3"/>
100 </RelativeLayout>

 

转载于:https://www.cnblogs.com/zhangzhongkun/p/11060896.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值