1.添加关于界面的作者介绍,象征性地更新了一下软件版本号

2.给界面写样式,实现边框
项目基本完成
master
ThankVinci 4 years ago
parent 7afbdc20a0
commit c7f69443ff

@ -11,7 +11,7 @@ android {
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0.0"
versionName "1.0.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

@ -3,14 +3,20 @@ package com.thankvinci.CloudKey.Fragment;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import androidx.fragment.app.Fragment;
import com.thankvinci.CloudKey.R;
import com.thankvinci.CloudKey.Utils.MyUtils;
public class AboutFragment extends Fragment {
private View view2;
private Button arthor,contact,thanks,checkVer;
public AboutFragment(){
super(R.layout.about_fragment);
@ -20,6 +26,38 @@ public class AboutFragment extends Fragment {
super.onViewCreated(view,saveInstanceState);
TextView verText = view.findViewById(R.id.text_version);
verText.setText("v"+getAppInfo());
LayoutInflater inflater = requireActivity().getLayoutInflater();
//view2 = view.findViewById(R.id.)
arthor = view.findViewById(R.id.author);
arthor.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
MyUtils.copyToClipboard(getActivity(),"https://gitee.com/thankvinci/android_final-project.git");
Toast.makeText(view.getContext(),"本项目地址已复制到剪贴板",Toast.LENGTH_SHORT).show();
}
});
contact = view.findViewById(R.id.contact);
contact.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
MyUtils.copyToClipboard(getActivity(),"thankvinci@163.com");
Toast.makeText(view.getContext(),"联系邮箱已复制到剪贴板",Toast.LENGTH_SHORT).show();
}
});
thanks = view.findViewById(R.id.thanks);
thanks.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(view.getContext(),"其实这是我哥",Toast.LENGTH_SHORT).show();
}
});
checkVer = view.findViewById(R.id.check_ver);
checkVer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(view.getContext(),"🕊咕~~",Toast.LENGTH_SHORT).show();
}
});
}
//获取版本号

@ -83,7 +83,7 @@ public class FileManageFragment extends Fragment {
dir = Environment.getExternalStorageDirectory().getPath(); //获取根目录
}else{
dir = data.getString("dir");
Toast.makeText(getActivity(),dir,Toast.LENGTH_SHORT).show();
//Toast.makeText(getActivity(),dir,Toast.LENGTH_SHORT).show();
}
path_edit.setText(dir);
path_edit.setSelection(dir.length());

@ -128,7 +128,7 @@ public class UnzipDialogFragment extends DialogFragment {
public void onClick(View v) {
if((!("".equals(passwd_edit.getText().toString())))&&!(passwd_edit.getFocusable()==EditText.FOCUSABLE)){
MyUtils.copyToClipboard(getActivity(),passwd_edit.getText().toString());
Toast.makeText(getActivity(),"已将密码复制到贴板",Toast.LENGTH_SHORT).show();
Toast.makeText(getActivity(),"已将密码复制到贴板",Toast.LENGTH_SHORT).show();
}
}
});
@ -138,7 +138,7 @@ public class UnzipDialogFragment extends DialogFragment {
public void onClick(View v) {
if((!("".equals(md5_edit.getText().toString())))&&!(md5_edit.getFocusable()==EditText.FOCUSABLE)){
MyUtils.copyToClipboard(getActivity(),md5_edit.getText().toString());
Toast.makeText(getActivity(),"已将MD5码复制到贴板",Toast.LENGTH_SHORT).show();
Toast.makeText(getActivity(),"已将MD5码复制到贴板",Toast.LENGTH_SHORT).show();
}
}
});

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/shape_corner_up_pressed">
</item>
<item android:drawable="@drawable/shape_corner_up">
</item>
</selector>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/shape_corner_normal_pressed">
</item>
<item android:drawable="@drawable/shape_corner_normal">
</item>
</selector>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/shape_corner_down_pressed">
</item>
<item android:drawable="@drawable/shape_corner_down">
</item>
</selector>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" />
<corners android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp"
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
</shape>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" />
<corners android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp" />
<stroke android:width="1dp" android:color="@color/grey_1" />
</shape>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/grey_1" />
<corners android:bottomLeftRadius="20dp"
android:bottomRightRadius="20dp" />
<stroke android:width="1dp" android:color="@color/grey_1" />
</shape>

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

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

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" />
<corners
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
<stroke android:width="1dp" android:color="@color/grey_1" />
</shape>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/grey_1" />
<corners
android:topLeftRadius="20dp"
android:topRightRadius="20dp" />
<stroke android:width="1dp" android:color="@color/grey_1" />
</shape>

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@drawable/shape_corner">
<Button
android:id="@+id/author"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="作者:\t ThankVinci(柯承彬)"
android:textAllCaps="false"
style="@style/author_btn"
tools:ignore="MissingConstraints" />
<Button
android:id="@+id/contact"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="联系:\t thankvinci@163.com"
android:textAllCaps="false"
style="@style/between_btn"
app:layout_constraintTop_toBottomOf="@id/author"
tools:ignore="MissingConstraints" />
<Button
android:id="@+id/thanks"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="感谢:\t bili@伊鸭嗒(图标设计,UI建议)"
android:textAllCaps="false"
style="@style/between_btn"
app:layout_constraintTop_toBottomOf="@id/contact"
tools:ignore="MissingConstraints" />
<Button
android:id="@+id/check_ver"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="检查新版本"
style="@style/check_btn"
app:layout_constraintTop_toBottomOf="@id/thanks"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -14,7 +14,7 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="50dp"/>
android:layout_marginTop="100dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -27,4 +27,57 @@
app:layout_constraintTop_toBottomOf="@id/icon_about"
android:layout_marginTop="10dp"/>
<TextView
android:id="@+id/body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" | ⌒Y⌒ / /\n |ヽ . | . / \n \トー仝ーイ\n ミ土彡/\n ) \\ ° /\n ( \\ y \\ \n
/ / ω \\ \\ \n
/ / / \\ \\ \n
( ( ). ) ). )\n
( ). ( | |\n
| / \\ |\n
nn. ). ( nnm"
android:textSize="14dp"
tools:ignore="MissingConstraints"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="10dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/arm"
android:text=" イ (((ヽ\n
(  ノ       ̄Y\\n
| (  )\n
ヽ ヽ` _ /"
android:textSize="14dp"
tools:ignore="MissingConstraints"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toTopOf="@id/body"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/head"
android:text="🐼"
android:textSize="30dp"
tools:ignore="MissingConstraints"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="@id/arm"/>
<include
layout="@layout/about_author"
android:id="@+id/about_author"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:background="@drawable/shape_corner"
tools:ignore="MissingConstraints"
app:layout_constraintBottom_toTopOf="@id/arm"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="author_btn">
<item name="android:background">@drawable/author_btn</item>
</style>
<style name="check_btn">
<item name="android:background">@drawable/check_btn</item>
</style>
<style name="between_btn">
<item name="android:background">@drawable/between_btn</item>
</style>
</resources>

@ -339,4 +339,12 @@ FileHandler负责将获取到的md5码发到NetThread,然后将得到的密码
添加一个查询密码专用的Dialog,用于给用户输入md5码手动查询密码
界面上有三个TextView控件,一个是将密码复制到剪贴板,一个是清空EditView,一个是获取密码
界面上有三个TextView控件,一个是将密码复制到剪贴板,一个是清空EditView,一个是获取密码
**2021/6/13**
添加关于界面的作者介绍,象征性地更新了一下软件版本号
给界面写样式,实现圆角
项目基本完成
Loading…
Cancel
Save