├── .gitignore
├── LICENSE
├── PRIVACY_POLICY.md
├── README.md
├── README_zh.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── ic_launcher-playstore.png
│ ├── java
│ └── com
│ │ └── yangdai
│ │ └── calc
│ │ ├── MyApplication.java
│ │ ├── MyCrashHandler.java
│ │ ├── features
│ │ ├── FloatingWindow.java
│ │ ├── MyWidgetProvider.java
│ │ ├── MyWidgetProviderCalc1.java
│ │ └── MyWidgetProviderCalc2.java
│ │ ├── main
│ │ ├── DepthPageTransformer.java
│ │ ├── ItemClick.java
│ │ ├── MainActivity.java
│ │ ├── MainFragment.java
│ │ ├── MyPagerAdapter.java
│ │ ├── calculator
│ │ │ ├── Calculator.java
│ │ │ ├── CalculatorFragment.java
│ │ │ ├── CalculatorUtils.java
│ │ │ ├── CalculatorViewModel.java
│ │ │ ├── HistoryAdapter.java
│ │ │ ├── HistoryItemClick.java
│ │ │ ├── HistoryListFragment.java
│ │ │ └── MyScrollListView.java
│ │ ├── sheets
│ │ │ ├── AboutFragment.java
│ │ │ ├── BottomSheetFragment.java
│ │ │ └── SettingsFragment.java
│ │ └── toolbox
│ │ │ ├── ToolBoxAdapter.java
│ │ │ ├── ToolBoxFragment.java
│ │ │ ├── ToolBoxItem.java
│ │ │ └── functions
│ │ │ ├── BaseFunctionActivity.java
│ │ │ ├── algebra
│ │ │ ├── Adapter.java
│ │ │ ├── Item.java
│ │ │ └── StatisticsActivity.java
│ │ │ ├── bmi
│ │ │ └── BMIActivity.java
│ │ │ ├── chinese
│ │ │ └── ChineseNumberConversionActivity.java
│ │ │ ├── compass
│ │ │ ├── Compass.java
│ │ │ └── CompassHelper.java
│ │ │ ├── converter
│ │ │ ├── UnitActivity.java
│ │ │ ├── UnitConverter.java
│ │ │ ├── UnitTable.java
│ │ │ └── UnitValue.java
│ │ │ ├── currency
│ │ │ ├── Currency.java
│ │ │ ├── CurrencyActivity.java
│ │ │ ├── CurrencyAdapter.java
│ │ │ └── CurrencyViewModel.java
│ │ │ ├── equation
│ │ │ ├── EquationActivity.java
│ │ │ ├── LinearFragment.java
│ │ │ └── QuadraticFragment.java
│ │ │ ├── finance
│ │ │ ├── BankFragment.java
│ │ │ ├── FinanceActivity.java
│ │ │ ├── InvestmentFragment.java
│ │ │ ├── LoanFragment.java
│ │ │ └── VatFragment.java
│ │ │ ├── fraction
│ │ │ ├── FractionActivity.java
│ │ │ ├── FractorizationFragment.java
│ │ │ ├── ToDecimalFragment.java
│ │ │ └── ToFractionFragment.java
│ │ │ ├── programmer
│ │ │ ├── ProgrammerActivity.java
│ │ │ └── RadixUtil.java
│ │ │ ├── random
│ │ │ ├── GeneratorFragment.java
│ │ │ ├── PickerFragment.java
│ │ │ └── RandomNumberActivity.java
│ │ │ ├── relationship
│ │ │ ├── RelationShipData.java
│ │ │ └── RelationshipActivity.java
│ │ │ ├── ruler
│ │ │ ├── RulerActivity.java
│ │ │ ├── RulerView.java
│ │ │ └── RulerViewInch.java
│ │ │ ├── shopping
│ │ │ ├── DiscountFragment.java
│ │ │ ├── ShoppingActivity.java
│ │ │ └── UnitPriceFragment.java
│ │ │ └── time
│ │ │ ├── DateAddSubCalcFragment.java
│ │ │ ├── DateDifferCalcFragment.java
│ │ │ └── DateRangeActivity.java
│ │ └── utils
│ │ ├── PaymentUtil.java
│ │ ├── TTS.java
│ │ ├── TTSInitializationListener.java
│ │ ├── TouchAnimation.java
│ │ └── Utils.java
│ └── res
│ ├── color
│ └── chip_color.xml
│ ├── drawable-nodpi
│ ├── australia.webp
│ ├── brazil.webp
│ ├── bulgaria.webp
│ ├── canada.webp
│ ├── china.webp
│ ├── czechia.webp
│ ├── denmark.webp
│ ├── eu.webp
│ ├── hongkongchina.webp
│ ├── hungary.webp
│ ├── iceland.webp
│ ├── img.webp
│ ├── india.webp
│ ├── indonesia.webp
│ ├── israel.webp
│ ├── japan.webp
│ ├── malaysia.webp
│ ├── mexico.webp
│ ├── new_zealand.webp
│ ├── norway.webp
│ ├── philippines.webp
│ ├── poland.webp
│ ├── romania.webp
│ ├── singapore.webp
│ ├── south_africa.webp
│ ├── south_korea.webp
│ ├── sweden.webp
│ ├── switzerland.webp
│ ├── thailand.webp
│ ├── turkey.webp
│ ├── uk.webp
│ └── us.webp
│ ├── drawable
│ ├── add_icon.xml
│ ├── angle_icon.xml
│ ├── apps.xml
│ ├── area_icon.xml
│ ├── arrow_drop_down.xml
│ ├── bank_icon.xml
│ ├── baseline_drag_handle_24.xml
│ ├── baseline_menu_24.xml
│ ├── binary_icon.xml
│ ├── bmi_icon.xml
│ ├── calculate_icon.xml
│ ├── calendar_add.xml
│ ├── calendar_diff.xml
│ ├── chinese_number_icon.xml
│ ├── circle_background.xml
│ ├── combined_drawable_add.xml
│ ├── combined_drawable_down.xml
│ ├── combined_drawable_swap_vert.xml
│ ├── compass_icon.xml
│ ├── compass_icon_shortcuts.xml
│ ├── contrast.xml
│ ├── currency_exchange_icon.xml
│ ├── currency_exchange_icon_shortcuts.xml
│ ├── currency_exchange_icon_shortcuts_colored.xml
│ ├── data_icon.xml
│ ├── date_range_icon.xml
│ ├── date_range_icon_shortcuts.xml
│ ├── decimal_icon.xml
│ ├── delete_outline.xml
│ ├── discount_icon.xml
│ ├── divider_horizontal.xml
│ ├── donate.xml
│ ├── drag_indicator.xml
│ ├── email.xml
│ ├── factor_icon.xml
│ ├── finance_icon.xml
│ ├── finance_icon_shortcuts.xml
│ ├── float_close.xml
│ ├── format_size.xml
│ ├── fraction.xml
│ ├── fraction_icon.xml
│ ├── fullscreen.xml
│ ├── fullscreen_exit.xml
│ ├── functions_icon.xml
│ ├── github.xml
│ ├── grid_on.xml
│ ├── grid_view_more.xml
│ ├── heat_icon.xml
│ ├── history.xml
│ ├── ic_launcher_foreground.xml
│ ├── ic_launcher_mono.xml
│ ├── info.xml
│ ├── info_icon.xml
│ ├── invest_icon.xml
│ ├── keyboard_arrow_down.xml
│ ├── language.xml
│ ├── length_icon.xml
│ ├── linear_icon.xml
│ ├── loan_icon.xml
│ ├── mass_icon.xml
│ ├── material_switch.xml
│ ├── mode_edit_outline.xml
│ ├── osl.xml
│ ├── phone_android.xml
│ ├── popmenu_background.xml
│ ├── power_icon.xml
│ ├── pressure_icon.xml
│ ├── privacy.xml
│ ├── random_card.xml
│ ├── random_dice.xml
│ ├── random_number_icon.xml
│ ├── rate.xml
│ ├── relation_icon.xml
│ ├── rounded_corner.xml
│ ├── rounded_corner_fragment.xml
│ ├── ruler_icon.xml
│ ├── ruler_left.xml
│ ├── ruler_right.xml
│ ├── scale_123.xml
│ ├── settings_chip_icon.xml
│ ├── share.xml
│ ├── shopping_icon.xml
│ ├── shopping_icon_shortcuts.xml
│ ├── speech_text.xml
│ ├── speed_icon.xml
│ ├── splitscreen.xml
│ ├── statistics_icon.xml
│ ├── statistics_icon_shortcuts.xml
│ ├── swap_vert.xml
│ ├── table_rows.xml
│ ├── tax_icon.xml
│ ├── tempe_icon.xml
│ ├── theme_color.xml
│ ├── time_icon.xml
│ ├── tips_off.xml
│ ├── tips_on.xml
│ ├── unit_icon.xml
│ ├── unit_icon_shortcuts.xml
│ ├── unit_icon_shortcuts_colored.xml
│ ├── unit_price_icon.xml
│ ├── update.xml
│ ├── vibration.xml
│ ├── volume_icon.xml
│ └── wave_icon.xml
│ ├── layout-land
│ ├── activity_chinese_number_conversion.xml
│ ├── activity_programmer.xml
│ ├── activity_relationship.xml
│ ├── activity_statistic.xml
│ ├── activity_unit.xml
│ ├── compass.xml
│ └── fragment_calculator.xml
│ ├── layout-sw320dp-port
│ └── fragment_calculator.xml
│ ├── layout-sw600dp-land
│ └── activity_main.xml
│ ├── layout-sw600dp
│ ├── activity_chinese_number_conversion.xml
│ ├── activity_programmer.xml
│ ├── activity_relationship.xml
│ └── activity_unit.xml
│ ├── layout
│ ├── activity_bmi.xml
│ ├── activity_chinese_number_conversion.xml
│ ├── activity_date_range.xml
│ ├── activity_discount.xml
│ ├── activity_equation.xml
│ ├── activity_exchange.xml
│ ├── activity_finance.xml
│ ├── activity_fraction.xml
│ ├── activity_main.xml
│ ├── activity_programmer.xml
│ ├── activity_random_number.xml
│ ├── activity_relationship.xml
│ ├── activity_ruler.xml
│ ├── activity_statistic.xml
│ ├── activity_unit.xml
│ ├── algebra_item.xml
│ ├── compass.xml
│ ├── currency_layout.xml
│ ├── floating_layout.xml
│ ├── fragmen_date_diff_calc.xml
│ ├── fragment_about.xml
│ ├── fragment_bank.xml
│ ├── fragment_bottom_sheet_dialog.xml
│ ├── fragment_calculator.xml
│ ├── fragment_date_addsub_calc.xml
│ ├── fragment_discount.xml
│ ├── fragment_fractorization.xml
│ ├── fragment_generator.xml
│ ├── fragment_history_list.xml
│ ├── fragment_investment.xml
│ ├── fragment_linear.xml
│ ├── fragment_loan.xml
│ ├── fragment_main.xml
│ ├── fragment_picker.xml
│ ├── fragment_quadratic.xml
│ ├── fragment_to_decimal.xml
│ ├── fragment_to_fraction.xml
│ ├── fragment_toolbox.xml
│ ├── fragment_unit_price.xml
│ ├── fragment_vat.xml
│ ├── grid_item_toolbox.xml
│ ├── list_item.xml
│ ├── list_item_toolbox.xml
│ ├── widget_calc1.xml
│ ├── widget_calc2.xml
│ └── widget_layout.xml
│ ├── menu
│ ├── currency_info.xml
│ ├── delete_menu.xml
│ └── main_menu.xml
│ ├── mipmap-anydpi-v26
│ ├── ic_launcher.xml
│ └── ic_launcher_round.xml
│ ├── mipmap-hdpi
│ └── ic_launcher_round.png
│ ├── mipmap-mdpi
│ └── ic_launcher_round.png
│ ├── mipmap-xhdpi
│ └── ic_launcher_round.png
│ ├── mipmap-xxhdpi
│ └── ic_launcher_round.png
│ ├── mipmap-xxxhdpi
│ └── ic_launcher_round.png
│ ├── resources.properties
│ ├── values-de
│ └── strings.xml
│ ├── values-night
│ └── colors.xml
│ ├── values-zh
│ └── strings.xml
│ ├── values
│ ├── colors.xml
│ ├── ic_launcher_background.xml
│ ├── strings.xml
│ └── themes.xml
│ └── xml
│ ├── appwidget_provider.xml
│ ├── appwidget_provider_calc1.xml
│ ├── appwidget_provider_calc2.xml
│ ├── backup_rules.xml
│ ├── data_extraction_rules.xml
│ ├── fragment_calculator_scene.xml
│ ├── main_split_config.xml
│ ├── root_preferences.xml
│ └── shortcuts.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/PRIVACY_POLICY.md:
--------------------------------------------------------------------------------
1 | ## Privacy Policy of Multi-Calculator
2 |
3 | This is an open source Android app developed by Yang Dai. The source code is available on GitHub under the Apache License (2.0 or later).
4 |
5 | ### Data collected by apps and third-party SDKs
6 |
7 | Multi-Calculator itself does not collect user confidential data and personal information such as address, name and E-Mail.
8 |
9 | Third-party SDKs will be explained in the following table:
10 |
11 |
12 | | SDK name | Purpose of using SDK | Data collected by SDK |
13 | |:--------:|------------------------------------------------|-----------------------------------------------------------------|
14 | | Firebase | Analyze application crashes and ANR situations | Device model, OS version, code crash location and error message |
15 |
16 | [Firebase Terms of Service](https://firebase.google.com/terms)
17 |
18 | ### Permissions requested in the app
19 |
20 | The list of permissions required by the app can be found in the `AndroidManifest.xml` file:
21 |
22 | https://github.com/YangDai2003/Multi-Calculator-Android/blob/1796346f5eeafca8eeeb2ec2af245eff02b504b2/app/src/main/AndroidManifest.xml#L6-L11
23 |
24 |
25 |
26 | | Permission | Purpose |
27 | |:---------------------------------------------------------------------------------------:|-----------------------------------------------------------|
28 | | `android.permission.VIBRATE` | Used to provide vibration feedback when operating buttons |
29 | | `android.permission.ACCESS_COARSE_LOCATION` , `android.permission.ACCESS_FINE_LOCATION` | Used to provide compass functionality |
30 | | `android.permission.INTERNET` | Used to obtain real-time exchange rate data |
31 | | `android.permission.SYSTEM_ALERT_WINDOW` | Used to evoke third-party application windows |
32 | | `android.permission.SYSTEM_OVERLAY_WINDOW` | Used to provide floating window function |
33 | | `com.google.android.gms.permission.AD_ID` | Used to declare firebase |
34 |
35 |
36 |
37 | If you have any questions about this Policy or personal information protection, you can send your written questions, opinions, or suggestions to the following E-Mail address: dy15800837435@gmail.com
38 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | id 'com.google.gms.google-services'
4 | id 'com.google.firebase.crashlytics'
5 | }
6 | apply plugin: 'com.google.android.gms.oss-licenses-plugin'
7 |
8 | android {
9 | namespace 'com.yangdai.calc'
10 | compileSdk 35
11 |
12 | defaultConfig {
13 | applicationId "com.yangdai.calc"
14 | minSdk 28
15 | targetSdk 35
16 | versionCode 63
17 | versionName '7.3'
18 | }
19 |
20 | androidResources {
21 | generateLocaleConfig true
22 | }
23 |
24 | buildTypes {
25 | release {
26 | minifyEnabled true
27 | shrinkResources true
28 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
29 | }
30 | }
31 | compileOptions {
32 | sourceCompatibility JavaVersion.VERSION_17
33 | targetCompatibility JavaVersion.VERSION_17
34 | }
35 | buildFeatures {
36 | viewBinding true
37 | }
38 | viewBinding {
39 | enabled = true
40 | }
41 | // 修改发布包名称
42 | applicationVariants.configureEach { variant ->
43 | variant.outputs.configureEach { output ->
44 | def appName = "多功能计算器(Multi-Calculator)" // 替换应用名称
45 | def buildType = variant.buildType.name.capitalize() // 获取构建类型的名称并首字母大写
46 | def versionName = variant.versionName // 获取版本名称
47 |
48 | outputFileName = "${appName}_${buildType}_${versionName}.apk"
49 | }
50 | }
51 | }
52 |
53 | dependencies {
54 | implementation(platform('org.jetbrains.kotlin:kotlin-bom:2.1.0'))
55 | implementation 'com.tbuonomo:dotsindicator:5.1.0'
56 | implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
57 |
58 | implementation 'com.google.android.play:app-update:2.1.0'
59 | implementation 'com.google.android.gms:play-services-oss-licenses:17.1.0'
60 | implementation 'com.google.android.gms:play-services-location:21.3.0'
61 |
62 | implementation platform('com.google.firebase:firebase-bom:33.8.0')
63 | implementation 'com.google.firebase:firebase-analytics'
64 | implementation 'com.google.firebase:firebase-crashlytics'
65 | implementation 'com.google.firebase:firebase-inappmessaging-display'
66 |
67 | implementation 'androidx.browser:browser:1.8.0'
68 | implementation 'androidx.core:core-splashscreen:1.0.1'
69 | implementation 'androidx.activity:activity:1.10.0'
70 | implementation 'androidx.window:window:1.3.0'
71 | implementation 'androidx.appcompat:appcompat:1.7.0'
72 | // com.google.android.material:material 1.11.0 has bug with Material 3 Color
73 | //noinspection GradleDependency
74 | implementation 'com.google.android.material:material:1.10.0'
75 | implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
76 | implementation 'androidx.preference:preference:1.2.1'
77 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
78 | implementation 'androidx.recyclerview:recyclerview:1.4.0'
79 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/MyApplication.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc;
2 |
3 | import static androidx.preference.PreferenceManager.getDefaultSharedPreferences;
4 |
5 | import android.app.Application;
6 | import android.content.SharedPreferences;
7 | import android.content.pm.ApplicationInfo;
8 | import android.widget.Toast;
9 |
10 | import androidx.appcompat.app.AppCompatDelegate;
11 | import androidx.window.embedding.RuleController;
12 |
13 | import com.google.android.material.color.DynamicColors;
14 |
15 | /**
16 | * @author 30415
17 | */
18 | public class MyApplication extends Application {
19 | @Override
20 | public void onCreate() {
21 | super.onCreate();
22 | DynamicColors.applyToActivitiesIfAvailable(this);
23 | SharedPreferences defaultSp = getDefaultSharedPreferences(getApplicationContext());
24 | int theme = defaultSp.getInt("themeSetting", 2);
25 | switch (theme) {
26 | case 0 -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
27 | case 1 -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
28 | case 2 ->
29 | AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
30 | default -> {
31 | }
32 | }
33 | boolean isActivityEmbeddingEnabled = defaultSp.getBoolean("split", false);
34 | if (isActivityEmbeddingEnabled) {
35 | RuleController.getInstance(this).setRules(RuleController.parseRules(this, R.xml.main_split_config));
36 | }
37 | if ((getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
38 | MyCrashHandler.init(getApplicationContext());
39 | Toast.makeText(this, "Debug", Toast.LENGTH_SHORT).show();
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/DepthPageTransformer.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main;
2 |
3 | import android.view.View;
4 |
5 | import androidx.viewpager2.widget.ViewPager2;
6 |
7 | /**
8 | * 自定义适用于viewpager2的页面切换动画,用于历史记录和计算器界面的切换
9 | *
10 | * @author 30415
11 | */
12 | public class DepthPageTransformer implements ViewPager2.PageTransformer {
13 | private static final float MIN_SCALE = 0.9f;
14 |
15 | @Override
16 | public void transformPage(View view, float position) {
17 | int pageHeight = view.getHeight();
18 |
19 | if (position < -1) { // [-Infinity,-1)
20 | // This page is way off-screen to the left.
21 | view.setAlpha(0f);
22 |
23 | } else if (position <= 0) { // [-1,0]
24 | // Use the default slide transition when moving to the left page
25 | view.setAlpha(1f);
26 | view.setTranslationY(0f);
27 | view.setTranslationZ(0f);
28 | view.setScaleX(1f);
29 | view.setScaleY(1f);
30 |
31 | } else if (position <= 1) { // (0,1]
32 | // Fade the page out.
33 | view.setAlpha(1 - position);
34 |
35 | // Counteract the default slide transition
36 | view.setTranslationY(pageHeight * -position);
37 | // Move it behind the left page
38 | view.setTranslationZ(-1f);
39 |
40 | // Scale the page down (between MIN_SCALE and 1)
41 | float scaleFactor = MIN_SCALE
42 | + (1 - MIN_SCALE) * (1 - Math.abs(position));
43 | view.setScaleX(scaleFactor);
44 | view.setScaleY(scaleFactor);
45 |
46 | } else { // (1,+Infinity]
47 | // This page is way off-screen to the right.
48 | view.setAlpha(0f);
49 | }
50 | }
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/ItemClick.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main;
2 |
3 | import com.yangdai.calc.main.toolbox.ToolBoxItem;
4 |
5 | /**
6 | * @author 30415
7 | */
8 | public interface ItemClick {
9 | void onClick(ToolBoxItem item);
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/MainFragment.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main;
2 |
3 | import android.os.Bundle;
4 |
5 | import androidx.annotation.NonNull;
6 | import androidx.annotation.Nullable;
7 | import androidx.fragment.app.Fragment;
8 | import androidx.viewpager2.widget.ViewPager2;
9 |
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 |
14 | import com.yangdai.calc.R;
15 | import com.yangdai.calc.main.calculator.CalculatorFragment;
16 | import com.yangdai.calc.main.calculator.HistoryListFragment;
17 |
18 | import java.util.ArrayList;
19 | import java.util.List;
20 |
21 | /**
22 | * @author 30415
23 | */
24 | public class MainFragment extends Fragment {
25 | private MyPagerAdapter myPagerAdapter;
26 |
27 | public MainFragment() {
28 | }
29 |
30 | public static MainFragment newInstance() {
31 | return new MainFragment();
32 | }
33 |
34 | @Override
35 | public void onCreate(@Nullable Bundle savedInstanceState) {
36 | super.onCreate(savedInstanceState);
37 | List fragments = new ArrayList<>();
38 | fragments.add(HistoryListFragment.newInstance());
39 | fragments.add(CalculatorFragment.newInstance());
40 | myPagerAdapter = new MyPagerAdapter(getChildFragmentManager(), getLifecycle(), fragments);
41 | }
42 |
43 | @Override
44 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
45 | // Inflate the layout for this fragment
46 | return inflater.inflate(R.layout.fragment_main, container, false);
47 | }
48 |
49 | @Override
50 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
51 | super.onViewCreated(view, savedInstanceState);
52 | ViewPager2 viewPager2 = view.findViewById(R.id.view_pager);
53 | viewPager2.setAdapter(myPagerAdapter);
54 | viewPager2.setPageTransformer(new DepthPageTransformer());
55 | viewPager2.setCurrentItem(1, false);
56 | }
57 |
58 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/MyPagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.fragment.app.Fragment;
5 | import androidx.fragment.app.FragmentManager;
6 | import androidx.lifecycle.Lifecycle;
7 | import androidx.viewpager2.adapter.FragmentStateAdapter;
8 |
9 | import java.util.List;
10 |
11 | /**
12 | * @author 30415
13 | */
14 | public class MyPagerAdapter extends FragmentStateAdapter {
15 | private final List fragments;
16 |
17 | public MyPagerAdapter(@NonNull FragmentManager fragmentManager, @NonNull Lifecycle lifecycle, List fragments) {
18 | super(fragmentManager, lifecycle);
19 | this.fragments = fragments;
20 | }
21 |
22 | @NonNull
23 | @Override
24 | public Fragment createFragment(int position) {
25 | return fragments.get(position);
26 | }
27 |
28 | @Override
29 | public int getItemCount() {
30 | return fragments.size();
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/calculator/HistoryAdapter.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.calculator;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ArrayAdapter;
8 | import android.widget.TextView;
9 |
10 | import androidx.annotation.NonNull;
11 | import androidx.annotation.Nullable;
12 |
13 | import com.yangdai.calc.R;
14 | import com.yangdai.calc.utils.Utils;
15 |
16 | import java.util.List;
17 |
18 | public class HistoryAdapter extends ArrayAdapter {
19 | private final HistoryItemClick itemClick;
20 |
21 | public HistoryAdapter(@NonNull Context context, @NonNull List objects, HistoryItemClick itemClick) {
22 | super(context, 0, objects);
23 | this.itemClick = itemClick;
24 | }
25 |
26 | @NonNull
27 | @Override
28 | public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
29 | if (convertView == null) {
30 | convertView = LayoutInflater.from(getContext()).inflate(R.layout.list_item, parent, false);
31 | }
32 |
33 | String item = getItem(position);
34 | if (item != null) {
35 | TextView input = convertView.findViewById(R.id.input_tv);
36 | TextView output = convertView.findViewById(R.id.output_tv);
37 |
38 | String[] parts = item.split("=");
39 | if (parts.length == 2) {
40 | String leftSide = parts[0].trim();
41 | String rightSide = parts[1].trim();
42 |
43 | input.setText(leftSide);
44 | CalculatorUtils.highlightSpecialSymbols(input);
45 | output.setText(Utils.formatNumber(rightSide));
46 |
47 | View.OnClickListener onClickListener = v -> itemClick.onClick(rightSide);
48 |
49 | convertView.setOnClickListener(onClickListener);
50 | input.setOnClickListener(v -> itemClick.onClick(leftSide));
51 | output.setOnClickListener(onClickListener);
52 | }
53 |
54 | }
55 |
56 | return convertView;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/calculator/HistoryItemClick.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.calculator;
2 |
3 | /**
4 | * @author 30415
5 | */
6 | public interface HistoryItemClick {
7 | void onClick(String str);
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/calculator/MyScrollListView.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.calculator;
2 |
3 | import android.content.Context;
4 | import android.util.AttributeSet;
5 | import android.view.MotionEvent;
6 | import android.widget.ListView;
7 |
8 |
9 | /**
10 | * @author 30415
11 | */
12 | public class MyScrollListView extends ListView {
13 | private float preY = 0, preX = 0;
14 |
15 | public MyScrollListView(Context context) {
16 | super(context);
17 | }
18 |
19 | public MyScrollListView(Context context, AttributeSet attrs) {
20 | super(context, attrs);
21 | }
22 |
23 | public MyScrollListView(Context context, AttributeSet attrs, int defStyleAttr) {
24 | super(context, attrs, defStyleAttr);
25 | }
26 |
27 | @Override
28 | public boolean dispatchTouchEvent(MotionEvent ev) {
29 | switch (ev.getAction()) {
30 | case MotionEvent.ACTION_DOWN -> {
31 | preY = ev.getY();
32 | preX = ev.getX();
33 | getParent().requestDisallowInterceptTouchEvent(true);
34 | }
35 | case MotionEvent.ACTION_MOVE ->
36 | {
37 | float currentY = ev.getY();
38 | float deltaY = currentY - preY;
39 | float deltaX = ev.getX() - preX;
40 | if (Math.abs(deltaX) > Math.abs(deltaY)) {
41 | getParent().requestDisallowInterceptTouchEvent(true);
42 | } else {
43 | getParent().requestDisallowInterceptTouchEvent(!slideToTheBottom(ev));
44 | }
45 | }
46 | case MotionEvent.ACTION_UP -> getParent().requestDisallowInterceptTouchEvent(false);
47 | default -> {}
48 | }
49 | return super.dispatchTouchEvent(ev);
50 | }
51 |
52 | /**
53 | * 最后一个可见item为全部item的最后一个,且手势向上滑动,且全部露出
54 | */
55 | private boolean slideToTheBottom(MotionEvent ev) {
56 | if (getCount() == 0) {
57 | return true;
58 | }
59 | return getLastVisiblePosition() == getCount() - 1
60 | // && getChildAt(getChildCount() - 1).getBottom() == getHeight()
61 | && ev.getY() - preY < 0;
62 | }
63 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/ToolBoxAdapter.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox;
2 |
3 | import android.view.LayoutInflater;
4 | import android.view.View;
5 | import android.view.ViewGroup;
6 | import android.widget.TextView;
7 |
8 | import androidx.annotation.NonNull;
9 | import androidx.recyclerview.widget.RecyclerView;
10 |
11 | import com.google.android.material.imageview.ShapeableImageView;
12 | import com.yangdai.calc.R;
13 | import com.yangdai.calc.main.ItemClick;
14 |
15 | import java.util.List;
16 |
17 | /**
18 | * @author 30415
19 | */
20 | public class ToolBoxAdapter extends RecyclerView.Adapter {
21 | private final List list;
22 | final ItemClick itemClick;
23 | private final boolean isGrid;
24 |
25 | public ToolBoxAdapter(List list, boolean isGrid, ItemClick itemClick) {
26 | this.list = list;
27 | this.itemClick = itemClick;
28 | this.isGrid = isGrid;
29 | }
30 |
31 | @NonNull
32 | @Override
33 | public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
34 | View view;
35 | if (isGrid){
36 | view = LayoutInflater.from(parent.getContext()).inflate(R.layout.grid_item_toolbox, parent, false);
37 | } else {
38 | view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item_toolbox, parent, false);
39 | }
40 | ViewHolder viewHolder = new ViewHolder(view);
41 |
42 | view.setOnClickListener(v -> {
43 | int position1 = viewHolder.getBindingAdapterPosition();
44 | itemClick.onClick(list.get(position1));
45 | });
46 |
47 | return viewHolder;
48 | }
49 |
50 | @Override
51 | public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
52 |
53 | holder.textView.setText(list.get(position).title());
54 | holder.imageView.setImageDrawable(list.get(position).drawable());
55 | }
56 |
57 | @Override
58 | public int getItemCount() {
59 | return list.size();
60 | }
61 |
62 | static class ViewHolder extends RecyclerView.ViewHolder {
63 | final TextView textView;
64 | final ShapeableImageView imageView;
65 |
66 | public ViewHolder(@NonNull View itemView) {
67 | super(itemView);
68 |
69 | textView = itemView.findViewById(R.id.textView);
70 | imageView = itemView.findViewById(R.id.imageView);
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/ToolBoxItem.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox;
2 |
3 | import android.graphics.drawable.Drawable;
4 |
5 | /**
6 | * @author 30415
7 | */
8 | public record ToolBoxItem(int id, String title, Drawable drawable) {
9 | }
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/functions/BaseFunctionActivity.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox.functions;
2 |
3 | import androidx.activity.EdgeToEdge;
4 | import androidx.annotation.NonNull;
5 | import androidx.annotation.Nullable;
6 | import androidx.appcompat.app.AppCompatActivity;
7 | import androidx.core.graphics.Insets;
8 | import androidx.core.view.ViewCompat;
9 | import androidx.core.view.WindowInsetsCompat;
10 | import androidx.preference.PreferenceManager;
11 |
12 | import android.content.SharedPreferences;
13 | import android.graphics.drawable.ColorDrawable;
14 | import android.os.Bundle;
15 | import android.view.MenuItem;
16 | import android.view.View;
17 | import android.view.WindowManager;
18 |
19 | import com.google.android.material.elevation.SurfaceColors;
20 | import com.yangdai.calc.R;
21 |
22 | public abstract class BaseFunctionActivity extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener {
23 |
24 | protected SharedPreferences defaultSp;
25 |
26 | @Override
27 | public boolean onOptionsItemSelected(@NonNull MenuItem item) {
28 | int id = item.getItemId();
29 | if (id == android.R.id.home) {
30 | finish();
31 | return true;
32 | }
33 | return super.onOptionsItemSelected(item);
34 | }
35 |
36 | @Override
37 | protected void onCreate(Bundle savedInstanceState) {
38 | super.onCreate(savedInstanceState);
39 | EdgeToEdge.enable(this);
40 |
41 | setRootView();
42 |
43 | applyWindowInsets(findViewById(R.id.parent));
44 |
45 | if (getSupportActionBar() != null) {
46 | getSupportActionBar().setBackgroundDrawable(new ColorDrawable(SurfaceColors.SURFACE_0.getColor(this)));
47 | getSupportActionBar().setElevation(0f);
48 | getSupportActionBar().setDisplayHomeAsUpEnabled(true);
49 | }
50 |
51 | defaultSp = PreferenceManager.getDefaultSharedPreferences(this);
52 | defaultSp.registerOnSharedPreferenceChangeListener(this);
53 |
54 | if (defaultSp.getBoolean("screen", false)) {
55 | getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
56 | } else {
57 | getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
58 | }
59 |
60 | }
61 |
62 | protected abstract void setRootView();
63 |
64 | protected void applyWindowInsets(View view) {
65 | ViewCompat.setOnApplyWindowInsetsListener(view, (v, insets) -> {
66 | Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
67 | v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
68 | return insets;
69 | });
70 | }
71 |
72 | @Override
73 | public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, @Nullable String key) {
74 |
75 | }
76 |
77 | @Override
78 | protected void onDestroy() {
79 | super.onDestroy();
80 | defaultSp.unregisterOnSharedPreferenceChangeListener(this);
81 | }
82 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/functions/algebra/Item.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox.functions.algebra;
2 |
3 | /**
4 | * @author 30415
5 | */
6 | public record Item(String content) {
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/functions/converter/UnitConverter.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox.functions.converter;
2 |
3 | import android.icu.math.BigDecimal;
4 |
5 | import java.util.Map;
6 |
7 | /**
8 | * @author 30415
9 | */
10 | public class UnitConverter {
11 | /**
12 | * 单位转换
13 | */
14 | public static UnitValue convert(String physicalName, String from, String to, BigDecimal value, int scale) {
15 | Map unitTable = UnitTable.getUnitTable(physicalName);
16 | BigDecimal fromValue = new BigDecimal(String.valueOf(unitTable.get(from)));
17 | BigDecimal toValue = new BigDecimal(String.valueOf(unitTable.get(to)));
18 |
19 | UnitValue unitValue = new UnitValue();
20 |
21 | value = value.multiply(fromValue);
22 | value = value.divide(toValue, scale, BigDecimal.ROUND_HALF_UP);
23 | unitValue.setValue(value);
24 | unitValue.setUnit(to);
25 | return unitValue;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/functions/converter/UnitValue.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox.functions.converter;
2 |
3 | import android.icu.math.BigDecimal;
4 |
5 | import androidx.annotation.NonNull;
6 |
7 | /**
8 | * 带单位的值。
9 | *
10 | * @author 30415
11 | */
12 | public class UnitValue {
13 | private BigDecimal value;
14 | private String unit;
15 |
16 | public UnitValue() {
17 | super();
18 | }
19 |
20 | /**
21 | * @param value 数值
22 | * @param unit 单位
23 | */
24 | public UnitValue(BigDecimal value, String unit) {
25 | super();
26 | this.value = value;
27 | this.unit = unit;
28 | }
29 |
30 | public BigDecimal getValue() {
31 | return value;
32 | }
33 |
34 | public void setValue(BigDecimal value) {
35 | this.value = value;
36 | }
37 |
38 | /** @noinspection unused*/
39 | public String getUnit() {
40 | return unit;
41 | }
42 |
43 | public void setUnit(String unit) {
44 | this.unit = unit;
45 | }
46 |
47 | @Override
48 | public int hashCode() {
49 | final int prime = 31;
50 | int result = 1;
51 | result = prime * result + ((unit == null) ? 0 : unit.hashCode());
52 | long temp;
53 | temp = value.longValue();
54 | result = prime * result + Long.hashCode(temp);
55 | return result;
56 | }
57 |
58 | @Override
59 | public boolean equals(Object obj) {
60 | if (this == obj) {
61 | return true;
62 | }
63 | if (obj == null) {
64 | return false;
65 | }
66 | if (getClass() != obj.getClass()) {
67 | return false;
68 | }
69 | UnitValue other = (UnitValue) obj;
70 | if (unit == null) {
71 | if (other.unit != null) {
72 | return false;
73 | }
74 | } else if (!unit.equals(other.unit)) {
75 | return false;
76 | }
77 | return value.longValue() == (other.value).longValue();
78 | }
79 |
80 | @NonNull
81 | @Override
82 | public String toString() {
83 | return value + unit;
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/functions/currency/Currency.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox.functions.currency;
2 |
3 | /**
4 | * @author 30415
5 | */
6 | public record Currency(int id, String symbol, String chineseName, String englishName) {
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/functions/currency/CurrencyAdapter.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox.functions.currency;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.content.Context;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.ArrayAdapter;
9 | import android.widget.TextView;
10 |
11 | import androidx.annotation.NonNull;
12 |
13 | import com.google.android.material.imageview.ShapeableImageView;
14 | import com.yangdai.calc.R;
15 |
16 | import java.util.List;
17 |
18 | /**
19 | * @author 30415
20 | */
21 | public class CurrencyAdapter extends ArrayAdapter {
22 | private final boolean showEnglishName;
23 |
24 | public CurrencyAdapter(Context context, List currencies, boolean showEnglishName) {
25 | super(context, 0, currencies);
26 | this.showEnglishName = showEnglishName;
27 | }
28 |
29 | @NonNull
30 | @SuppressLint("SetTextI18n")
31 | @Override
32 | public View getView(int position, View convertView, @NonNull ViewGroup parent) {
33 | if (convertView == null) {
34 | convertView = LayoutInflater.from(getContext()).inflate(R.layout.currency_layout, parent, false);
35 | }
36 |
37 | Currency currency = getItem(position);
38 | if (currency != null) {
39 | ShapeableImageView shapeableImageView = convertView.findViewById(R.id.flag);
40 | shapeableImageView.setImageResource(currency.id());
41 | TextView textView = convertView.findViewById(R.id.symbol);
42 | textView.setText(currency.symbol());
43 | TextView textView1 = convertView.findViewById(R.id.name);
44 | if (!showEnglishName) {
45 | textView1.setText(currency.chineseName());
46 | } else {
47 | textView1.setText(currency.englishName());
48 | }
49 | }
50 |
51 | return convertView;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/functions/equation/EquationActivity.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox.functions.equation;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.fragment.app.Fragment;
5 | import androidx.viewpager2.adapter.FragmentStateAdapter;
6 | import androidx.viewpager2.widget.ViewPager2;
7 |
8 | import android.os.Bundle;
9 |
10 | import com.google.android.material.tabs.TabLayout;
11 | import com.google.android.material.tabs.TabLayoutMediator;
12 | import com.yangdai.calc.R;
13 | import com.yangdai.calc.main.toolbox.functions.BaseFunctionActivity;
14 |
15 |
16 | /**
17 | * @author 30415
18 | */
19 | public class EquationActivity extends BaseFunctionActivity {
20 |
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 |
25 | initView();
26 | }
27 |
28 | @Override
29 | protected void setRootView() {
30 | setContentView(R.layout.activity_equation);
31 | }
32 |
33 | private void initView() {
34 | ViewPager2 mViewPager = findViewById(R.id.view_pager_main);
35 | TabLayout mTabLayout = findViewById(R.id.tab_view);
36 |
37 | final String[] tabs = new String[]{getString(R.string.linear), getString(R.string.quadratic)};
38 | final int[] icons = new int[]{R.drawable.linear_icon, R.drawable.wave_icon};
39 |
40 | mViewPager.setAdapter(new FragmentStateAdapter(getSupportFragmentManager(), getLifecycle()) {
41 | @NonNull
42 | @Override
43 | public Fragment createFragment(int position) {
44 | if (position == 0) {
45 | return LinearFragment.newInstance();
46 | } else {
47 | return QuadraticFragment.newInstance();
48 | }
49 | }
50 |
51 | @Override
52 | public int getItemCount() {
53 | return tabs.length;
54 | }
55 | });
56 |
57 | new TabLayoutMediator(mTabLayout, mViewPager,
58 | (tab, position) -> {
59 | tab.setText(tabs[position]);
60 | tab.setIcon(icons[position]);
61 | }).attach();
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/functions/finance/FinanceActivity.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox.functions.finance;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.fragment.app.Fragment;
5 | import androidx.viewpager2.adapter.FragmentStateAdapter;
6 | import androidx.viewpager2.widget.ViewPager2;
7 |
8 | import android.os.Bundle;
9 |
10 | import com.google.android.material.tabs.TabLayout;
11 | import com.google.android.material.tabs.TabLayoutMediator;
12 | import com.yangdai.calc.R;
13 | import com.yangdai.calc.main.toolbox.functions.BaseFunctionActivity;
14 |
15 |
16 | /**
17 | * @author 30415
18 | */
19 | public class FinanceActivity extends BaseFunctionActivity {
20 |
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 |
25 | initView();
26 | }
27 |
28 | @Override
29 | protected void setRootView() {
30 | setContentView(R.layout.activity_finance);
31 | }
32 |
33 | private void initView() {
34 | ViewPager2 mViewPager = findViewById(R.id.view_pager_main);
35 | TabLayout mTabLayout = findViewById(R.id.tab_view);
36 |
37 | final String[] tabs = new String[]{getString(R.string.bankFragment), getString(R.string.roiFragment), getString(R.string.loanFragment), getString(R.string.vat)};
38 | final int[] icons = new int[]{R.drawable.bank_icon, R.drawable.invest_icon, R.drawable.loan_icon, R.drawable.tax_icon};
39 |
40 | mViewPager.setAdapter(new FragmentStateAdapter(getSupportFragmentManager(), getLifecycle()) {
41 | @NonNull
42 | @Override
43 | public Fragment createFragment(int position) {
44 | if (position == 0) {
45 | return BankFragment.newInstance();
46 | } else if (position == 1) {
47 | return InvestmentFragment.newInstance();
48 | } else if (position == 2) {
49 | return LoanFragment.newInstance();
50 | } else {
51 | return VatFragment.newInstance();
52 | }
53 | }
54 |
55 | @Override
56 | public int getItemCount() {
57 | return tabs.length;
58 | }
59 | });
60 |
61 | new TabLayoutMediator(mTabLayout, mViewPager,
62 | (tab, position) -> {
63 | tab.setText(tabs[position]);
64 | tab.setIcon(icons[position]);
65 | }).attach();
66 | }
67 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/functions/fraction/FractionActivity.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox.functions.fraction;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.fragment.app.Fragment;
5 | import androidx.viewpager2.adapter.FragmentStateAdapter;
6 | import androidx.viewpager2.widget.ViewPager2;
7 |
8 | import android.os.Bundle;
9 |
10 | import com.google.android.material.tabs.TabLayout;
11 | import com.google.android.material.tabs.TabLayoutMediator;
12 | import com.yangdai.calc.R;
13 | import com.yangdai.calc.main.toolbox.functions.BaseFunctionActivity;
14 |
15 |
16 | /**
17 | * @author 30415
18 | */
19 | public class FractionActivity extends BaseFunctionActivity {
20 |
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 |
25 | initView();
26 | }
27 |
28 | @Override
29 | protected void setRootView() {
30 | setContentView(R.layout.activity_fraction);
31 | }
32 |
33 | private void initView() {
34 | ViewPager2 mViewPager = findViewById(R.id.view_pager_main);
35 | TabLayout mTabLayout = findViewById(R.id.tab_view);
36 |
37 | final String[] tabs = new String[]{getString(R.string.toDecimal), getString(R.string.toFraction), getString(R.string.factorization)};
38 | final int[] icons = new int[]{R.drawable.fraction_icon, R.drawable.decimal_icon, R.drawable.factor_icon};
39 |
40 | mViewPager.setAdapter(new FragmentStateAdapter(getSupportFragmentManager(), getLifecycle()) {
41 | @NonNull
42 | @Override
43 | public Fragment createFragment(int position) {
44 | if (position == 0) {
45 | return ToDecimalFragment.newInstance();
46 | } else if (position == 1) {
47 | return ToFractionFragment.newInstance();
48 | } else {
49 | return FractorizationFragment.newInstance();
50 | }
51 | }
52 |
53 | @Override
54 | public int getItemCount() {
55 | return tabs.length;
56 | }
57 | });
58 |
59 | new TabLayoutMediator(mTabLayout, mViewPager,
60 | (tab, position) -> {
61 | tab.setText(tabs[position]);
62 | tab.setIcon(icons[position]);
63 | }).attach();
64 | }
65 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/functions/random/RandomNumberActivity.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox.functions.random;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.fragment.app.Fragment;
5 | import androidx.viewpager2.adapter.FragmentStateAdapter;
6 | import androidx.viewpager2.widget.ViewPager2;
7 |
8 | import android.os.Bundle;
9 |
10 | import com.google.android.material.tabs.TabLayout;
11 | import com.google.android.material.tabs.TabLayoutMediator;
12 | import com.yangdai.calc.R;
13 | import com.yangdai.calc.main.toolbox.functions.BaseFunctionActivity;
14 |
15 |
16 | /**
17 | * @author 30415
18 | */
19 | public class RandomNumberActivity extends BaseFunctionActivity {
20 |
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 |
25 | initView();
26 | }
27 |
28 | @Override
29 | protected void setRootView() {
30 | setContentView(R.layout.activity_random_number);
31 | }
32 |
33 | private void initView() {
34 | ViewPager2 mViewPager = findViewById(R.id.view_pager_main);
35 | TabLayout mTabLayout = findViewById(R.id.tab_view);
36 |
37 | final String[] tabs = new String[]{getString(R.string.generator), getString(R.string.draw)};
38 | final int[] icons = new int[]{R.drawable.random_dice, R.drawable.random_card};
39 |
40 | mViewPager.setAdapter(new FragmentStateAdapter(getSupportFragmentManager(), getLifecycle()) {
41 | @NonNull
42 | @Override
43 | public Fragment createFragment(int position) {
44 | if (position == 0) {
45 | return GeneratorFragment.newInstance();
46 | } else {
47 | return PickerFragment.newInstance();
48 | }
49 | }
50 |
51 | @Override
52 | public int getItemCount() {
53 | return tabs.length;
54 | }
55 | });
56 |
57 | new TabLayoutMediator(mTabLayout, mViewPager,
58 | (tab, position) -> {
59 | tab.setText(tabs[position]);
60 | tab.setIcon(icons[position]);
61 | }).attach();
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/functions/ruler/RulerActivity.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox.functions.ruler;
2 |
3 | import com.yangdai.calc.R;
4 | import com.yangdai.calc.main.toolbox.functions.BaseFunctionActivity;
5 |
6 | public class RulerActivity extends BaseFunctionActivity {
7 |
8 | @Override
9 | protected void setRootView() {
10 | setContentView(R.layout.activity_ruler);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/functions/shopping/ShoppingActivity.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox.functions.shopping;
2 |
3 | import android.os.Bundle;
4 |
5 | import androidx.annotation.NonNull;
6 | import androidx.fragment.app.Fragment;
7 | import androidx.viewpager2.adapter.FragmentStateAdapter;
8 | import androidx.viewpager2.widget.ViewPager2;
9 |
10 | import com.google.android.material.tabs.TabLayout;
11 | import com.google.android.material.tabs.TabLayoutMediator;
12 | import com.yangdai.calc.R;
13 | import com.yangdai.calc.main.toolbox.functions.BaseFunctionActivity;
14 |
15 |
16 | /**
17 | * @author 30415
18 | */
19 | public class ShoppingActivity extends BaseFunctionActivity {
20 |
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 |
25 | initView();
26 | }
27 |
28 | @Override
29 | protected void setRootView() {
30 | setContentView(R.layout.activity_discount);
31 | }
32 |
33 | private void initView() {
34 | ViewPager2 mViewPager = findViewById(R.id.view_pager_main);
35 | TabLayout mTabLayout = findViewById(R.id.tab_view);
36 |
37 | final String[] tabs = new String[]{getString(R.string.discount_fragment), getString(R.string.unit_price_fragment)};
38 | final int[] icons = new int[]{R.drawable.discount_icon, R.drawable.unit_price_icon};
39 |
40 | mViewPager.setAdapter(new FragmentStateAdapter(getSupportFragmentManager(), getLifecycle()) {
41 | @NonNull
42 | @Override
43 | public Fragment createFragment(int position) {
44 | if (position == 0) {
45 | return DiscountFragment.newInstance();
46 | } else {
47 | return UnitPriceFragment.newInstance();
48 | }
49 | }
50 |
51 | @Override
52 | public int getItemCount() {
53 | return tabs.length;
54 | }
55 | });
56 |
57 | new TabLayoutMediator(mTabLayout, mViewPager,
58 | (tab, position) -> {
59 | tab.setText(tabs[position]);
60 | tab.setIcon(icons[position]);
61 | }).attach();
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/main/toolbox/functions/time/DateRangeActivity.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.main.toolbox.functions.time;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.google.android.material.tabs.TabLayout;
6 | import com.google.android.material.tabs.TabLayoutMediator;
7 | import com.yangdai.calc.R;
8 | import com.yangdai.calc.main.toolbox.functions.BaseFunctionActivity;
9 |
10 | import androidx.annotation.NonNull;
11 | import androidx.fragment.app.Fragment;
12 | import androidx.viewpager2.adapter.FragmentStateAdapter;
13 | import androidx.viewpager2.widget.ViewPager2;
14 |
15 |
16 | /**
17 | * @author 30415
18 | */
19 | public class DateRangeActivity extends BaseFunctionActivity {
20 |
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 |
25 | initView();
26 | }
27 |
28 | @Override
29 | protected void setRootView() {
30 | setContentView(R.layout.activity_date_range);
31 | }
32 |
33 | private void initView() {
34 | ViewPager2 mViewPager = findViewById(R.id.view_pager_main);
35 | TabLayout mTabLayout = findViewById(R.id.tab_view);
36 |
37 | final String[] tabs = new String[]{getString(R.string.text_date_diff), getString(R.string.text_addsub_date)};
38 | final int[] icons = new int[]{R.drawable.calendar_diff, R.drawable.calendar_add};
39 |
40 | mViewPager.setAdapter(new FragmentStateAdapter(getSupportFragmentManager(), getLifecycle()) {
41 | @NonNull
42 | @Override
43 | public Fragment createFragment(int position) {
44 | if (position == 0) {
45 | return DateDifferCalcFragment.newInstance();
46 | } else {
47 | return DateAddSubCalcFragment.newInstance();
48 | }
49 | }
50 |
51 | @Override
52 | public int getItemCount() {
53 | return tabs.length;
54 | }
55 | });
56 |
57 | new TabLayoutMediator(mTabLayout, mViewPager,
58 | (tab, position) -> {
59 | tab.setText(tabs[position]);
60 | tab.setIcon(icons[position]);
61 | }).attach();
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/utils/PaymentUtil.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.utils;
2 |
3 | import android.app.Activity;
4 | import android.content.ActivityNotFoundException;
5 | import android.content.ComponentName;
6 | import android.content.Context;
7 | import android.content.Intent;
8 | import android.net.Uri;
9 | import android.util.Log;
10 |
11 | import java.net.URISyntaxException;
12 |
13 | /**
14 | * @author 30415
15 | */
16 | public class PaymentUtil {
17 | /**
18 | * 旧版支付宝二维码通用 Intent Scheme Url 格式
19 | */
20 | private static final String INTENT_URL_FORMAT = "intent://platformapi/startapp?saId=10000007&" +
21 | "clientVersion=3.7.0.0718&qrcode=https%3A%2F%2Fqr.alipay.com%2F{urlCode}%3F_s" +
22 | "%3Dweb-other&_t=1472443966571#Intent;" +
23 | "scheme=alipayqr;package=com.eg.android.AlipayGphone;end";
24 |
25 | /**
26 | * 打开转账窗口
27 | * 旧版支付宝二维码方法,需要使用 ... 网站生成的二维码
28 | * 这个方法最好,但在 2016 年 8 月发现新用户可能无法使用
29 | *
30 | * @param activity Parent Activity
31 | * @param urlCode 手动解析二维码获得地址中的参数,例如 ... 最后那段
32 | */
33 | public static void startAlipayClient(Activity activity, String urlCode) {
34 | startIntentUrl(activity, INTENT_URL_FORMAT.replace("{urlCode}", urlCode));
35 | }
36 |
37 | /**
38 | * 打开 Intent Scheme Url
39 | *
40 | * @param activity Parent Activity
41 | * @param intentFullUrl Intent 跳转地址
42 | */
43 | public static void startIntentUrl(Activity activity, String intentFullUrl) {
44 | try {
45 | Intent intent = Intent.parseUri(
46 | intentFullUrl,
47 | Intent.URI_INTENT_SCHEME
48 | );
49 | activity.startActivity(intent);
50 | } catch (URISyntaxException | ActivityNotFoundException e) {
51 | Log.e("PaymentUtil", "startIntentUrl: ", e);
52 | }
53 | }
54 |
55 | /**
56 | * 判断支付宝客户端是否已安装,建议调用转账前检查
57 | *
58 | * @param context Context
59 | * @return 支付宝客户端是否已安装
60 | */
61 | public static boolean isInstalledPackage(Context context) {
62 | Uri uri = Uri.parse("alipays://platformapi/startApp");
63 | Intent intent = new Intent(Intent.ACTION_VIEW, uri);
64 | ComponentName componentName = intent.resolveActivity(context.getPackageManager());
65 | return componentName != null;
66 | }
67 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/utils/TTSInitializationListener.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.utils;
2 |
3 | /**
4 | * @author 30415
5 | */
6 | public interface TTSInitializationListener {
7 | void onTTSInitialized(boolean isSuccess);
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/yangdai/calc/utils/TouchAnimation.java:
--------------------------------------------------------------------------------
1 | package com.yangdai.calc.utils;
2 |
3 | import android.animation.ObjectAnimator;
4 | import android.annotation.SuppressLint;
5 | import android.view.HapticFeedbackConstants;
6 | import android.view.MotionEvent;
7 | import android.view.View;
8 | import android.view.animation.AccelerateDecelerateInterpolator;
9 |
10 | /**
11 | * @author 30415
12 | */
13 | public class TouchAnimation implements View.OnTouchListener {
14 | private static final float SCALE_DOWN_FACTOR = 0.75f;
15 | private static final long ANIMATION_DURATION = 100;
16 |
17 | private final View view;
18 | private ObjectAnimator xAnimator;
19 | private ObjectAnimator yAnimator;
20 |
21 | public TouchAnimation(View view) {
22 | this.view = view;
23 | }
24 |
25 | @SuppressLint("ClickableViewAccessibility")
26 | @Override
27 | public boolean onTouch(View v, MotionEvent event) {
28 | try {
29 | switch (event.getAction()) {
30 | case MotionEvent.ACTION_DOWN -> {
31 | v.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_PRESS);
32 | startScaleDownAnimation();
33 | }
34 | case MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
35 | v.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_RELEASE);
36 | startScaleUpAnimation();
37 | }
38 | default -> {
39 | }
40 | }
41 | } catch (Exception ignored) {
42 |
43 | }
44 | return false;
45 | }
46 |
47 | private void startScaleDownAnimation() {
48 | cancelAnimations(); // 取消之前的动画
49 |
50 | xAnimator = ObjectAnimator.ofFloat(view, View.SCALE_X, SCALE_DOWN_FACTOR);
51 | yAnimator = ObjectAnimator.ofFloat(view, View.SCALE_Y, SCALE_DOWN_FACTOR);
52 |
53 | xAnimator.setDuration(ANIMATION_DURATION);
54 | yAnimator.setDuration(ANIMATION_DURATION);
55 |
56 | xAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
57 | yAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
58 |
59 | xAnimator.start();
60 | yAnimator.start();
61 | }
62 |
63 | private void startScaleUpAnimation() {
64 | cancelAnimations(); // 取消之前的动画
65 |
66 | xAnimator = ObjectAnimator.ofFloat(view, View.SCALE_X, 1.0f);
67 | yAnimator = ObjectAnimator.ofFloat(view, View.SCALE_Y, 1.0f);
68 |
69 | xAnimator.setDuration(ANIMATION_DURATION);
70 | yAnimator.setDuration(ANIMATION_DURATION);
71 |
72 | xAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
73 | yAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
74 |
75 | xAnimator.start();
76 | yAnimator.start();
77 | }
78 |
79 | private void cancelAnimations() {
80 | if (xAnimator != null && xAnimator.isRunning()) {
81 | xAnimator.cancel();
82 | }
83 | if (yAnimator != null && yAnimator.isRunning()) {
84 | yAnimator.cancel();
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/app/src/main/res/color/chip_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/australia.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/australia.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/brazil.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/brazil.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/bulgaria.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/bulgaria.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/canada.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/canada.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/china.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/china.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/czechia.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/czechia.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/denmark.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/denmark.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/eu.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/eu.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/hongkongchina.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/hongkongchina.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/hungary.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/hungary.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/iceland.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/iceland.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/img.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/img.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/india.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/india.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/indonesia.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/indonesia.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/israel.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/israel.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/japan.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/japan.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/malaysia.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/malaysia.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/mexico.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/mexico.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/new_zealand.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/new_zealand.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/norway.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/norway.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/philippines.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/philippines.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/poland.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/poland.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/romania.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/romania.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/singapore.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/singapore.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/south_africa.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/south_africa.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/south_korea.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/south_korea.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/sweden.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/sweden.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/switzerland.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/switzerland.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/thailand.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/thailand.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/turkey.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/turkey.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/uk.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/uk.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/us.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/drawable-nodpi/us.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable/add_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/angle_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/apps.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/area_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/arrow_drop_down.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bank_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_drag_handle_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/baseline_menu_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/binary_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bmi_icon.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/calculate_icon.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/calendar_add.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/calendar_diff.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/chinese_number_icon.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/circle_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/combined_drawable_add.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/combined_drawable_down.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/combined_drawable_swap_vert.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/compass_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/compass_icon_shortcuts.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/contrast.xml:
--------------------------------------------------------------------------------
1 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/currency_exchange_icon.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/currency_exchange_icon_shortcuts.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/currency_exchange_icon_shortcuts_colored.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/data_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/date_range_icon.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/date_range_icon_shortcuts.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/decimal_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/delete_outline.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/discount_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
17 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/divider_horizontal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/donate.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/drag_indicator.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/email.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/factor_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/finance_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/finance_icon_shortcuts.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/float_close.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/format_size.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/fraction.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/fraction_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/fullscreen.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/fullscreen_exit.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/functions_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/github.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/grid_on.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/grid_view_more.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/heat_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/history.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_mono.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
17 |
18 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/info.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/info_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/invest_icon.xml:
--------------------------------------------------------------------------------
1 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/keyboard_arrow_down.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/language.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/length_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/linear_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/loan_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/mass_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/material_switch.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/mode_edit_outline.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/osl.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/phone_android.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/popmenu_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/power_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pressure_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/privacy.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/random_card.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/random_dice.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/random_number_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rate.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/relation_icon.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rounded_corner.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rounded_corner_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ruler_icon.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ruler_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | -
6 |
7 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ruler_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | -
6 |
7 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/scale_123.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/settings_chip_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/share.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shopping_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shopping_icon_shortcuts.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/speech_text.xml:
--------------------------------------------------------------------------------
1 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/speed_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/splitscreen.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/statistics_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/statistics_icon_shortcuts.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/swap_vert.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/table_rows.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/tax_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
20 |
27 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/tempe_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/theme_color.xml:
--------------------------------------------------------------------------------
1 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/time_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/tips_off.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/tips_on.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/unit_icon.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/unit_icon_shortcuts.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/unit_icon_shortcuts_colored.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/unit_price_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/update.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/vibration.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/volume_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/wave_icon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_date_range.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_discount.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_equation.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_finance.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_fraction.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
23 |
24 |
31 |
32 |
33 |
34 |
35 |
44 |
45 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_random_number.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_ruler.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
21 |
22 |
25 |
26 |
27 |
28 |
38 |
39 |
42 |
43 |
44 |
45 |
57 |
58 |
59 |
71 |
72 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/algebra_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
25 |
26 |
33 |
34 |
43 |
44 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/currency_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
26 |
27 |
36 |
37 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_history_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
22 |
23 |
32 |
33 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_toolbox.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/grid_item_toolbox.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
24 |
25 |
33 |
34 |
43 |
44 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
18 |
19 |
31 |
32 |
33 |
40 |
41 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/list_item_toolbox.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
18 |
19 |
26 |
27 |
38 |
39 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/currency_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/delete_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/resources.properties:
--------------------------------------------------------------------------------
1 | unqualifiedResLocale=en-US
--------------------------------------------------------------------------------
/app/src/main/res/values-night/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #CC101010
4 | #2B2B2B
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #CCFFFFFF
4 | #FEFEFE
5 | #FF4081
6 | #FF5722
7 | #FF9800
8 | #4CAF50
9 | #E91E63
10 | #9C27B0
11 | #673AB7
12 | #3F51B5
13 |
14 | #FFD600
15 | #F4511E
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @color/background
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
17 |
18 |
22 |
23 |
26 |
27 |
34 |
35 |
38 |
39 |
43 |
44 |
48 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/appwidget_provider.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/appwidget_provider_calc1.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/appwidget_provider_calc2.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/shortcuts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
24 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | dependencies {
4 | classpath 'com.google.android.gms:oss-licenses-plugin:0.10.6'
5 | // Make sure that you have the Google services Gradle plugin dependency
6 | classpath 'com.google.gms:google-services:4.4.2'
7 |
8 | // Add the dependency for the Crashlytics Gradle plugin
9 | classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.2'
10 | }
11 | }
12 | plugins {
13 | id 'com.android.application' version '8.8.0' apply false
14 | id 'com.android.library' version '8.8.0' apply false
15 | id 'com.google.gms.google-services' version '4.4.2' apply false
16 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Enables namespacing of each library's R class so that its R class includes only the
19 | # resources declared in the library itself and none from the library's dependencies,
20 | # thereby reducing the size of the R class for that library
21 | android.nonTransitiveRClass=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/YangDai2003/Multi-Calculator-Android/3b4c0c24e756cd5103c3d0f95c518e75de7692b2/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Jan 20 16:40:50 CET 2025
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
5 | networkTimeout=10000
6 | validateDistributionUrl=true
7 | zipStoreBase=GRADLE_USER_HOME
8 | zipStorePath=wrapper/dists
9 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 | @rem SPDX-License-Identifier: Apache-2.0
17 | @rem
18 |
19 | @if "%DEBUG%"=="" @echo off
20 | @rem ##########################################################################
21 | @rem
22 | @rem Gradle startup script for Windows
23 | @rem
24 | @rem ##########################################################################
25 |
26 | @rem Set local scope for the variables with windows NT shell
27 | if "%OS%"=="Windows_NT" setlocal
28 |
29 | set DIRNAME=%~dp0
30 | if "%DIRNAME%"=="" set DIRNAME=.
31 | @rem This is normally unused
32 | set APP_BASE_NAME=%~n0
33 | set APP_HOME=%DIRNAME%
34 |
35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
37 |
38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
40 |
41 | @rem Find java.exe
42 | if defined JAVA_HOME goto findJavaFromJavaHome
43 |
44 | set JAVA_EXE=java.exe
45 | %JAVA_EXE% -version >NUL 2>&1
46 | if %ERRORLEVEL% equ 0 goto execute
47 |
48 | echo. 1>&2
49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50 | echo. 1>&2
51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52 | echo location of your Java installation. 1>&2
53 |
54 | goto fail
55 |
56 | :findJavaFromJavaHome
57 | set JAVA_HOME=%JAVA_HOME:"=%
58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
59 |
60 | if exist "%JAVA_EXE%" goto execute
61 |
62 | echo. 1>&2
63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64 | echo. 1>&2
65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66 | echo location of your Java installation. 1>&2
67 |
68 | goto fail
69 |
70 | :execute
71 | @rem Setup the command line
72 |
73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
74 |
75 |
76 | @rem Execute Gradle
77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
78 |
79 | :end
80 | @rem End local scope for the variables with windows NT shell
81 | if %ERRORLEVEL% equ 0 goto mainEnd
82 |
83 | :fail
84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
85 | rem the _cmd.exe /c_ return code!
86 | set EXIT_CODE=%ERRORLEVEL%
87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1
88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
89 | exit /b %EXIT_CODE%
90 |
91 | :mainEnd
92 | if "%OS%"=="Windows_NT" endlocal
93 |
94 | :omega
95 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | gradlePluginPortal()
6 | maven { url "https://www.jitpack.io" }
7 | }
8 | }
9 | dependencyResolutionManagement {
10 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
11 | repositories {
12 | google()
13 | mavenCentral()
14 | maven { url "https://www.jitpack.io" }
15 | }
16 | }
17 | rootProject.name = "Calc"
18 | include ':app'
19 |
--------------------------------------------------------------------------------