@ -1 +0,0 @@
|
|||||||
111
|
|
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 290 KiB |
Before Width: | Height: | Size: 275 KiB |
Before Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 235 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 1.4 MiB |
@ -0,0 +1,14 @@
|
|||||||
|
*.iml
|
||||||
|
.gradle
|
||||||
|
/local.properties
|
||||||
|
/.idea/caches
|
||||||
|
/.idea/libraries
|
||||||
|
/.idea/modules.xml
|
||||||
|
/.idea/workspace.xml
|
||||||
|
/.idea/navEditor.xml
|
||||||
|
/.idea/assetWizardSettings.xml
|
||||||
|
.DS_Store
|
||||||
|
/build
|
||||||
|
/captures
|
||||||
|
.externalNativeBuild
|
||||||
|
.cxx
|
@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
@ -0,0 +1 @@
|
|||||||
|
tally
|
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AndroidTestResultsUserPreferences">
|
||||||
|
<option name="androidTestResultsTableState">
|
||||||
|
<map>
|
||||||
|
<entry key="1897734178">
|
||||||
|
<value>
|
||||||
|
<AndroidTestResultsTableState>
|
||||||
|
<option name="preferredColumnWidths">
|
||||||
|
<map>
|
||||||
|
<entry key="Duration" value="90" />
|
||||||
|
<entry key="Pixel_2_API_29" value="120" />
|
||||||
|
<entry key="Tests" value="360" />
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</AndroidTestResultsTableState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,116 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<code_scheme name="Project" version="173">
|
||||||
|
<codeStyleSettings language="XML">
|
||||||
|
<indentOptions>
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||||
|
</indentOptions>
|
||||||
|
<arrangement>
|
||||||
|
<rules>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>xmlns:android</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>xmlns:.*</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>BY_NAME</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*:id</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*:name</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>name</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>style</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>BY_NAME</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>ANDROID_ATTRIBUTE_ORDER</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<rule>
|
||||||
|
<match>
|
||||||
|
<AND>
|
||||||
|
<NAME>.*</NAME>
|
||||||
|
<XML_ATTRIBUTE />
|
||||||
|
<XML_NAMESPACE>.*</XML_NAMESPACE>
|
||||||
|
</AND>
|
||||||
|
</match>
|
||||||
|
<order>BY_NAME</order>
|
||||||
|
</rule>
|
||||||
|
</section>
|
||||||
|
</rules>
|
||||||
|
</arrangement>
|
||||||
|
</codeStyleSettings>
|
||||||
|
</code_scheme>
|
||||||
|
</component>
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<bytecodeTargetLevel target="1.8" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||||
|
<component name="GradleSettings">
|
||||||
|
<option name="linkedExternalProjectsSettings">
|
||||||
|
<GradleProjectSettings>
|
||||||
|
<option name="testRunner" value="GRADLE" />
|
||||||
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="gradleJvm" value="Embedded JDK" />
|
||||||
|
<option name="modules">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
<option value="$PROJECT_DIR$/app" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</GradleProjectSettings>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="BintrayJCenter" />
|
||||||
|
<option name="name" value="BintrayJCenter" />
|
||||||
|
<option name="url" value="https://jcenter.bintray.com/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="maven" />
|
||||||
|
<option name="name" value="maven" />
|
||||||
|
<option name="url" value="https://jitpack.io" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="Google" />
|
||||||
|
<option name="name" value="Google" />
|
||||||
|
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectType">
|
||||||
|
<option name="id" value="Android" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1 @@
|
|||||||
|
/build
|
@ -0,0 +1,32 @@
|
|||||||
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion 29
|
||||||
|
buildToolsVersion "29.0.3"
|
||||||
|
defaultConfig {
|
||||||
|
applicationId "com.hui.tally"
|
||||||
|
minSdkVersion 21
|
||||||
|
targetSdkVersion 29
|
||||||
|
versionCode 1
|
||||||
|
versionName "1.0"
|
||||||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||||
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
|
||||||
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
|
testImplementation 'junit:junit:4.12'
|
||||||
|
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||||
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||||||
|
implementation 'com.google.android.material:material:1.2.0'
|
||||||
|
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# You can control the set of applied configuration files using the
|
||||||
|
# proguardFiles setting in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Uncomment this to preserve the line number information for
|
||||||
|
# debugging stack traces.
|
||||||
|
#-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
|
# If you keep the line number information, uncomment this to
|
||||||
|
# hide the original source file name.
|
||||||
|
#-renamesourcefileattribute SourceFile
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.hui.tally;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.test.platform.app.InstrumentationRegistry;
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instrumented test, which will execute on an Android device.
|
||||||
|
*
|
||||||
|
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||||
|
*/
|
||||||
|
@RunWith(AndroidJUnit4.class)
|
||||||
|
public class ExampleInstrumentedTest {
|
||||||
|
@Test
|
||||||
|
public void useAppContext() {
|
||||||
|
// Context of the app under test.
|
||||||
|
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||||
|
|
||||||
|
assertEquals("com.hui.tally", appContext.getPackageName());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.hui.tally">
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:name=".UniteApp"
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
|
android:supportsRtl="true"
|
||||||
|
android:theme="@style/AppTheme">
|
||||||
|
<activity
|
||||||
|
android:name=".hobbychoiceActivity2"
|
||||||
|
android:exported="false" />
|
||||||
|
<activity android:name=".MonthChartActivity" />
|
||||||
|
<activity android:name=".SettingActivity" />
|
||||||
|
<activity android:name=".HistoryActivity" />
|
||||||
|
<activity android:name=".AboutActivity" />
|
||||||
|
<activity android:name=".SearchActivity" />
|
||||||
|
<activity android:name=".RecordActivity" />
|
||||||
|
<activity android:name=".MainActivity">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.hui.tally;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
public class AboutActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_about);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick(View view) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,109 @@
|
|||||||
|
package com.hui.tally;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.ListView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.hui.tally.adapter.AccountAdapter;
|
||||||
|
import com.hui.tally.db.AccountBean;
|
||||||
|
import com.hui.tally.db.DBManager;
|
||||||
|
import com.hui.tally.utils.CalendarDialog;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class HistoryActivity extends AppCompatActivity {
|
||||||
|
ListView historyLv;
|
||||||
|
TextView timeTv;
|
||||||
|
|
||||||
|
List<AccountBean>mDatas;
|
||||||
|
AccountAdapter adapter;
|
||||||
|
int year,month;
|
||||||
|
int dialogSelPos = -1;
|
||||||
|
int dialogSelMonth = -1;
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_history);
|
||||||
|
historyLv = findViewById(R.id.history_lv);
|
||||||
|
timeTv = findViewById(R.id.history_tv_time);
|
||||||
|
mDatas = new ArrayList<>();
|
||||||
|
// 设置适配器
|
||||||
|
adapter = new AccountAdapter(this,mDatas);
|
||||||
|
historyLv.setAdapter(adapter);
|
||||||
|
initTime();
|
||||||
|
timeTv.setText(year+"年"+month+"月");
|
||||||
|
loadData(year,month);
|
||||||
|
setLVClickListener();
|
||||||
|
}
|
||||||
|
/*设置ListView每一个item的长按事件*/
|
||||||
|
private void setLVClickListener() {
|
||||||
|
historyLv.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
AccountBean accountBean = mDatas.get(position);
|
||||||
|
deleteItem(accountBean);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deleteItem(final AccountBean accountBean) {
|
||||||
|
final int delId = accountBean.getId();
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
|
builder.setTitle("提示信息").setMessage("您确定要删除这条记录么?")
|
||||||
|
.setNegativeButton("取消",null)
|
||||||
|
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
DBManager.deleteItemFromAccounttbById(delId);
|
||||||
|
mDatas.remove(accountBean); //实时刷新,从数据源删除
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
builder.create().show();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 获取指定年份月份收支情况的列表*/
|
||||||
|
private void loadData(int year,int month) {
|
||||||
|
List<AccountBean> list = DBManager.getAccountListOneMonthFromAccounttb(year, month);
|
||||||
|
mDatas.clear();
|
||||||
|
mDatas.addAll(list);
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initTime() {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
year = calendar.get(Calendar.YEAR);
|
||||||
|
month = calendar.get(Calendar.MONTH)+1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick(View view) {
|
||||||
|
switch (view.getId()) {
|
||||||
|
case R.id.history_iv_back:
|
||||||
|
finish();
|
||||||
|
break;
|
||||||
|
case R.id.history_iv_rili:
|
||||||
|
CalendarDialog dialog = new CalendarDialog(this,dialogSelPos,dialogSelMonth);
|
||||||
|
dialog.show();
|
||||||
|
dialog.setDialogSize();
|
||||||
|
dialog.setOnRefreshListener(new CalendarDialog.OnRefreshListener() {
|
||||||
|
@Override
|
||||||
|
public void onRefresh(int selPos, int year, int month) {
|
||||||
|
timeTv.setText(year+"年"+month+"月");
|
||||||
|
loadData(year,month);
|
||||||
|
dialogSelPos = selPos;
|
||||||
|
dialogSelMonth = month;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,153 @@
|
|||||||
|
package com.hui.tally;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.hui.tally.adapter.ChartVPAdapter;
|
||||||
|
import com.hui.tally.db.DBManager;
|
||||||
|
import com.hui.tally.frag_chart.IncomChartFragment;
|
||||||
|
import com.hui.tally.frag_chart.OutcomChartFragment;
|
||||||
|
import com.hui.tally.utils.CalendarDialog;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class MonthChartActivity extends AppCompatActivity {
|
||||||
|
Button inBtn,outBtn;
|
||||||
|
TextView dateTv,inTv,outTv;
|
||||||
|
ViewPager chartVp;
|
||||||
|
int year;
|
||||||
|
int month;
|
||||||
|
int selectPos = -1,selectMonth =-1;
|
||||||
|
List<Fragment>chartFragList;
|
||||||
|
private IncomChartFragment incomChartFragment;
|
||||||
|
private OutcomChartFragment outcomChartFragment;
|
||||||
|
private ChartVPAdapter chartVPAdapter;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_month_chart);
|
||||||
|
initView();
|
||||||
|
initTime();
|
||||||
|
initStatistics(year,month);
|
||||||
|
initFrag();
|
||||||
|
setVPSelectListener();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setVPSelectListener() {
|
||||||
|
chartVp.addOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener(){
|
||||||
|
@Override
|
||||||
|
public void onPageSelected(int position) {
|
||||||
|
setButtonStyle(position);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initFrag() {
|
||||||
|
chartFragList = new ArrayList<>();
|
||||||
|
// 添加Fragment的对象
|
||||||
|
incomChartFragment = new IncomChartFragment();
|
||||||
|
outcomChartFragment = new OutcomChartFragment();
|
||||||
|
// 添加数据到Fragment当中
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putInt("year",year);
|
||||||
|
bundle.putInt("month",month);
|
||||||
|
incomChartFragment.setArguments(bundle);
|
||||||
|
outcomChartFragment.setArguments(bundle);
|
||||||
|
// 将Fragment添加到数据源当中
|
||||||
|
chartFragList.add(outcomChartFragment);
|
||||||
|
chartFragList.add(incomChartFragment);
|
||||||
|
// 使用适配器
|
||||||
|
chartVPAdapter = new ChartVPAdapter(getSupportFragmentManager(), chartFragList);
|
||||||
|
chartVp.setAdapter(chartVPAdapter);
|
||||||
|
// 将Fragment加载到Acitivy当中
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 统计某年某月的收支情况数据*/
|
||||||
|
private void initStatistics(int year, int month) {
|
||||||
|
float inMoneyOneMonth = DBManager.getSumMoneyOneMonth(year, month, 1); //收入总钱数
|
||||||
|
float outMoneyOneMonth = DBManager.getSumMoneyOneMonth(year, month, 0); //支出总钱数
|
||||||
|
int incountItemOneMonth = DBManager.getCountItemOneMonth(year, month, 1); //收入多少笔
|
||||||
|
int outcountItemOneMonth = DBManager.getCountItemOneMonth(year, month, 0); //支出多少笔
|
||||||
|
dateTv.setText(year+"年"+month+"月账单");
|
||||||
|
inTv.setText("共"+incountItemOneMonth+"笔收入, ¥ "+inMoneyOneMonth);
|
||||||
|
outTv.setText("共"+outcountItemOneMonth+"笔支出, ¥ "+outMoneyOneMonth);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 初始化时间的方法*/
|
||||||
|
private void initTime() {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
year = calendar.get(Calendar.YEAR);
|
||||||
|
month = calendar.get(Calendar.MONTH)+1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 初始化控件*/
|
||||||
|
private void initView() {
|
||||||
|
inBtn = findViewById(R.id.chart_btn_in);
|
||||||
|
outBtn = findViewById(R.id.chart_btn_out);
|
||||||
|
dateTv = findViewById(R.id.chart_tv_date);
|
||||||
|
inTv = findViewById(R.id.chart_tv_in);
|
||||||
|
outTv = findViewById(R.id.chart_tv_out);
|
||||||
|
chartVp = findViewById(R.id.chart_vp);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick(View view) {
|
||||||
|
switch (view.getId()) {
|
||||||
|
case R.id.chart_iv_back:
|
||||||
|
finish();
|
||||||
|
break;
|
||||||
|
case R.id.chart_iv_rili:
|
||||||
|
showCalendarDialog();
|
||||||
|
break;
|
||||||
|
case R.id.chart_btn_in:
|
||||||
|
setButtonStyle(1);
|
||||||
|
chartVp.setCurrentItem(1);
|
||||||
|
break;
|
||||||
|
case R.id.chart_btn_out:
|
||||||
|
setButtonStyle(0);
|
||||||
|
chartVp.setCurrentItem(0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* 显示日历对话框*/
|
||||||
|
private void showCalendarDialog() {
|
||||||
|
CalendarDialog dialog = new CalendarDialog(this, selectPos, selectMonth);
|
||||||
|
dialog.show();
|
||||||
|
dialog.setDialogSize();
|
||||||
|
dialog.setOnRefreshListener(new CalendarDialog.OnRefreshListener() {
|
||||||
|
@Override
|
||||||
|
public void onRefresh(int selPos, int year, int month) {
|
||||||
|
MonthChartActivity.this.selectPos = selPos;
|
||||||
|
MonthChartActivity.this.selectMonth = month;
|
||||||
|
initStatistics(year,month);
|
||||||
|
incomChartFragment.setDate(year,month);
|
||||||
|
outcomChartFragment.setDate(year,month);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 设置按钮样式的改变 支出-0 收入-1*/
|
||||||
|
private void setButtonStyle(int kind){
|
||||||
|
if (kind == 0) {
|
||||||
|
outBtn.setBackgroundResource(R.drawable.main_recordbtn_bg);
|
||||||
|
outBtn.setTextColor(Color.WHITE);
|
||||||
|
inBtn.setBackgroundResource(R.drawable.dialog_btn_bg);
|
||||||
|
inBtn.setTextColor(Color.BLACK);
|
||||||
|
}else if (kind == 1){
|
||||||
|
inBtn.setBackgroundResource(R.drawable.main_recordbtn_bg);
|
||||||
|
inBtn.setTextColor(Color.WHITE);
|
||||||
|
outBtn.setBackgroundResource(R.drawable.dialog_btn_bg);
|
||||||
|
outBtn.setTextColor(Color.BLACK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.hui.tally;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ListView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.hui.tally.adapter.AccountAdapter;
|
||||||
|
import com.hui.tally.db.AccountBean;
|
||||||
|
import com.hui.tally.db.DBManager;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class SearchActivity extends AppCompatActivity {
|
||||||
|
ListView searchLv;
|
||||||
|
EditText searchEt;
|
||||||
|
TextView emptyTv;
|
||||||
|
List<AccountBean>mDatas; //数据源
|
||||||
|
AccountAdapter adapter; //适配器对象
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_search);
|
||||||
|
initView();
|
||||||
|
mDatas = new ArrayList<>();
|
||||||
|
adapter = new AccountAdapter(this,mDatas);
|
||||||
|
searchLv.setAdapter(adapter);
|
||||||
|
searchLv.setEmptyView(emptyTv); //设置无数局时,显示的控件
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
searchEt = findViewById(R.id.search_et);
|
||||||
|
searchLv = findViewById(R.id.search_lv);
|
||||||
|
emptyTv = findViewById(R.id.search_tv_empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick(View view) {
|
||||||
|
switch (view.getId()) {
|
||||||
|
case R.id.search_iv_back:
|
||||||
|
finish();
|
||||||
|
break;
|
||||||
|
case R.id.search_iv_sh: //执行搜索的操作
|
||||||
|
String msg = searchEt.getText().toString().trim();
|
||||||
|
// 判断输入内容是否为空,如果为空,就提示不能搜索
|
||||||
|
if (TextUtils.isEmpty(msg)) {
|
||||||
|
Toast.makeText(this,"输入内容不能为空!",Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//开始搜索
|
||||||
|
List<AccountBean> list = DBManager.getAccountListByRemarkFromAccounttb(msg);
|
||||||
|
mDatas.clear();
|
||||||
|
mDatas.addAll(list);
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.hui.tally;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
|
||||||
|
import com.hui.tally.db.DBManager;
|
||||||
|
|
||||||
|
/* 表示全局应用的类*/
|
||||||
|
public class UniteApp extends Application {
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
// 初始化数据库
|
||||||
|
DBManager.initDB(getApplicationContext());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
package com.hui.tally.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.BaseAdapter;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.hui.tally.R;
|
||||||
|
import com.hui.tally.db.AccountBean;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AccountAdapter extends BaseAdapter {
|
||||||
|
Context context;
|
||||||
|
List<AccountBean>mDatas;
|
||||||
|
LayoutInflater inflater;
|
||||||
|
int year,month,day;
|
||||||
|
public AccountAdapter(Context context, List<AccountBean> mDatas) {
|
||||||
|
this.context = context;
|
||||||
|
this.mDatas = mDatas;
|
||||||
|
inflater = LayoutInflater.from(context);
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
year = calendar.get(Calendar.YEAR);
|
||||||
|
month = calendar.get(Calendar.MONTH)+1;
|
||||||
|
day = calendar.get(Calendar.DAY_OF_MONTH);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return mDatas.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getItem(int position) {
|
||||||
|
return mDatas.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getItemId(int position) {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
ViewHolder holder = null;
|
||||||
|
if (convertView == null) {
|
||||||
|
convertView = inflater.inflate(R.layout.item_mainlv,parent,false);
|
||||||
|
holder = new ViewHolder(convertView);
|
||||||
|
convertView.setTag(holder);
|
||||||
|
}else{
|
||||||
|
holder = (ViewHolder) convertView.getTag();
|
||||||
|
}
|
||||||
|
AccountBean bean = mDatas.get(position);
|
||||||
|
holder.typeIv.setImageResource(bean.getsImageId());
|
||||||
|
holder.typeTv.setText(bean.getTypename());
|
||||||
|
holder.beizhuTv.setText(bean.getBeizhu());
|
||||||
|
holder.moneyTv.setText("¥ "+bean.getMoney());
|
||||||
|
if (bean.getYear()==year&&bean.getMonth()==month&&bean.getDay()==day) {
|
||||||
|
String time = bean.getTime().split(" ")[1];
|
||||||
|
holder.timeTv.setText("今天 "+time);
|
||||||
|
}else {
|
||||||
|
holder.timeTv.setText(bean.getTime());
|
||||||
|
}
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ViewHolder{
|
||||||
|
ImageView typeIv;
|
||||||
|
TextView typeTv,beizhuTv,timeTv,moneyTv;
|
||||||
|
public ViewHolder(View view){
|
||||||
|
typeIv = view.findViewById(R.id.item_mainlv_iv);
|
||||||
|
typeTv = view.findViewById(R.id.item_mainlv_tv_title);
|
||||||
|
timeTv = view.findViewById(R.id.item_mainlv_tv_time);
|
||||||
|
beizhuTv = view.findViewById(R.id.item_mainlv_tv_beizhu);
|
||||||
|
moneyTv = view.findViewById(R.id.item_mainlv_tv_money);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.hui.tally.adapter;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
import androidx.fragment.app.FragmentPagerAdapter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ChartVPAdapter extends FragmentPagerAdapter {
|
||||||
|
List<Fragment>fragmentList;
|
||||||
|
public ChartVPAdapter(@NonNull FragmentManager fm, List<Fragment>fragmentList) {
|
||||||
|
super(fm);
|
||||||
|
this.fragmentList = fragmentList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Fragment getItem(int position) {
|
||||||
|
return fragmentList.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return fragmentList.size();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.hui.tally.adapter;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
import androidx.fragment.app.FragmentPagerAdapter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RecordPagerAdapter extends FragmentPagerAdapter {
|
||||||
|
List<Fragment>fragmentList;
|
||||||
|
String[]titles = {"支出","收入"};
|
||||||
|
public RecordPagerAdapter(@NonNull FragmentManager fm,List<Fragment>fragmentList) {
|
||||||
|
super(fm);
|
||||||
|
this.fragmentList = fragmentList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public Fragment getItem(int position) {
|
||||||
|
return fragmentList.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return fragmentList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public CharSequence getPageTitle(int position) {
|
||||||
|
return titles[position];
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,110 @@
|
|||||||
|
package com.hui.tally.db;
|
||||||
|
/** 描述记录一条数据的相关内容类*/
|
||||||
|
public class AccountBean {
|
||||||
|
int id;
|
||||||
|
String typename; //类型
|
||||||
|
int sImageId; //被选中类型图片
|
||||||
|
String beizhu; //备注
|
||||||
|
float money; //价格
|
||||||
|
String time ; //保存时间字符串
|
||||||
|
int year;
|
||||||
|
int month;
|
||||||
|
int day;
|
||||||
|
int kind; //类型 收入---1 支出---0
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypename() {
|
||||||
|
return typename;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypename(String typename) {
|
||||||
|
this.typename = typename;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getsImageId() {
|
||||||
|
return sImageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setsImageId(int sImageId) {
|
||||||
|
this.sImageId = sImageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBeizhu() {
|
||||||
|
return beizhu;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBeizhu(String beizhu) {
|
||||||
|
this.beizhu = beizhu;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getMoney() {
|
||||||
|
return money;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMoney(float money) {
|
||||||
|
this.money = money;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTime() {
|
||||||
|
return time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime(String time) {
|
||||||
|
this.time = time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getYear() {
|
||||||
|
return year;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setYear(int year) {
|
||||||
|
this.year = year;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMonth() {
|
||||||
|
return month;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMonth(int month) {
|
||||||
|
this.month = month;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDay() {
|
||||||
|
return day;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDay(int day) {
|
||||||
|
this.day = day;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getKind() {
|
||||||
|
return kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKind(int kind) {
|
||||||
|
this.kind = kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AccountBean() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public AccountBean(int id, String typename, int sImageId, String beizhu, float money, String time, int year, int month, int day, int kind) {
|
||||||
|
this.id = id;
|
||||||
|
this.typename = typename;
|
||||||
|
this.sImageId = sImageId;
|
||||||
|
this.beizhu = beizhu;
|
||||||
|
this.money = money;
|
||||||
|
this.time = time;
|
||||||
|
this.year = year;
|
||||||
|
this.month = month;
|
||||||
|
this.day = day;
|
||||||
|
this.kind = kind;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.hui.tally.db;
|
||||||
|
/* 用于描述绘制柱状图时,每一个柱子表示的对象*/
|
||||||
|
public class BarChartItemBean {
|
||||||
|
int year;
|
||||||
|
int month;
|
||||||
|
int day;
|
||||||
|
float summoney;
|
||||||
|
|
||||||
|
public BarChartItemBean() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getYear() {
|
||||||
|
return year;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setYear(int year) {
|
||||||
|
this.year = year;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMonth() {
|
||||||
|
return month;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMonth(int month) {
|
||||||
|
this.month = month;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDay() {
|
||||||
|
return day;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDay(int day) {
|
||||||
|
this.day = day;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getSummoney() {
|
||||||
|
return summoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSummoney(float summoney) {
|
||||||
|
this.summoney = summoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BarChartItemBean(int year, int month, int day, float summoney) {
|
||||||
|
this.year = year;
|
||||||
|
this.month = month;
|
||||||
|
this.day = day;
|
||||||
|
this.summoney = summoney;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.hui.tally.db;
|
||||||
|
|
||||||
|
public class ChartItemBean {
|
||||||
|
int sImageId;
|
||||||
|
String type;
|
||||||
|
float ratio; //所占比例
|
||||||
|
float totalMoney; //此项的总钱数
|
||||||
|
|
||||||
|
public ChartItemBean() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setsImageId(int sImageId) {
|
||||||
|
this.sImageId = sImageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRatio(float ratio) {
|
||||||
|
this.ratio = ratio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalMoney(float totalMoney) {
|
||||||
|
this.totalMoney = totalMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getsImageId() {
|
||||||
|
return sImageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getRatio() {
|
||||||
|
return ratio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getTotalMoney() {
|
||||||
|
return totalMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChartItemBean(int sImageId, String type, float ratio, float totalMoney) {
|
||||||
|
this.sImageId = sImageId;
|
||||||
|
this.type = type;
|
||||||
|
this.ratio = ratio;
|
||||||
|
this.totalMoney = totalMoney;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
package com.hui.tally.db;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
|
import android.database.sqlite.SQLiteOpenHelper;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.hui.tally.R;
|
||||||
|
|
||||||
|
public class DBOpenHelper extends SQLiteOpenHelper {
|
||||||
|
public DBOpenHelper(@Nullable Context context) {
|
||||||
|
super(context,"tally.db" , null, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建数据库的方法,只有项目第一次运行时,会被调用
|
||||||
|
@Override
|
||||||
|
public void onCreate(SQLiteDatabase db) {
|
||||||
|
// 创建表示类型的表
|
||||||
|
String sql = "create table typetb(id integer primary key autoincrement,typename varchar(10),imageId integer,sImageId integer,kind integer)";
|
||||||
|
db.execSQL(sql);
|
||||||
|
insertType(db);
|
||||||
|
//创建记账表
|
||||||
|
sql = "create table accounttb(id integer primary key autoincrement,typename varchar(10),sImageId integer,beizhu varchar(80),money float," +
|
||||||
|
"time varchar(60),year integer,month integer,day integer,kind integer)";
|
||||||
|
db.execSQL(sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void insertType(SQLiteDatabase db) {
|
||||||
|
// 向typetb表当中插入元素
|
||||||
|
String sql = "insert into typetb (typename,imageId,sImageId,kind) values (?,?,?,?)";
|
||||||
|
db.execSQL(sql,new Object[]{"其他", R.mipmap.ic_qita,R.mipmap.ic_qita_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"餐饮", R.mipmap.ic_canyin,R.mipmap.ic_canyin_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"交通", R.mipmap.ic_jiaotong,R.mipmap.ic_jiaotong_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"购物", R.mipmap.ic_gouwu,R.mipmap.ic_gouwu_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"服饰", R.mipmap.ic_fushi,R.mipmap.ic_fushi_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"日用品", R.mipmap.ic_riyongpin,R.mipmap.ic_riyongpin_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"娱乐", R.mipmap.ic_yule,R.mipmap.ic_yule_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"零食", R.mipmap.ic_lingshi,R.mipmap.ic_lingshi_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"烟酒茶", R.mipmap.ic_yanjiu,R.mipmap.ic_yanjiu_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"学习", R.mipmap.ic_xuexi,R.mipmap.ic_xuexi_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"医疗", R.mipmap.ic_yiliao,R.mipmap.ic_yiliao_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"住宅", R.mipmap.ic_zhufang,R.mipmap.ic_zhufang_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"水电煤", R.mipmap.ic_shuidianfei,R.mipmap.ic_shuidianfei_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"通讯", R.mipmap.ic_tongxun,R.mipmap.ic_tongxun_fs,0});
|
||||||
|
db.execSQL(sql,new Object[]{"人情往来", R.mipmap.ic_renqingwanglai,R.mipmap.ic_renqingwanglai_fs,0});
|
||||||
|
|
||||||
|
db.execSQL(sql,new Object[]{"其他", R.mipmap.in_qt,R.mipmap.in_qt_fs,1});
|
||||||
|
db.execSQL(sql,new Object[]{"薪资", R.mipmap.in_xinzi,R.mipmap.in_xinzi_fs,1});
|
||||||
|
db.execSQL(sql,new Object[]{"奖金", R.mipmap.in_jiangjin,R.mipmap.in_jiangjin_fs,1});
|
||||||
|
db.execSQL(sql,new Object[]{"借入", R.mipmap.in_jieru,R.mipmap.in_jieru_fs,1});
|
||||||
|
db.execSQL(sql,new Object[]{"收债", R.mipmap.in_shouzhai,R.mipmap.in_shouzhai_fs,1});
|
||||||
|
db.execSQL(sql,new Object[]{"利息收入", R.mipmap.in_lixifuji,R.mipmap.in_lixifuji_fs,1});
|
||||||
|
db.execSQL(sql,new Object[]{"投资回报", R.mipmap.in_touzi,R.mipmap.in_touzi_fs,1});
|
||||||
|
db.execSQL(sql,new Object[]{"二手交易", R.mipmap.in_ershoushebei,R.mipmap.in_ershoushebei_fs,1});
|
||||||
|
db.execSQL(sql,new Object[]{"意外所得", R.mipmap.in_yiwai,R.mipmap.in_yiwai_fs,1});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据库版本在更新时发生改变,会调用此方法
|
||||||
|
@Override
|
||||||
|
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.hui.tally.db;
|
||||||
|
/*
|
||||||
|
* 表示收入或者支出具体类型的类
|
||||||
|
* */
|
||||||
|
public class TypeBean {
|
||||||
|
int id;
|
||||||
|
String typename; //类型名称
|
||||||
|
int imageId; //未被选中图片id
|
||||||
|
int simageId; //被选中图片id
|
||||||
|
int kind; //收入-1 支出-0
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypename() {
|
||||||
|
return typename;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypename(String typename) {
|
||||||
|
this.typename = typename;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getImageId() {
|
||||||
|
return imageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageId(int imageId) {
|
||||||
|
this.imageId = imageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSimageId() {
|
||||||
|
return simageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSimageId(int simageId) {
|
||||||
|
this.simageId = simageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getKind() {
|
||||||
|
return kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKind(int kind) {
|
||||||
|
this.kind = kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TypeBean() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public TypeBean(int id, String typename, int imageId, int simageId, int kind) {
|
||||||
|
this.id = id;
|
||||||
|
this.typename = typename;
|
||||||
|
this.imageId = imageId;
|
||||||
|
this.simageId = simageId;
|
||||||
|
this.kind = kind;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.hui.tally.frag_record;
|
||||||
|
import com.hui.tally.R;
|
||||||
|
import com.hui.tally.db.DBManager;
|
||||||
|
import com.hui.tally.db.TypeBean;
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* 收入记录页面
|
||||||
|
*/
|
||||||
|
public class IncomeFragment extends BaseRecordFragment {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadDataToGV() {
|
||||||
|
super.loadDataToGV();
|
||||||
|
//获取数据库当中的数据源
|
||||||
|
List<TypeBean> inlist = DBManager.getTypeList(1);
|
||||||
|
typeList.addAll(inlist);
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
typeTv.setText("其他");
|
||||||
|
typeIv.setImageResource(R.mipmap.in_qt_fs);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveAccountToDB() {
|
||||||
|
accountBean.setKind(1);
|
||||||
|
DBManager.insertItemToAccounttb(accountBean);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.hui.tally.frag_record;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import com.hui.tally.R;
|
||||||
|
import com.hui.tally.db.DBManager;
|
||||||
|
import com.hui.tally.db.TypeBean;
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
*/
|
||||||
|
public class OutcomeFragment extends BaseRecordFragment {
|
||||||
|
|
||||||
|
|
||||||
|
// 重写
|
||||||
|
@Override
|
||||||
|
public void loadDataToGV() {
|
||||||
|
super.loadDataToGV();
|
||||||
|
//获取数据库当中的数据源
|
||||||
|
List<TypeBean> outlist = DBManager.getTypeList(0);
|
||||||
|
typeList.addAll(outlist);
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
typeTv.setText("其他");
|
||||||
|
typeIv.setImageResource(R.mipmap.ic_qita_fs);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveAccountToDB() {
|
||||||
|
accountBean.setKind(0);
|
||||||
|
DBManager.insertItemToAccounttb(accountBean);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.hui.tally;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
public class hobbychoiceActivity2 extends AppCompatActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_hobbychoice2);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,89 @@
|
|||||||
|
package com.hui.tally.utils;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Message;
|
||||||
|
import android.view.Display;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.hui.tally.R;
|
||||||
|
|
||||||
|
public class BeiZhuDialog extends Dialog implements View.OnClickListener {
|
||||||
|
EditText et;
|
||||||
|
Button cancelBtn,ensureBtn;
|
||||||
|
OnEnsureListener onEnsureListener;
|
||||||
|
// 设定回调接口的方法
|
||||||
|
public void setOnEnsureListener(OnEnsureListener onEnsureListener) {
|
||||||
|
this.onEnsureListener = onEnsureListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BeiZhuDialog(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.dialog_beizhu);//设置对话框显示布局
|
||||||
|
et = findViewById(R.id.dialog_beizhu_et);
|
||||||
|
cancelBtn = findViewById(R.id.dialog_beizhu_btn_cancel);
|
||||||
|
ensureBtn = findViewById(R.id.dialog_beizhu_btn_ensure);
|
||||||
|
cancelBtn.setOnClickListener(this);
|
||||||
|
ensureBtn.setOnClickListener(this);
|
||||||
|
}
|
||||||
|
public interface OnEnsureListener{
|
||||||
|
public void onEnsure();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
switch (v.getId()) {
|
||||||
|
case R.id.dialog_beizhu_btn_cancel:
|
||||||
|
cancel();
|
||||||
|
break;
|
||||||
|
case R.id.dialog_beizhu_btn_ensure:
|
||||||
|
if (onEnsureListener!=null) {
|
||||||
|
onEnsureListener.onEnsure();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取输入数据的方法
|
||||||
|
public String getEditText(){
|
||||||
|
return et.getText().toString().trim();
|
||||||
|
}
|
||||||
|
/* 设置Dialog的尺寸和屏幕尺寸一致*/
|
||||||
|
public void setDialogSize(){
|
||||||
|
// 获取当前窗口对象
|
||||||
|
Window window = getWindow();
|
||||||
|
// 获取窗口对象的参数
|
||||||
|
WindowManager.LayoutParams wlp = window.getAttributes();
|
||||||
|
// 获取屏幕宽度
|
||||||
|
Display d = window.getWindowManager().getDefaultDisplay();
|
||||||
|
wlp.width = (int)(d.getWidth()); //对话框窗口为屏幕窗口
|
||||||
|
wlp.gravity = Gravity.BOTTOM;
|
||||||
|
window.setBackgroundDrawableResource(android.R.color.transparent);
|
||||||
|
window.setAttributes(wlp);
|
||||||
|
handler.sendEmptyMessageDelayed(1,100);
|
||||||
|
}
|
||||||
|
|
||||||
|
Handler handler = new Handler(){
|
||||||
|
@Override
|
||||||
|
public void handleMessage(@NonNull Message msg) {
|
||||||
|
//自动弹出软键盘的方法
|
||||||
|
InputMethodManager inputMethodManager = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
inputMethodManager.toggleSoftInput(0,InputMethodManager.HIDE_NOT_ALWAYS);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,101 @@
|
|||||||
|
package com.hui.tally.utils;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Message;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.Display;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.hui.tally.R;
|
||||||
|
|
||||||
|
public class BudgetDialog extends Dialog implements View.OnClickListener {
|
||||||
|
ImageView cancelIv;
|
||||||
|
Button ensureBtn;
|
||||||
|
EditText moneyEt;
|
||||||
|
public interface OnEnsureListener{
|
||||||
|
public void onEnsure(float money);
|
||||||
|
}
|
||||||
|
OnEnsureListener onEnsureListener;
|
||||||
|
|
||||||
|
public void setOnEnsureListener(OnEnsureListener onEnsureListener) {
|
||||||
|
this.onEnsureListener = onEnsureListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BudgetDialog(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.dialog_budget);
|
||||||
|
cancelIv = findViewById(R.id.dialog_budget_iv_error);
|
||||||
|
ensureBtn = findViewById(R.id.dialog_budget_btn_ensure);
|
||||||
|
moneyEt = findViewById(R.id.dialog_budget_et);
|
||||||
|
cancelIv.setOnClickListener(this);
|
||||||
|
ensureBtn.setOnClickListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
switch (v.getId()) {
|
||||||
|
case R.id.dialog_budget_iv_error:
|
||||||
|
cancel(); //取消对话框
|
||||||
|
break;
|
||||||
|
case R.id.dialog_budget_btn_ensure:
|
||||||
|
//获取输入数据数值
|
||||||
|
String data = moneyEt.getText().toString();
|
||||||
|
if (TextUtils.isEmpty(data)) {
|
||||||
|
Toast.makeText(getContext(),"输入数据不能为空!",Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
float money = Float.parseFloat(data);
|
||||||
|
if (money<=0) {
|
||||||
|
Toast.makeText(getContext(),"预算金额必须大于0",Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (onEnsureListener!=null) {
|
||||||
|
onEnsureListener.onEnsure(money);
|
||||||
|
}
|
||||||
|
cancel();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 设置Dialog的尺寸和屏幕尺寸一致*/
|
||||||
|
public void setDialogSize(){
|
||||||
|
// 获取当前窗口对象
|
||||||
|
Window window = getWindow();
|
||||||
|
// 获取窗口对象的参数
|
||||||
|
WindowManager.LayoutParams wlp = window.getAttributes();
|
||||||
|
// 获取屏幕宽度
|
||||||
|
Display d = window.getWindowManager().getDefaultDisplay();
|
||||||
|
wlp.width = (int)(d.getWidth()); //对话框窗口为屏幕窗口
|
||||||
|
wlp.gravity = Gravity.BOTTOM;
|
||||||
|
window.setBackgroundDrawableResource(android.R.color.transparent);
|
||||||
|
window.setAttributes(wlp);
|
||||||
|
handler.sendEmptyMessageDelayed(1,100);
|
||||||
|
}
|
||||||
|
|
||||||
|
Handler handler = new Handler(){
|
||||||
|
@Override
|
||||||
|
public void handleMessage(@NonNull Message msg) {
|
||||||
|
//自动弹出软键盘的方法
|
||||||
|
InputMethodManager inputMethodManager = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
inputMethodManager.toggleSoftInput(0,InputMethodManager.HIDE_NOT_ALWAYS);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,100 @@
|
|||||||
|
package com.hui.tally.utils;
|
||||||
|
|
||||||
|
import android.inputmethodservice.Keyboard;
|
||||||
|
import android.inputmethodservice.KeyboardView;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.InputType;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.EditText;
|
||||||
|
|
||||||
|
import com.hui.tally.R;
|
||||||
|
|
||||||
|
public class KeyBoardUtils {
|
||||||
|
private final Keyboard k1; //自定义键盘
|
||||||
|
private KeyboardView keyboardView;
|
||||||
|
private EditText editText;
|
||||||
|
|
||||||
|
public interface OnEnsureListener{
|
||||||
|
public void onEnsure();
|
||||||
|
}
|
||||||
|
OnEnsureListener onEnsureListener;
|
||||||
|
|
||||||
|
public void setOnEnsureListener(OnEnsureListener onEnsureListener) {
|
||||||
|
this.onEnsureListener = onEnsureListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public KeyBoardUtils(KeyboardView keyboardView, EditText editText) {
|
||||||
|
this.keyboardView = keyboardView;
|
||||||
|
this.editText = editText;
|
||||||
|
this.editText.setInputType(InputType.TYPE_NULL); //取消弹出系统键盘
|
||||||
|
k1 = new Keyboard(this.editText.getContext(), R.xml.key);
|
||||||
|
|
||||||
|
this.keyboardView.setKeyboard(k1); //设置要显示键盘的样式
|
||||||
|
this.keyboardView.setEnabled(true);
|
||||||
|
this.keyboardView.setPreviewEnabled(false);
|
||||||
|
this.keyboardView.setOnKeyboardActionListener(listener); //设置键盘按钮被点击了的监听
|
||||||
|
}
|
||||||
|
|
||||||
|
KeyboardView.OnKeyboardActionListener listener = new KeyboardView.OnKeyboardActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onPress(int primaryCode) {
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onRelease(int primaryCode) {
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onKey(int primaryCode, int[] keyCodes) {
|
||||||
|
Editable editable = editText.getText();
|
||||||
|
int start = editText.getSelectionStart();
|
||||||
|
switch (primaryCode) {
|
||||||
|
case Keyboard.KEYCODE_DELETE: //点击了删除键
|
||||||
|
if (editable!=null &&editable.length()>0) {
|
||||||
|
if (start>0) {
|
||||||
|
editable.delete(start-1,start);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Keyboard.KEYCODE_CANCEL: //点击了清零
|
||||||
|
editable.clear();
|
||||||
|
break;
|
||||||
|
case Keyboard.KEYCODE_DONE: //点击了完成
|
||||||
|
onEnsureListener.onEnsure(); //通过接口回调的方法,当点击确定时,可以调用这个方法
|
||||||
|
break;
|
||||||
|
default: //其他数字直接插入
|
||||||
|
editable.insert(start,Character.toString((char)primaryCode));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onText(CharSequence text) {
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void swipeLeft() {
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void swipeRight() {
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void swipeDown() {
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void swipeUp() {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 显示键盘
|
||||||
|
public void showKeyboard(){
|
||||||
|
int visibility = keyboardView.getVisibility();
|
||||||
|
if (visibility == View.INVISIBLE ||visibility==View.GONE) {
|
||||||
|
keyboardView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 隐藏键盘
|
||||||
|
public void hideKeyboard(){
|
||||||
|
int visibility = keyboardView.getVisibility();
|
||||||
|
if (visibility== View.VISIBLE||visibility==View.INVISIBLE) {
|
||||||
|
keyboardView.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,82 @@
|
|||||||
|
package com.hui.tally.utils;
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.Display;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import com.hui.tally.AboutActivity;
|
||||||
|
import com.hui.tally.HistoryActivity;
|
||||||
|
import com.hui.tally.MonthChartActivity;
|
||||||
|
import com.hui.tally.R;
|
||||||
|
import com.hui.tally.SettingActivity;
|
||||||
|
|
||||||
|
public class MoreDialog extends Dialog implements View.OnClickListener {
|
||||||
|
Button aboutBtn,settingBtn,historyBtn,infoBtn;
|
||||||
|
ImageView errorIv;
|
||||||
|
public MoreDialog(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.dialog_more);
|
||||||
|
aboutBtn = findViewById(R.id.dialog_more_btn_about);
|
||||||
|
settingBtn = findViewById(R.id.dialog_more_btn_setting);
|
||||||
|
historyBtn = findViewById(R.id.dialog_more_btn_record);
|
||||||
|
infoBtn = findViewById(R.id.dialog_more_btn_info);
|
||||||
|
errorIv = findViewById(R.id.dialog_more_iv);
|
||||||
|
|
||||||
|
aboutBtn.setOnClickListener(this);
|
||||||
|
settingBtn.setOnClickListener(this);
|
||||||
|
historyBtn.setOnClickListener(this);
|
||||||
|
infoBtn.setOnClickListener(this);
|
||||||
|
errorIv.setOnClickListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent();
|
||||||
|
switch (v.getId()) {
|
||||||
|
case R.id.dialog_more_btn_about:
|
||||||
|
intent.setClass(getContext(), AboutActivity.class);
|
||||||
|
getContext().startActivity(intent);
|
||||||
|
break;
|
||||||
|
case R.id.dialog_more_btn_setting:
|
||||||
|
intent.setClass(getContext(), SettingActivity.class);
|
||||||
|
getContext().startActivity(intent);
|
||||||
|
break;
|
||||||
|
case R.id.dialog_more_btn_record:
|
||||||
|
intent.setClass(getContext(), HistoryActivity.class);
|
||||||
|
getContext().startActivity(intent);
|
||||||
|
break;
|
||||||
|
case R.id.dialog_more_btn_info:
|
||||||
|
intent.setClass(getContext(), MonthChartActivity.class);
|
||||||
|
getContext().startActivity(intent);
|
||||||
|
break;
|
||||||
|
case R.id.dialog_more_iv:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
cancel();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 设置Dialog的尺寸和屏幕尺寸一致*/
|
||||||
|
public void setDialogSize(){
|
||||||
|
// 获取当前窗口对象
|
||||||
|
Window window = getWindow();
|
||||||
|
// 获取窗口对象的参数
|
||||||
|
WindowManager.LayoutParams wlp = window.getAttributes();
|
||||||
|
// 获取屏幕宽度
|
||||||
|
Display d = window.getWindowManager().getDefaultDisplay();
|
||||||
|
wlp.width = (int)(d.getWidth()); //对话框窗口为屏幕窗口
|
||||||
|
wlp.gravity = Gravity.BOTTOM;
|
||||||
|
window.setBackgroundDrawableResource(android.R.color.transparent);
|
||||||
|
window.setAttributes(wlp);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,136 @@
|
|||||||
|
package com.hui.tally.utils;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.DatePicker;
|
||||||
|
import android.widget.EditText;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.hui.tally.R;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 在记录页面弹出时间对话框
|
||||||
|
* */
|
||||||
|
public class SelectTimeDialog extends Dialog implements View.OnClickListener {
|
||||||
|
EditText hourEt,minuteEt;
|
||||||
|
DatePicker datePicker;
|
||||||
|
Button ensureBtn,cancelBtn;
|
||||||
|
public interface OnEnsureListener{
|
||||||
|
public void onEnsure(String time,int year,int month,int day);
|
||||||
|
}
|
||||||
|
OnEnsureListener onEnsureListener;
|
||||||
|
|
||||||
|
public void setOnEnsureListener(OnEnsureListener onEnsureListener) {
|
||||||
|
this.onEnsureListener = onEnsureListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SelectTimeDialog(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.dialog_time);
|
||||||
|
hourEt = findViewById(R.id.dialog_time_et_hour);
|
||||||
|
minuteEt = findViewById(R.id.dialog_time_et_minute);
|
||||||
|
datePicker = findViewById(R.id.dialog_time_dp);
|
||||||
|
ensureBtn = findViewById(R.id.dialog_time_btn_ensure);
|
||||||
|
cancelBtn = findViewById(R.id.dialog_time_btn_cancel);
|
||||||
|
ensureBtn.setOnClickListener(this); //添加点击监听事件
|
||||||
|
cancelBtn.setOnClickListener(this);
|
||||||
|
hideDatePickerHeader();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
switch (v.getId()) {
|
||||||
|
case R.id.dialog_time_btn_cancel:
|
||||||
|
cancel();
|
||||||
|
break;
|
||||||
|
case R.id.dialog_time_btn_ensure:
|
||||||
|
int year = datePicker.getYear(); //选择年份
|
||||||
|
int month = datePicker.getMonth()+1;
|
||||||
|
int dayOfMonth = datePicker.getDayOfMonth();
|
||||||
|
String monthStr = String.valueOf(month);
|
||||||
|
if (month<10){
|
||||||
|
monthStr = "0"+month;
|
||||||
|
}
|
||||||
|
String dayStr = String.valueOf(dayOfMonth);
|
||||||
|
if (dayOfMonth<10){
|
||||||
|
dayStr="0"+dayOfMonth;
|
||||||
|
}
|
||||||
|
// 获取输入的小时和分钟
|
||||||
|
String hourStr = hourEt.getText().toString();
|
||||||
|
String minuteStr = minuteEt.getText().toString();
|
||||||
|
int hour = 0;
|
||||||
|
if (!TextUtils.isEmpty(hourStr)) {
|
||||||
|
hour = Integer.parseInt(hourStr);
|
||||||
|
hour=hour%24;
|
||||||
|
}
|
||||||
|
int minute = 0;
|
||||||
|
if (!TextUtils.isEmpty(minuteStr)) {
|
||||||
|
minute = Integer.parseInt(minuteStr);
|
||||||
|
minute=minute%60;
|
||||||
|
}
|
||||||
|
|
||||||
|
hourStr=String.valueOf(hour);
|
||||||
|
minuteStr=String.valueOf(minute);
|
||||||
|
if (hour<10){
|
||||||
|
hourStr="0"+hour;
|
||||||
|
}
|
||||||
|
if (minute<10){
|
||||||
|
minuteStr="0"+minute;
|
||||||
|
}
|
||||||
|
String timeFormat = year+"年"+monthStr+"月"+dayStr+"日 "+hourStr+":"+minuteStr;
|
||||||
|
if (onEnsureListener!=null) {
|
||||||
|
onEnsureListener.onEnsure(timeFormat,year,month,dayOfMonth);
|
||||||
|
}
|
||||||
|
cancel();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//隐藏DatePicker头布局
|
||||||
|
private void hideDatePickerHeader(){
|
||||||
|
ViewGroup rootView = (ViewGroup) datePicker.getChildAt(0);
|
||||||
|
if (rootView == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
View headerView = rootView.getChildAt(0);
|
||||||
|
if (headerView == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//5.0+
|
||||||
|
int headerId = getContext().getResources().getIdentifier("day_picker_selector_layout", "id", "android");
|
||||||
|
if (headerId == headerView.getId()) {
|
||||||
|
headerView.setVisibility(View.GONE);
|
||||||
|
ViewGroup.LayoutParams layoutParamsRoot = rootView.getLayoutParams();
|
||||||
|
layoutParamsRoot.width = ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||||
|
rootView.setLayoutParams(layoutParamsRoot);
|
||||||
|
|
||||||
|
ViewGroup animator = (ViewGroup) rootView.getChildAt(1);
|
||||||
|
ViewGroup.LayoutParams layoutParamsAnimator = animator.getLayoutParams();
|
||||||
|
layoutParamsAnimator.width = ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||||
|
animator.setLayoutParams(layoutParamsAnimator);
|
||||||
|
|
||||||
|
View child = animator.getChildAt(0);
|
||||||
|
ViewGroup.LayoutParams layoutParamsChild = child.getLayoutParams();
|
||||||
|
layoutParamsChild.width = ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||||
|
child.setLayoutParams(layoutParamsChild);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 6.0+
|
||||||
|
headerId = getContext().getResources().getIdentifier("date_picker_header","id","android");
|
||||||
|
if (headerId == headerView.getId()) {
|
||||||
|
headerView.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillType="evenOdd"
|
||||||
|
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||||
|
android:strokeWidth="1"
|
||||||
|
android:strokeColor="#00000000">
|
||||||
|
<aapt:attr name="android:fillColor">
|
||||||
|
<gradient
|
||||||
|
android:endX="78.5885"
|
||||||
|
android:endY="90.9159"
|
||||||
|
android:startX="48.7653"
|
||||||
|
android:startY="61.0927"
|
||||||
|
android:type="linear">
|
||||||
|
<item
|
||||||
|
android:color="#44000000"
|
||||||
|
android:offset="0.0" />
|
||||||
|
<item
|
||||||
|
android:color="#00000000"
|
||||||
|
android:offset="1.0" />
|
||||||
|
</gradient>
|
||||||
|
</aapt:attr>
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||||
|
android:strokeWidth="1"
|
||||||
|
android:strokeColor="#00000000" />
|
||||||
|
</vector>
|
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<!-- 四个角设定弧度-->
|
||||||
|
<corners android:radius="20dp"/>
|
||||||
|
<!-- 填充颜色-->
|
||||||
|
<solid android:color="@color/white"/>
|
||||||
|
<stroke android:color="@color/green_006400" android:width="3dp"/>
|
||||||
|
</shape>
|
@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillColor="#008577"
|
||||||
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M9,0L9,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,0L19,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,0L29,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,0L39,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,0L49,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,0L59,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,0L69,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,0L79,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M89,0L89,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M99,0L99,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,9L108,9"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,19L108,19"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,29L108,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,39L108,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,49L108,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,59L108,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,69L108,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,79L108,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,89L108,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,99L108,99"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,29L89,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,39L89,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,49L89,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,59L89,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,69L89,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,79L89,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,19L29,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,19L39,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,19L49,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,19L59,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,19L69,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,19L79,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
</vector>
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="oval">
|
||||||
|
<!-- 填充颜色-->
|
||||||
|
<solid android:color="@color/green_006400"/>
|
||||||
|
</shape>
|