突然决定应该增加一个手动查密码的功能,即,可能用户需要用来解压的文件可能过大,在我优化没做好的情况下,可能会有bug导致无法读取md5码值或者无法解压的情况,用户可以在其他设备中获取待解压文件的md5值,手动在本软件中查询,即提供一个查询的功能 先完成一个提交bug的功能,数据库的表已经建成(提交时间,软件版本,Android版本,bug说明) 完成页面布局和基本逻辑设计后发现在创建线程的部分之前设计写死了传输的数据内容,需要重新设计master
parent
2dd545cada
commit
40dc5a8464
@ -0,0 +1,60 @@
|
||||
package com.thankvinci.CloudKey.Fragment;
|
||||
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.thankvinci.CloudKey.R;
|
||||
|
||||
public class BugSubFragment extends Fragment {
|
||||
public BugSubFragment(){
|
||||
super(R.layout.bug_sub_fragment);
|
||||
}
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle saveInstanceState){
|
||||
super.onViewCreated(view,saveInstanceState);
|
||||
Toast.makeText(getActivity(),"版本信息如若有误可以修改哦~",Toast.LENGTH_LONG).show();
|
||||
EditText softVerEdit = view.findViewById(R.id.soft_ver);
|
||||
EditText andrVerEdit = view.findViewById(R.id.android_ver);
|
||||
EditText bugEdit = view.findViewById(R.id.bug_edit);
|
||||
Button submit = view.findViewById(R.id.submitBug);
|
||||
|
||||
softVerEdit.setText(getAppInfo());
|
||||
andrVerEdit .setText(""+android.os.Build.VERSION.RELEASE);
|
||||
submit.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String softVer,andrVer,bug;
|
||||
softVer = softVerEdit.getText().toString();
|
||||
andrVer = andrVerEdit.getText().toString();
|
||||
bug = bugEdit.getText().toString();
|
||||
if("".equals(softVer) || "".equals(andrVer) || "".equals(bug)){
|
||||
Toast.makeText(getActivity(),"一定要全部填写完才能提交哦~",Toast.LENGTH_SHORT).show();
|
||||
return ;
|
||||
}
|
||||
|
||||
Toast.makeText(getActivity(),"感谢反馈(⑉°з°)-♡",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
private String getAppInfo(){
|
||||
String version = "";
|
||||
try {
|
||||
PackageManager pm = getActivity().getPackageManager();
|
||||
PackageInfo pi = pm.getPackageInfo(getActivity().getPackageName(), 0);
|
||||
version = pi.versionName;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (version == null || version.length() <= 0) {
|
||||
version = "";
|
||||
}
|
||||
return version;
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.9 KiB |
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:context=".Fragment.BugSubFragment">
|
||||
<EditText
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="软件版本"
|
||||
android:id="@+id/soft_ver"
|
||||
android:maxLines="1"
|
||||
android:maxLength="9"
|
||||
android:inputType="number"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginRight="50dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="60dp"
|
||||
tools:ignore="MissingConstraints" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="软件版本:"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintRight_toLeftOf="@id/soft_ver"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/soft_ver"
|
||||
tools:ignore="MissingConstraints" />
|
||||
<EditText
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Android版本"
|
||||
android:id="@+id/android_ver"
|
||||
android:maxLines="1"
|
||||
android:maxLength="3"
|
||||
android:inputType="number"
|
||||
app:layout_constraintLeft_toLeftOf="@id/soft_ver"
|
||||
app:layout_constraintTop_toBottomOf="@id/soft_ver"
|
||||
tools:ignore="MissingConstraints" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Android版本:"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintRight_toLeftOf="@id/android_ver"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/android_ver"
|
||||
tools:ignore="MissingConstraints" />
|
||||
<EditText
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="请填写遇到的bug"
|
||||
android:id="@+id/bug_edit"
|
||||
android:maxLines="6"
|
||||
android:minLines="4"
|
||||
android:gravity="top"
|
||||
app:layout_constraintLeft_toLeftOf="@id/android_ver"
|
||||
app:layout_constraintTop_toBottomOf="@id/android_ver"
|
||||
tools:ignore="MissingConstraints" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="bug说明:"
|
||||
android:textSize="16dp"
|
||||
app:layout_constraintRight_toLeftOf="@id/bug_edit"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/bug_edit"
|
||||
tools:ignore="MissingConstraints" />
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/submitBug"
|
||||
android:text="提交"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bug_edit"
|
||||
android:layout_marginTop="20dp"
|
||||
tools:ignore="MissingConstraints" />|
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
After Width: | Height: | Size: 96 KiB |
Loading…
Reference in new issue