增加用户页面的部分功能页面以及一些动画(点赞)帮助反馈等

This commit is contained in:
tanc 2024-06-14 02:29:48 +08:00
parent 089c749879
commit f7102f5a63
19 changed files with 534 additions and 10 deletions

View File

@ -34,10 +34,16 @@
android:theme="@style/Theme.Liyueling"
android:usesCleartextTraffic="true">
<activity
android:name=".UserSetting"
android:name=".Helpback"
android:exported="false" />
<activity
android:name=".LogoutActivity"
android:name=".Help2"
android:exported="false" />
<activity
android:name=".Help"
android:exported="false" />
<activity
android:name=".UserSetting"
android:exported="false" />
<activity
android:name=".Agreement"

View File

@ -0,0 +1,39 @@
package com.example.liyueling_final;
import androidx.appcompat.app.AppCompatActivity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class Help extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_help);
findViewById(R.id.b).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
findViewById(R.id.imageView31).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Help.this, Helpback.class);
startActivity(intent);
}
});
findViewById(R.id.textView2).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Help.this, Help2.class);
startActivity(intent);
}
});
}
}

View File

@ -0,0 +1,39 @@
package com.example.liyueling_final;
import androidx.appcompat.app.AppCompatActivity;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.ValueAnimator;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
public class Help2 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_help2);
findViewById(R.id.b).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
ImageView imageView = findViewById(R.id.imageView30);
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
PropertyValuesHolder propertyValuesHolder = PropertyValuesHolder.ofFloat("scaleX", 1, 3,1);
PropertyValuesHolder propertyValuesHolder2 = PropertyValuesHolder.ofFloat("scaleY", 1,3,1);
PropertyValuesHolder propertyValuesHolder3 = PropertyValuesHolder.ofFloat("alpha", 0,1);
ValueAnimator animator = ObjectAnimator.ofPropertyValuesHolder(imageView, propertyValuesHolder, propertyValuesHolder2, propertyValuesHolder3);
animator.setDuration(1000);
animator.start();
}
});
}
}

View File

@ -0,0 +1,52 @@
package com.example.liyueling_final;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Helpback extends AppCompatActivity {
Button button1, button2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_helpback);
button1 = findViewById(R.id.button1);
button2 = findViewById(R.id.button2);
findViewById(R.id.b).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
View.OnClickListener listener = new View.OnClickListener() {
@Override
public void onClick(View v) {
switchButtonColors();
}
};
button1.setOnClickListener(listener);
button2.setOnClickListener(listener);
}
private void switchButtonColors() {
// 获取当前按钮的背景颜色
int button1BackgroundColor = ((ColorDrawable) button1.getBackground()).getColor();
int button2BackgroundColor = ((ColorDrawable) button2.getBackground()).getColor();
// 获取当前按钮的文本颜色
int button1TextColor = button1.getCurrentTextColor();
int button2TextColor = button2.getCurrentTextColor();
// 交换按钮的背景颜色和文本颜色
button1.setBackgroundColor(button2BackgroundColor);
button2.setBackgroundColor(button1BackgroundColor);
button1.setTextColor(button2TextColor);
button2.setTextColor(button1TextColor);
}
}

View File

@ -8,7 +8,6 @@ import androidx.appcompat.app.AppCompatActivity;
public class Serch extends AppCompatActivity {
TextView cancel;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

View File

@ -67,8 +67,14 @@ public class UserFragment extends Fragment {
public void onClick(View v) {
Intent intent = new Intent(getActivity(), UserSetting.class);
startActivity(intent);
getActivity().finish();
}
});
view.findViewById(R.id.constraintLayout5).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getActivity(), Help.class);
startActivity(intent);
}
});

View File

