发票界面的点击事件,我的界面的完善

This commit is contained in:
huangrui 2024-06-02 10:55:36 +08:00
parent acfed9ee98
commit 5a0b3f8330
22 changed files with 407 additions and 152 deletions

View File

@ -22,6 +22,7 @@
android:theme="@style/Theme.Huangrui"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".Alterphone_sendmessage"
android:exported="false" />
@ -151,8 +152,12 @@
android:name=".Login"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true">
android:name=".Carbon"
android:exported="false"
/>
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@ -0,0 +1,14 @@
package com.hnucm.c25;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class Carbon extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_carbon);
}
}

View File

@ -8,18 +8,36 @@ import androidx.recyclerview.widget.RecyclerView;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.gson.Gson;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
public class KaiFaPiao extends AppCompatActivity {
RecyclerView recyclerView ;
MyAdapter myAdapter ;
List<history_item.TakeHistoryDTO> history_items = new ArrayList<>();
TextView fapiao;
TextView money;
Set<Integer> selectedItems = new HashSet<>();
ImageView allSelect ;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -28,6 +46,9 @@ public class KaiFaPiao extends AppCompatActivity {
myAdapter = new MyAdapter();
recyclerView.setAdapter(myAdapter);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
fapiao = findViewById(R.id.textView75);
money=findViewById(R.id.textView76);
allSelect=findViewById(R.id.imageView96);
//todo 返回我的
ImageView back = findViewById(R.id.imageView92);
back.setOnClickListener(new View.OnClickListener() {
@ -37,12 +58,90 @@ public class KaiFaPiao extends AppCompatActivity {
startActivity(intent);
}
});
//todo 全选
allSelect.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
toggleSelectAll(!selectedItems.isEmpty());
}
});
Request request = new Request.Builder()
.url("https://test04.usemock.com/takeHistory")
.get()
.build();
OkHttpClient okHttpClient = new OkHttpClient();
Call call = okHttpClient.newCall(request);
//创建了一个线程
call.enqueue(new Callback() {
@Override
public void onFailure(@NonNull Call call, @NonNull IOException e) {
//请求失败
}
@Override
public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {
//请求成功
String result = response.body().string();
Log.i("test",result);
//所有对于UI控件的操作行为放在主线程中 解决方法切换到主线程
runOnUiThread(new Runnable() {
@Override
public void run() {
try {
Gson gson = new Gson();
history_item historyItem = gson.fromJson(result,history_item.class);
history_items.addAll(historyItem.takeHistory); // 将解析的数据添加到列表中
myAdapter.notifyDataSetChanged();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
});
}
});
}
public void toggleSelectAll(boolean isSelected) {
if (isSelected&&selectedItems.size()==history_items.size()) {
// 如果当前状态是全选则清空selectedItems
selectedItems.clear();
fapiao.setSelected(false);
} else {
// 如果当前状态不是全选则添加所有项到selectedItems
for (int i = 0; i < history_items.size(); i++) {
selectedItems.add(i);
}
fapiao.setSelected(true);
}
myAdapter.notifyDataSetChanged();
myAdapter.calculateTotalAmount();
}
public class MyViewHolder extends RecyclerView.ViewHolder {
ImageView select ;
TextView startTextView;
TextView endTextView;
TextView timeTextView;
TextView moneyTextView;
ImageView enterImage;
ImageView endImage;
ConstraintLayout history;
public MyViewHolder(@NonNull View itemView) {
super(itemView);
select=itemView.findViewById(R.id.imageView94);
startTextView = itemView.findViewById(R.id.startTextView);
endTextView = itemView.findViewById(R.id.endTextView);
timeTextView = itemView.findViewById(R.id.timeTextView);
moneyTextView = itemView.findViewById(R.id.moneyTextView);
endImage = itemView.findViewById(R.id.endImage);
enterImage = itemView.findViewById(R.id.enterImage);
history = findViewById(R.id.history);
}
public void setSelected(boolean isSelected) {
select.setSelected(isSelected);
}
}
public class MyAdapter extends RecyclerView.Adapter<MyViewHolder>{
@ -59,25 +158,56 @@ public class KaiFaPiao extends AppCompatActivity {
//设置item中的控件设置值 点击事件
@Override
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
history_item.TakeHistoryDTO historyItem = history_items.get(position);
holder.startTextView.setText(historyItem.start);
holder.moneyTextView.setText(""+historyItem.price);
holder.timeTextView.setText(historyItem.time);
holder.endTextView.setText(historyItem.end);
//TODO 点击事件
// 更新视图以反映选中状态
holder.setSelected(selectedItems.contains(position));
// 处理点击事件
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//TODO 跳转到行程详情
ImageView xuanzhong = findViewById(R.id.imageView94);
xuanzhong.setSelected(true);
// Intent intent = new Intent(KaiFaPiao.this, linedetail.class);
// startActivity(intent);
// 切换选中状态
if (selectedItems.contains(position)) {
selectedItems.remove(position);
holder.setSelected(false);
} else {
selectedItems.add(position);
holder.setSelected(true);
}
// 重新计算总金额
calculateTotalAmount();
}
});
}
private void calculateTotalAmount() {
double totalAmount = 0;
for (Integer position : selectedItems) {
history_item.TakeHistoryDTO item = history_items.get(position);
totalAmount += Double.parseDouble(item.price);
}
// 更新金额显示
money.setText(String.format(Locale.getDefault(), "%.2f", totalAmount));
// 根据selectedItems是否为空来设置fapiao的选中状态
if (!selectedItems.isEmpty()) {
fapiao.setSelected(true);
} else {
fapiao.setSelected(false);
}
}
//item显示条数
@Override
public int getItemCount() {
return 10;
return history_items.size();
}
}
}

