注销账户、清除缓存、以及弹窗时背景的改变
This commit is contained in:
parent
d08a8fbd9b
commit
acfed9ee98
|
@ -1,12 +1,16 @@
|
|||
package com.hnucm.c25;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
|
||||
|
@ -26,6 +30,7 @@ public class SetActivity extends AppCompatActivity {
|
|||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 修改手机号
|
||||
ConstraintLayout alterphone = findViewById(R.id.constraintLayout35);
|
||||
alterphone.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -34,5 +39,52 @@ public class SetActivity extends AppCompatActivity {
|
|||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
//todo 清除缓存
|
||||
ConstraintLayout clean = findViewById(R.id.constraintLayout37);
|
||||
TextView rubish = findViewById(R.id.textView58);
|
||||
clean.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
rubish.setText("0k");
|
||||
Toast.makeText(SetActivity.this,"清除缓存成功",Toast.LENGTH_SHORT);
|
||||
}
|
||||
});
|
||||
View overlayView = findViewById(R.id.overlayView);
|
||||
//todo 注销账户
|
||||
ConstraintLayout out = findViewById(R.id.constraintLayout40);
|
||||
CardView tishi = findViewById(R.id.cardview);
|
||||
out.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
tishi.setVisibility(View.VISIBLE);
|
||||
overlayView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
TextView xiayibu = findViewById(R.id.textView67);
|
||||
CardView queding = findViewById(R.id.queding);
|
||||
TextView que = findViewById(R.id.textView68);
|
||||
TextView qu = findViewById(R.id.textView70);
|
||||
xiayibu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
tishi.setVisibility(View.INVISIBLE);
|
||||
queding.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
que.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(SetActivity.this,shouye.class);
|
||||
intent.putExtra("id",1);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
qu.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
tishi.setVisibility(View.INVISIBLE);
|
||||
queding.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -54,6 +54,7 @@ public class TakeSubwayFragment extends Fragment {
|
|||
//todo 点击三点水
|
||||
ImageView more = view.findViewById(R.id.imageView75);
|
||||
ConstraintLayout layoutMore = view.findViewById(R.id.more);
|
||||
View overlayView = view.findViewById(R.id.overlayView);
|
||||
more.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -86,11 +87,12 @@ public class TakeSubwayFragment extends Fragment {
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
tanchuang.setVisibility(View.VISIBLE);
|
||||
overlayView.setVisibility(View.VISIBLE);
|
||||
layoutMore.setVisibility(View.INVISIBLE);
|
||||
xiang.setSelected(true);
|
||||
background.getBackground().setAlpha(20);
|
||||
shang.getBackground().setAlpha(128);
|
||||
zhong1.getBackground().setAlpha(128);
|
||||
// background.getBackground().setAlpha(20);
|
||||
// shang.getBackground().setAlpha(128);
|
||||
// zhong1.getBackground().setAlpha(128);
|
||||
// zhong1.setBackgroundColor(0xFF747474);
|
||||
|
||||
// zhong.getBackground().setAlpha(128);
|
||||
|
@ -103,11 +105,7 @@ public class TakeSubwayFragment extends Fragment {
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
tanchuang.setVisibility(View.INVISIBLE);
|
||||
// background.getBackground().setAlpha(255); // 255是不透明的值
|
||||
shang.getBackground().setAlpha(255);
|
||||
zhong1.getBackground().setAlpha(255);
|
||||
zhong.getBackground().setAlpha(255);
|
||||
// zhong1.setBackgroundColor(R.color.white);
|
||||
overlayView.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
});
|
||||
//todo 立即添加
|
||||
|
@ -116,10 +114,7 @@ public class TakeSubwayFragment extends Fragment {
|
|||
@Override
|
||||
public void onClick(View v) {
|
||||
tanchuang.setVisibility(View.INVISIBLE);
|
||||
background.getBackground().setAlpha(255); // 255是不透明的值
|
||||
shang.getBackground().setAlpha(255);
|
||||
zhong1.getBackground().setAlpha(255);
|
||||
zhong.getBackground().setAlpha(255);
|
||||
overlayView.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
<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/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".SetActivity"
|
||||
android:background="#F3F3F3">
|
||||
android:background="#F3F3F3"
|
||||
tools:context=".SetActivity">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout34"
|
||||
|
@ -218,6 +220,7 @@
|
|||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout40"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="16dp"
|
||||
|
@ -248,4 +251,134 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/arrow__right" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="500dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:visibility="invisible"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
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">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView64"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:lineSpacingExtra="11dp"
|
||||
android:lineSpacingMultiplier="1"
|
||||
android:singleLine="false"
|
||||
android:text="账户注销\n申请注销后,系统将在1天后将您的账户注销,在此期间,您将无法继续使用APP。账户完成注销后,将无法恢复,请谨慎操作。\n您提交的注销申请生效前,长沙地铁APP将进行以下验证,以保证您的账户、财产安全;\n(1)请确保所有乘车已完结,若您还在行程中,无法进行注销申请;\n(2)若您账户下存在欠款,需您补清欠款后,再进行注销申请;\n(3)请将您的支付渠道全部解绑;"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView65" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView65"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="温馨提示"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView66"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="#F3F3F3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView64" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView67"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="下一步"
|
||||
android:textColor="#3F51B5"
|
||||
android:textSize="17sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView66" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
<View
|
||||
android:id="@+id/overlayView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="#80000000"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView65"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/queding"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginStart="64dp"
|
||||
android:layout_marginEnd="64dp"
|
||||
android:visibility="invisible"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
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">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView70"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="128dp"
|
||||
android:text="取消"
|
||||
android:textColor="@color/blue_black"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView68"
|
||||
app:layout_constraintTop_toTopOf="@+id/textView68" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView68"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="确定"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView69"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView69" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView69"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="确定注销?"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -204,6 +204,13 @@
|
|||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
<View
|
||||
android:id="@+id/overlayView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="#80000000"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/more"
|
||||
android:layout_width="180dp"
|
||||
|
|
Loading…
Reference in New Issue