@ -1,18 +1,20 @@
package com.example.liyueling_final;
import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
public class UserSetting extends AppCompatActivity {
@SuppressLint("MissingInflatedId")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user_setting);
findViewById(R.id.back1).setOnClickListener(new View.OnClickListener() {
findViewById(R.id.b).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/white" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@android:color/black" />
</shape>

View File

@ -0,0 +1,140 @@
<?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"
android:background="#FFFFFF"
tools:context=".UserSetting">
<TextView
android:id="@+id/textView27"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="常见问题"
android:textColor="#737373"
app:layout_constraintStart_toStartOf="@+id/textView"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<ImageView
android:id="@+id/imageView20"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@+id/textView26"
app:layout_constraintEnd_toEndOf="@+id/imageView18"
app:layout_constraintStart_toStartOf="@+id/imageView18"
app:layout_constraintTop_toTopOf="@+id/textView26"
app:srcCompat="@drawable/img_15" />
<TextView
android:id="@+id/textView26"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="我的账号被冻结/禁用了?"
android:textSize="20sp"
app:layout_constraintStart_toStartOf="@+id/textView13"
app:layout_constraintTop_toBottomOf="@+id/textView13" />
<TextView
android:id="@+id/textView13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="登录遇到故障问题"
android:textSize="20sp"
app:layout_constraintStart_toStartOf="@+id/textView2"
app:layout_constraintTop_toBottomOf="@+id/textView3" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="上传的作品可以商业用途吗?"
android:textSize="20sp"
app:layout_constraintStart_toStartOf="@+id/textView2"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:text="可以一次上传/收藏多张图片么?"
android:textSize="20sp"
app:layout_constraintStart_toStartOf="@+id/textView"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="80dp"
android:text="帮助反馈"
android:textSize="30dp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView15"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
app:layout_constraintBottom_toBottomOf="@+id/textView2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView2"
app:srcCompat="@drawable/img_15" />
<ImageView
android:id="@+id/imageView16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@+id/textView3"
app:layout_constraintStart_toStartOf="@+id/imageView15"
app:layout_constraintTop_toTopOf="@+id/textView3"
app:srcCompat="@drawable/img_15" />
<ImageView
android:id="@+id/imageView18"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@+id/textView13"
app:layout_constraintStart_toStartOf="@+id/imageView16"
app:layout_constraintTop_toTopOf="@+id/textView13"
app:srcCompat="@drawable/img_15" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/b"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="24dp"
android:layout_marginTop="32dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/back0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="32dp"
android:src="@drawable/img_85"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView31"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:layout_marginBottom="32dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/img_130" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,100 @@
<?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"
android:background="#FFFFFF"
tools:context=".UserSetting">
<TextView
android:id="@+id/textView27"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="创建于 2017年11月9日"
android:textColor="#737373"
app:layout_constraintStart_toStartOf="@+id/textView"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="32dp"
android:lineSpacingExtra="10sp"
android:text="可能您一直使用第三方账号登录,忘记了自己的登录密码 。此时请先确认您的绑定邮箱信息【点击查看】:该绑定邮箱我可以登录:这种情况请退出登录,并执行本文第一步“找回密码”流程;该绑定邮箱无法登录:这种情况请确认您当前的状态处于登录状态,并执行以下操作:私信 http://huabanpro.com/huaban私信内容修改邮箱 + 您需要修改的绑定邮箱。比如您要修改成“huaban@163.com”那么请发送以下私信内容"
android:textColor="#B5000000"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/textView2"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="1.使用第三方登录,不知道密码/忘记密码"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@+id/textView"
app:layout_constraintTop_toBottomOf="@+id/imageView9" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="80dp"
android:text="登录遇到故障问题"
android:textSize="30dp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/b"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="24dp"
android:layout_marginTop="32dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/back0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="32dp"
android:src="@drawable/img_85"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView9"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_marginStart="32dp"
android:layout_marginTop="13dp"
android:layout_marginEnd="32dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView27"
app:srcCompat="@drawable/img_128" />
<ImageView
android:id="@+id/imageView30"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
app:layout_constraintBottom_toBottomOf="@+id/textView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView"
app:srcCompat="@drawable/img_129" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,120 @@
<?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"
android:background="#FFFFFF"
tools:context=".UserSetting">
<TextView
android:id="@+id/textView27"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="反馈类型"
android:textColor="#737373"
app:layout_constraintStart_toStartOf="@+id/textView"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="反馈内容"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@+id/textView"
app:layout_constraintTop_toBottomOf="@+id/button1" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="80dp"
android:text="意见反馈"
android:textSize="30dp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/b"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="24dp"
android:layout_marginTop="32dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/back0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="32dp"
android:src="@drawable/img_85"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="问题"
android:background="@android:color/white"
android:textColor="@android:color/black"
app:layout_constraintStart_toStartOf="@+id/textView27"
app:layout_constraintTop_toBottomOf="@+id/textView27" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:background="@android:color/black"
android:text="建议"
android:textColor="@android:color/white"
app:layout_constraintBottom_toBottomOf="@+id/button1"
app:layout_constraintStart_toEndOf="@+id/button1"
app:layout_constraintTop_toTopOf="@+id/button1" />
<EditText
android:id="@+id/editText"
android:layout_width="316dp"
android:layout_height="53dp"
android:layout_marginTop="8dp"
android:background="@android:color/transparent"
android:hint="请描述你的问题"
android:inputType="textMultiLine"
app:layout_constraintEnd_toEndOf="@+id/imageView32"
app:layout_constraintStart_toStartOf="@+id/imageView32"
app:layout_constraintTop_toTopOf="@+id/imageView32" />
<ImageView
android:id="@+id/imageView32"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
app:layout_constraintStart_toStartOf="@+id/textView2"
app:layout_constraintTop_toBottomOf="@+id/textView2"
app:srcCompat="@drawable/img_131" />
<ImageView
android:id="@+id/imageView33"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/img_132" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -133,8 +133,19 @@
app:layout_constraintTop_toTopOf="@+id/textView25"
app:srcCompat="@drawable/img_15" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/b"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="24dp"
android:layout_marginTop="32dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/back1"
android:id="@+id/back0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"

View File

@ -3,4 +3,6 @@
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="bule">#56AAFF</color>
<color name="default_text_color">#000000</color>
<color name="selected_text_color">#FFFFFF</color>
</resources>