View File

@ -3,6 +3,7 @@ package com.hnucm.c25;
import android.content.Intent;
import android.os.Bundle;
import androidx.cardview.widget.CardView;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
@ -21,7 +22,9 @@ public class MyFragment extends Fragment {
Bundle savedInstanceState) {
ImmersionBar.with(this).init();
View view = inflater.inflate(R.layout.fragment_my, container, false);
ImageView enter =view. findViewById(R.id.imageView137);
// ImageView enter =view. findViewById(R.id.imageView137);
// CardView enter = view.findViewById(R.id.enter);
TextView enter = view.findViewById(R.id.textView74);
enter.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

View File

@ -84,6 +84,7 @@ public class MyLogin extends AppCompatActivity {
@Override
public void onClick(View v) {
Intent intent = new Intent(MyLogin.this,shouye.class);
intent.putExtra("id",3);
startActivity(intent);
}
});
@ -92,7 +93,8 @@ public class MyLogin extends AppCompatActivity {
saoma.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MyLogin.this,TakeSubwayFragment.class);
Intent intent = new Intent(MyLogin.this,shouye.class);
intent.putExtra("id",2);
startActivity(intent);
}
});

View File

@ -131,6 +131,14 @@ public class ShouyeFragment extends Fragment {
startActivity(intent);
}
});
CardView carbon= view.findViewById(R.id.cardView6);
carbon.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getContext(),Carbon.class);
startActivity(intent);
}
});
return view;
}
}

View File

@ -131,7 +131,7 @@ public class SubwayHistory extends AppCompatActivity {
history_item.TakeHistoryDTO historyItem = history_items.get(position);
holder.startTextView.setText(historyItem.start);
holder.finishTextView.setText(historyItem.status);
holder.moneyTextView.setText(historyItem.price);
holder.moneyTextView.setText(""+historyItem.price);
holder.timeTextView.setText(historyItem.time);
holder.endTextView.setText(historyItem.end);

View File

@ -61,6 +61,7 @@ MyFragment myFragment = new MyFragment();
getSupportFragmentManager().beginTransaction().hide(takeSubwayFragment).hide(shouyeFragment).show(myFragment).commit();
}
});
//1是我的2是乘车3是首页
int id = getIntent().getIntExtra("id",0);
if(id==1){
getSupportFragmentManager()
@ -68,5 +69,11 @@ MyFragment myFragment = new MyFragment();
.hide(takeSubwayFragment).hide(shouyeFragment).show(myFragment).commit();
}
if(id==2){
getSupportFragmentManager().beginTransaction().hide(myFragment).hide(shouyeFragment).show(takeSubwayFragment).commit();
}
if(id==3){
getSupportFragmentManager().beginTransaction().hide(takeSubwayFragment).hide(myFragment).show(shouyeFragment).commit();
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#2F3D68"/> <!-- 背景颜色 -->
<corners android:radius="50dp"/> <!-- 圆角半径 -->
</shape>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#B1B7CB"/> <!-- 背景颜色 -->
<corners android:radius="50dp"/> <!-- 圆角半径 -->
</shape>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="false" android:drawable="@drawable/fapiao_roundcorner_selected" />
<item android:state_selected="true" android:drawable="@drawable/fapiao_roundcorner"/>
</selector>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="-90"
android:startColor="#6ECCFF"
android:endColor="#EEFCFD">
</gradient>
</shape>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF"/> <!-- 背景颜色 -->
<corners android:radius="50dp"/> <!-- 圆角半径 -->
<!-- <padding android:left="1dp" android:top="1dp" android:right="1dp" android:bottom="1dp"/> &lt;!&ndash; 内边距 &ndash;&gt;-->
<!-- <stroke android:width=1dp" android:color="#FF0000"/> &lt;!&ndash; 边框 &ndash;&gt;-->
</shape>

View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Carbon">
<ImageView
android:id="@+id/imageView142"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/arrow" />
<TextView
android:id="@+id/textView71"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="返回"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/imageView142"
app:layout_constraintStart_toEndOf="@+id/imageView142"
app:layout_constraintTop_toTopOf="@+id/imageView142" />
<TextView
android:id="@+id/textView72"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="关闭"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/textView71"
app:layout_constraintStart_toEndOf="@+id/textView71"
app:layout_constraintTop_toTopOf="@+id/textView71" />
<TextView
android:id="@+id/textView73"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="碳普惠"
android:textSize="19sp"
android:textColor="@color/black"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="55dp"
android:background="@drawable/jianbianse"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0">
<ImageView
android:id="@+id/imageView143"
android:layout_width="400dp"
android:layout_height="350dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.454"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.416"
app:srcCompat="@drawable/city1" />
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginStart="24dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="24dp"
android:background="#69BAE5"
app:cardBackgroundColor="#69BAE5"
app:cardCornerRadius="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -122,22 +122,13 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="开票金额:¥0.00"
android:text="开票金额:¥ "
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/textView300"
app:layout_constraintStart_toEndOf="@+id/textView300"
app:layout_constraintTop_toTopOf="@+id/textView300" />
<ImageView
android:id="@+id/imageView95"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/kai" />
<ImageView
android:id="@+id/imageView96"
android:layout_width="25dp"
@ -147,5 +138,30 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/quan" />
<TextView
android:id="@+id/textView75"
android:layout_width="100dp"
android:layout_height="40dp"
android:layout_marginEnd="24dp"
android:textSize="16sp"
android:gravity="center"
android:text="开具发票"
android:textColor="@color/white"
android:background="@drawable/fapiao_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView76"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0.00"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/textView301"
app:layout_constraintStart_toEndOf="@+id/textView301"
app:layout_constraintTop_toTopOf="@+id/textView301" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -521,11 +521,11 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/imageView70"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginBottom="37dp"
app:layout_constraintBottom_toBottomOf="@+id/constraintLayout11"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/weima" />
app:srcCompat="@drawable/ma1" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -153,72 +153,6 @@
app:layout_constraintTop_toTopOf="@+id/imageView141" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout38"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="16dp"
android:background="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout37">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="个人信息收集清单"
android:textColor="@color/black"
android:textSize="17sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView142"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginEnd="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/arrow__right" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout39"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="16dp"
android:background="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout38">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="第三方信息共享清单"
android:textColor="@color/black"
android:textSize="17sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView143"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginEnd="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/arrow__right" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout40"
android:layout_width="match_parent"
@ -228,7 +162,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout39">
app:layout_constraintTop_toBottomOf="@+id/constraintLayout37">
<TextView
android:layout_width="wrap_content"

View File

@ -2,22 +2,22 @@
<androidx.constraintlayout.widget.ConstraintLayout 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/history"
android:layout_width="match_parent"
android:layout_height="100dp">
<TextView
android:id="@+id/startTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="公主坟"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/enterImage"
app:layout_constraintStart_toEndOf="@+id/enterImage"
app:layout_constraintTop_toTopOf="@+id/enterImage"
app:layout_constraintVertical_bias="1.0" />
<TextView
android:id="@+id/startTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="公主坟"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/enterImage"
app:layout_constraintStart_toEndOf="@+id/enterImage"
app:layout_constraintTop_toTopOf="@+id/enterImage"
app:layout_constraintVertical_bias="1.0" />
<ImageView
android:id="@+id/enterImage"
@ -30,26 +30,26 @@
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/enter" />
<ImageView
android:id="@+id/endImage"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginStart="64dp"
app:layout_constraintBottom_toBottomOf="@+id/startTextView"
app:layout_constraintStart_toEndOf="@+id/startTextView"
app:layout_constraintTop_toTopOf="@+id/startTextView"
app:srcCompat="@drawable/out" />
<ImageView
android:id="@+id/endImage"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginStart="64dp"
app:layout_constraintBottom_toBottomOf="@+id/startTextView"
app:layout_constraintStart_toEndOf="@+id/startTextView"
app:layout_constraintTop_toTopOf="@+id/startTextView"
app:srcCompat="@drawable/out" />
<TextView
android:id="@+id/endTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="大望路"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/endImage"
app:layout_constraintStart_toEndOf="@+id/endImage"
app:layout_constraintTop_toTopOf="@+id/endImage" />
<TextView
android:id="@+id/endTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="大望路"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/endImage"
app:layout_constraintStart_toEndOf="@+id/endImage"
app:layout_constraintTop_toTopOf="@+id/endImage" />
<TextView
android:id="@+id/moneyTextView"
@ -63,23 +63,23 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/timeTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="12月17日08:11-09:13"
android:textColor="#9C999C"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="@+id/enterImage"
app:layout_constraintTop_toBottomOf="@+id/enterImage" />
<TextView
android:id="@+id/timeTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="12月17日08:11-09:13"
android:textColor="#9C999C"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="@+id/enterImage"
app:layout_constraintTop_toBottomOf="@+id/enterImage" />
<TextView
android:id="@+id/textView274"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/textView274"
android:layout_width="match_parent"
android:layout_height="1dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<ImageView
@ -90,6 +90,5 @@
android:background="@drawable/fapiao"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/quan" />
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -68,6 +68,7 @@
android:layout_height="200dp"
android:background="#2F3D68"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
@ -94,14 +95,19 @@
app:layout_constraintStart_toStartOf="@+id/textView273"
app:layout_constraintTop_toBottomOf="@+id/textView273" />
<ImageView
android:id="@+id/imageView137"
android:layout_width="130dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
<TextView
android:id="@+id/textView74"
android:layout_width="100dp"
android:layout_height="40dp"
android:gravity="center"
android:layout_marginTop="16dp"
android:background="@drawable/rounded_corners"
android:text="登录/注册"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="@+id/textView275"
app:layout_constraintTop_toBottomOf="@+id/textView275"
app:srcCompat="@drawable/nologin" />
app:layout_constraintTop_toBottomOf="@+id/textView275" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -75,12 +75,12 @@
android:id="@+id/moneyTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="¥4.00"
android:text="4.00"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@+id/finishTextView"
app:layout_constraintTop_toBottomOf="@+id/finishTextView" />
app:layout_constraintBottom_toBottomOf="@+id/textView77"
app:layout_constraintStart_toEndOf="@+id/textView77"
app:layout_constraintTop_toTopOf="@+id/textView77" />
<TextView
android:id="@+id/timeTextView"
@ -100,4 +100,15 @@
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/moneyTextView" />
<TextView
android:id="@+id/textView77"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="¥ "
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@+id/finishTextView"
app:layout_constraintTop_toBottomOf="@+id/finishTextView" />
</androidx.constraintlayout.widget.ConstraintLayout>