├── .gitignore
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── reedoverflow
│ │ └── saiminapp
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── ic_launcher-playstore.png
│ ├── java
│ │ └── com
│ │ │ └── reedoverflow
│ │ │ └── saiminapp
│ │ │ ├── MainActivity.java
│ │ │ ├── MyApplication.java
│ │ │ ├── ui
│ │ │ ├── home
│ │ │ │ ├── HomeFragment.java
│ │ │ │ ├── HomeViewModel.java
│ │ │ │ ├── basicmode
│ │ │ │ │ ├── BaiscFragment.java
│ │ │ │ │ └── BaiscViewModel.java
│ │ │ │ └── extendmode
│ │ │ │ │ └── ExtendFragment.java
│ │ │ └── settings
│ │ │ │ └── SettingFragment.java
│ │ │ └── utils
│ │ │ └── RippleBackground.java
│ └── res
│ │ ├── drawable
│ │ ├── ic_launcher_foreground.xml
│ │ ├── ic_menu_home.xml
│ │ ├── ic_menu_settings.xml
│ │ ├── ic_menu_switch.xml
│ │ └── side_nav_bar.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ ├── app_bar_main.xml
│ │ ├── content_main.xml
│ │ ├── fragment_baisc.xml
│ │ ├── fragment_extend.xml
│ │ ├── fragment_home.xml
│ │ ├── fragment_setting.xml
│ │ └── nav_header_main.xml
│ │ ├── menu
│ │ ├── activity_main_drawer.xml
│ │ └── main.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── navigation
│ │ └── mobile_navigation.xml
│ │ ├── raw
│ │ └── notices.xml
│ │ ├── values-en
│ │ ├── array.xml
│ │ └── strings.xml
│ │ ├── values
│ │ ├── array.xml
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── dimensions.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ └── settings.xml
│ └── test
│ └── java
│ └── com
│ └── reedoverflow
│ └── saiminapp
│ └── ExampleUnitTest.java
├── art
└── Screenshot_1.png
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.aar
4 | *.ap_
5 | *.aab
6 |
7 | # Files for the ART/Dalvik VM
8 | *.dex
9 |
10 | # Java class files
11 | *.class
12 |
13 | # Generated files
14 | bin/
15 | gen/
16 | out/
17 | # Uncomment the following line in case you need and you don't have the release build type files in your app
18 | # release/
19 |
20 | # Gradle files
21 | .gradle/
22 | build/
23 |
24 | # Local configuration file (sdk path, etc)
25 | local.properties
26 |
27 | # Proguard folder generated by Eclipse
28 | proguard/
29 |
30 | # Log Files
31 | *.log
32 |
33 | # Android Studio Navigation editor temp files
34 | .navigation/
35 |
36 | # Android Studio captures folder
37 | captures/
38 |
39 | # IntelliJ
40 | *.iml
41 | .idea/workspace.xml
42 | .idea/tasks.xml
43 | .idea/gradle.xml
44 | .idea/assetWizardSettings.xml
45 | .idea/dictionaries
46 | .idea/libraries
47 | # Android Studio 3 in .gitignore file.
48 | .idea/caches
49 | .idea/modules.xml
50 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you
51 | .idea/navEditor.xml
52 |
53 | # Keystore files
54 | # Uncomment the following lines if you do not want to check your keystore files in.
55 | #*.jks
56 | #*.keystore
57 |
58 | # External native build folder generated in Android Studio 2.2 and later
59 | .externalNativeBuild
60 | .cxx/
61 |
62 | # Google Services (e.g. APIs or Firebase)
63 | # google-services.json
64 |
65 | # Freeline
66 | freeline.py
67 | freeline/
68 | freeline_project_description.json
69 |
70 | # fastlane
71 | fastlane/report.xml
72 | fastlane/Preview.html
73 | fastlane/screenshots
74 | fastlane/test_output
75 | fastlane/readme.md
76 |
77 | # Version control
78 | vcs.xml
79 |
80 | # lint
81 | lint/intermediates/
82 | lint/generated/
83 | lint/outputs/
84 | lint/tmp/
85 | # lint/reports/
86 | /.idea/
87 | /app/release/output.json
88 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 reed-overflow
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Saimin-APP
2 | 一个你在寻找的冻鳗风格催眠App。
3 |
4 | A hentai style saimin app you are looking for.
5 |
6 | ## 应用截图 Screenshot
7 | 
8 |
9 | ## TODO
10 | - [x] Mode switch
11 | - [x] Home page animation
12 | - [x] Sensitive mode
13 | - [x] Bubbleseekbar
14 | - [x] Background visual effects improve
15 | - [ ] Custom mode
16 | - [ ] Check update
17 | - [ ] App intro
18 | - [ ] Shortcut
19 | - [ ] Notification
20 | - [ ] More mode
21 |
22 | ## Thanks
23 | - [LicensesDialog](https://github.com/PSDev/LicensesDialog)
24 | - [android-ripple-background](https://github.com/skyfishjy/android-ripple-background)
25 | - [SwitchButton](https://github.com/kyleduo/SwitchButton)
26 | - [BubbleSeekBar](https://github.com/woxingxiao/BubbleSeekBar)
27 | - [RippleAnimation](https://github.com/Ifxcyr/RippleAnimation)
28 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 29
5 | buildToolsVersion "29.0.3"
6 |
7 | defaultConfig {
8 | applicationId "com.reedoverflow.saiminapp"
9 | minSdkVersion 23
10 | targetSdkVersion 29
11 | versionCode 2
12 | versionName "0.1.1b"
13 |
14 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15 | }
16 |
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 |
24 | compileOptions {
25 | sourceCompatibility JavaVersion.VERSION_1_8
26 | targetCompatibility JavaVersion.VERSION_1_8
27 | }
28 |
29 | }
30 |
31 | dependencies {
32 | implementation fileTree(dir: "libs", include: ["*.jar"])
33 | implementation 'androidx.appcompat:appcompat:1.1.0'
34 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
35 | implementation 'com.google.android.material:material:1.0.0'
36 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
37 | implementation 'androidx.navigation:navigation-fragment:2.1.0'
38 | implementation 'androidx.navigation:navigation-ui:2.1.0'
39 | implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
40 | implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
41 | testImplementation 'junit:junit:4.12'
42 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
43 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
44 |
45 | implementation 'androidx.preference:preference:1.1.1'
46 |
47 | // LicensesDialog
48 | implementation 'de.psdev.licensesdialog:licensesdialog:2.1.0'
49 |
50 | implementation 'com.kyleduo.switchbutton:library:2.0.0'
51 |
52 | implementation 'com.xw.repo:bubbleseekbar:3.20-lite'
53 |
54 | implementation 'com.wuyr:rippleanimation:1.0.0'
55 |
56 | }
--------------------------------------------------------------------------------
/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/androidTest/java/com/reedoverflow/saiminapp/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.reedoverflow.saiminapp;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 | assertEquals("com.reedoverflow.saiminapp", appContext.getPackageName());
25 | }
26 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
13 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reed-overflow/Saimin-APP/68c5eec0c4274f99dcad5bc03627e51acd8bbabc/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/java/com/reedoverflow/saiminapp/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.reedoverflow.saiminapp;
2 |
3 | import android.os.Bundle;
4 | import android.view.Menu;
5 |
6 | import androidx.annotation.NonNull;
7 | import androidx.appcompat.app.AppCompatActivity;
8 | import androidx.appcompat.app.AppCompatDelegate;
9 | import androidx.appcompat.widget.Toolbar;
10 | import androidx.drawerlayout.widget.DrawerLayout;
11 | import androidx.navigation.NavController;
12 | import androidx.navigation.Navigation;
13 | import androidx.navigation.ui.AppBarConfiguration;
14 | import androidx.navigation.ui.NavigationUI;
15 |
16 | import com.google.android.material.navigation.NavigationView;
17 |
18 | public class MainActivity extends AppCompatActivity {
19 |
20 | private AppBarConfiguration mAppBarConfiguration;
21 |
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.activity_main);
26 | Toolbar toolbar = findViewById(R.id.toolbar);
27 | setSupportActionBar(toolbar);
28 |
29 | DrawerLayout drawer = findViewById(R.id.drawer_layout);
30 | NavigationView navigationView = findViewById(R.id.nav_view);
31 | // Passing each menu ID as a set of Ids because each
32 | // menu should be considered as top level destinations.
33 | mAppBarConfiguration = new AppBarConfiguration.Builder(
34 | R.id.nav_home, R.id.nav_settings)
35 | .setDrawerLayout(drawer)
36 | .build();
37 | NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
38 | NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
39 | NavigationUI.setupWithNavController(navigationView, navController);
40 | }
41 |
42 | @Override
43 | public boolean onCreateOptionsMenu(Menu menu) {
44 | // Inflate the menu; this adds items to the action bar if it is present.
45 | // getMenuInflater().inflate(R.menu.main, menu);
46 | return true;
47 | }
48 |
49 | @Override
50 | public boolean onSupportNavigateUp() {
51 | NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
52 | return NavigationUI.navigateUp(navController, mAppBarConfiguration)
53 | || super.onSupportNavigateUp();
54 | }
55 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/reedoverflow/saiminapp/MyApplication.java:
--------------------------------------------------------------------------------
1 | package com.reedoverflow.saiminapp;
2 |
3 | import android.app.Application;
4 |
5 | public class MyApplication extends Application {
6 |
7 | @Override
8 | public void onCreate() {
9 | super.onCreate();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/main/java/com/reedoverflow/saiminapp/ui/home/HomeFragment.java:
--------------------------------------------------------------------------------
1 | package com.reedoverflow.saiminapp.ui.home;
2 |
3 | import android.content.SharedPreferences;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 |
9 | import androidx.annotation.NonNull;
10 | import androidx.fragment.app.Fragment;
11 | import androidx.lifecycle.ViewModelProviders;
12 | import androidx.preference.PreferenceManager;
13 |
14 | import com.reedoverflow.saiminapp.R;
15 | import com.reedoverflow.saiminapp.ui.home.basicmode.BaiscFragment;
16 | import com.reedoverflow.saiminapp.ui.home.extendmode.ExtendFragment;
17 |
18 | import java.util.Objects;
19 |
20 | public class HomeFragment extends Fragment {
21 |
22 | private HomeViewModel homeViewModel;
23 |
24 | @Override
25 | public View onCreateView(@NonNull LayoutInflater inflater,
26 | ViewGroup container, Bundle savedInstanceState) {
27 | homeViewModel =
28 | ViewModelProviders.of(this).get(HomeViewModel.class);
29 | View root = inflater.inflate(R.layout.fragment_home, container, false);
30 |
31 | checkMode();
32 | return root;
33 | }
34 |
35 | private void checkMode() {
36 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(requireActivity());
37 | int option = Integer.parseInt(Objects.requireNonNull(preferences.getString("switch", "0")));
38 |
39 | switch (option) {
40 | case 0: {
41 | toFragment(BaiscFragment.newInstance());
42 | break;
43 | }
44 | case 1: {
45 | toFragment(ExtendFragment.newInstance());
46 | break;
47 | }
48 | }
49 | }
50 |
51 | private void toFragment(Fragment fragment) {
52 | requireActivity().getSupportFragmentManager().beginTransaction().add(R.id.fragment_cont, fragment).commit();
53 | }
54 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/reedoverflow/saiminapp/ui/home/HomeViewModel.java:
--------------------------------------------------------------------------------
1 | package com.reedoverflow.saiminapp.ui.home;
2 |
3 | import androidx.lifecycle.ViewModel;
4 |
5 | public class HomeViewModel extends ViewModel {
6 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/reedoverflow/saiminapp/ui/home/basicmode/BaiscFragment.java:
--------------------------------------------------------------------------------
1 | package com.reedoverflow.saiminapp.ui.home.basicmode;
2 |
3 | import android.os.Bundle;
4 | import android.os.Handler;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.CompoundButton;
9 | import android.widget.TextView;
10 |
11 | import androidx.annotation.NonNull;
12 | import androidx.annotation.Nullable;
13 | import androidx.cardview.widget.CardView;
14 | import androidx.fragment.app.Fragment;
15 | import androidx.lifecycle.Observer;
16 | import androidx.lifecycle.ViewModelProviders;
17 |
18 | import com.kyleduo.switchbutton.SwitchButton;
19 | import com.reedoverflow.saiminapp.R;
20 | import com.reedoverflow.saiminapp.utils.RippleBackground;
21 | import com.wuyr.rippleanimation.RippleAnimation;
22 |
23 | public class BaiscFragment extends Fragment {
24 |
25 | private BaiscViewModel baiscViewModel;
26 | private SwitchButton homeSwitch;
27 | private RippleBackground rippleBackground;
28 | private CardView cardView;
29 |
30 | public static BaiscFragment newInstance() {
31 | return new BaiscFragment();
32 | }
33 |
34 | @Override
35 | public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
36 | @Nullable Bundle savedInstanceState) {
37 | baiscViewModel = ViewModelProviders.of(this).get(BaiscViewModel.class);
38 | View root = inflater.inflate(R.layout.fragment_baisc, container, false);
39 |
40 | final TextView homeText = root.findViewById(R.id.home_text);
41 | rippleBackground = root.findViewById(R.id.ripple_bg);
42 | homeSwitch = root.findViewById(R.id.home_switch);
43 |
44 | baiscViewModel.getHomeText().observe(getViewLifecycleOwner(), new Observer() {
45 | @Override
46 | public void onChanged(String s) {
47 | homeText.setText(s);
48 | }
49 | });
50 | baiscViewModel.getHomeText().postValue(getString(R.string.basic_saimin_stop));
51 |
52 | cardView = root.findViewById(R.id.basic_card_view);
53 |
54 | homeSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
55 | @Override
56 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
57 |
58 | if (isChecked) {
59 | saiminStart();
60 | } else {
61 | RippleAnimation.create(homeSwitch).setDuration(1000).start();
62 | saiminStop();
63 | cardView.setCardBackgroundColor(getResources().getColor(R.color.card_bg));
64 | }
65 | }
66 | });
67 |
68 | return root;
69 | }
70 |
71 | @Override
72 | public void onActivityCreated(@Nullable Bundle savedInstanceState) {
73 | super.onActivityCreated(savedInstanceState);
74 | baiscViewModel = ViewModelProviders.of(this).get(BaiscViewModel.class);
75 | }
76 |
77 | //临时模拟
78 | private void saiminStart() {
79 | baiscViewModel.getHomeText().postValue(getString(R.string.basic_saimin_starting));
80 | homeSwitch.setEnabled(false);
81 |
82 | new Handler().postDelayed(new Runnable() {
83 | @Override
84 | public void run() {
85 | RippleAnimation.create(homeSwitch).setDuration(3000).start();
86 | cardView.setCardBackgroundColor(getResources().getColor(R.color.card_bg_alter));
87 |
88 | baiscViewModel.getHomeText().postValue(getString(R.string.basic_saimin_start));
89 | homeSwitch.setEnabled(true);
90 |
91 | rippleBackground.startRippleAnimation();
92 | }
93 | }, 2000);
94 | }
95 |
96 | //临时模拟
97 | private void saiminStop() {
98 | baiscViewModel.getHomeText().postValue(getString(R.string.basic_saimin_shutdown));
99 | homeSwitch.setEnabled(false);
100 | rippleBackground.stopRippleAnimation();
101 |
102 | new Handler().postDelayed(new Runnable() {
103 | @Override
104 | public void run() {
105 | baiscViewModel.getHomeText().postValue(getString(R.string.basic_saimin_stop));
106 | homeSwitch.setEnabled(true);
107 | }
108 | }, 1000);
109 | }
110 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/reedoverflow/saiminapp/ui/home/basicmode/BaiscViewModel.java:
--------------------------------------------------------------------------------
1 | package com.reedoverflow.saiminapp.ui.home.basicmode;
2 |
3 | import androidx.lifecycle.MutableLiveData;
4 | import androidx.lifecycle.ViewModel;
5 |
6 | public class BaiscViewModel extends ViewModel {
7 | private MutableLiveData homeText;
8 |
9 | public BaiscViewModel() {
10 | homeText = new MutableLiveData<>();
11 | }
12 |
13 | public MutableLiveData getHomeText() {
14 | return homeText;
15 | }
16 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/reedoverflow/saiminapp/ui/home/extendmode/ExtendFragment.java:
--------------------------------------------------------------------------------
1 | package com.reedoverflow.saiminapp.ui.home.extendmode;
2 |
3 | import android.os.Bundle;
4 |
5 | import androidx.annotation.Nullable;
6 | import androidx.cardview.widget.CardView;
7 | import androidx.lifecycle.Observer;
8 | import androidx.lifecycle.ViewModelProviders;
9 |
10 | import android.os.Handler;
11 | import android.view.LayoutInflater;
12 | import android.view.View;
13 | import android.view.ViewGroup;
14 | import android.widget.CompoundButton;
15 | import android.widget.TextView;
16 |
17 | import com.kyleduo.switchbutton.SwitchButton;
18 | import com.reedoverflow.saiminapp.R;
19 | import com.reedoverflow.saiminapp.ui.home.basicmode.BaiscFragment;
20 | import com.reedoverflow.saiminapp.ui.home.basicmode.BaiscViewModel;
21 | import com.reedoverflow.saiminapp.utils.RippleBackground;
22 | import com.wuyr.rippleanimation.RippleAnimation;
23 |
24 | public class ExtendFragment extends BaiscFragment {
25 |
26 | private BaiscViewModel baiscViewModel;
27 | private SwitchButton homeSwitch;
28 | private RippleBackground rippleBackground;
29 | private CardView cardView;
30 |
31 | public static ExtendFragment newInstance() {
32 | ExtendFragment fragment = new ExtendFragment();
33 | return fragment;
34 | }
35 |
36 | @Override
37 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
38 | Bundle savedInstanceState) {
39 | baiscViewModel = ViewModelProviders.of(this).get(BaiscViewModel.class);
40 | View root = inflater.inflate(R.layout.fragment_extend, container, false);
41 |
42 | final TextView homeText = root.findViewById(R.id.home_text);
43 | rippleBackground = root.findViewById(R.id.ripple_bg);
44 | homeSwitch = root.findViewById(R.id.home_switch);
45 |
46 | baiscViewModel.getHomeText().observe(getViewLifecycleOwner(), new Observer() {
47 | @Override
48 | public void onChanged(String s) {
49 | homeText.setText(s);
50 | }
51 | });
52 | baiscViewModel.getHomeText().postValue(getString(R.string.basic_saimin_stop));
53 |
54 | cardView = root.findViewById(R.id.sensitive_card_view);
55 |
56 |
57 | homeSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
58 | @Override
59 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
60 | if (isChecked) {
61 | saiminStart();
62 | } else {
63 | RippleAnimation.create(homeSwitch).setDuration(1000).start();
64 | saiminStop();
65 | cardView.setCardBackgroundColor(getResources().getColor(R.color.card_bg));
66 | }
67 | }
68 | });
69 |
70 | return root;
71 | }
72 |
73 | @Override
74 | public void onActivityCreated(@Nullable Bundle savedInstanceState) {
75 | super.onActivityCreated(savedInstanceState);
76 | baiscViewModel = ViewModelProviders.of(this).get(BaiscViewModel.class);
77 | }
78 |
79 | //临时模拟
80 | private void saiminStart() {
81 | baiscViewModel.getHomeText().postValue(getString(R.string.basic_saimin_starting));
82 | homeSwitch.setEnabled(false);
83 |
84 | new Handler().postDelayed(new Runnable() {
85 | @Override
86 | public void run() {
87 | RippleAnimation.create(homeSwitch).setDuration(3000).start();
88 | cardView.setCardBackgroundColor(getResources().getColor(R.color.card_bg_alter));
89 |
90 | baiscViewModel.getHomeText().postValue(getString(R.string.basic_saimin_start));
91 | homeSwitch.setEnabled(true);
92 |
93 | rippleBackground.startRippleAnimation();
94 | }
95 | }, 2000);
96 | }
97 |
98 | //临时模拟
99 | private void saiminStop() {
100 | baiscViewModel.getHomeText().postValue(getString(R.string.basic_saimin_shutdown));
101 | homeSwitch.setEnabled(false);
102 | rippleBackground.stopRippleAnimation();
103 |
104 | new Handler().postDelayed(new Runnable() {
105 | @Override
106 | public void run() {
107 | baiscViewModel.getHomeText().postValue(getString(R.string.basic_saimin_stop));
108 | homeSwitch.setEnabled(true);
109 | }
110 | }, 1000);
111 | }
112 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/reedoverflow/saiminapp/ui/settings/SettingFragment.java:
--------------------------------------------------------------------------------
1 | package com.reedoverflow.saiminapp.ui.settings;
2 |
3 | import android.content.Intent;
4 | import android.net.Uri;
5 | import android.os.Bundle;
6 |
7 | import androidx.preference.Preference;
8 | import androidx.preference.PreferenceFragmentCompat;
9 |
10 | import com.reedoverflow.saiminapp.R;
11 |
12 | import de.psdev.licensesdialog.LicensesDialog;
13 |
14 | public class SettingFragment extends PreferenceFragmentCompat {
15 |
16 | @Override
17 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
18 | setPreferencesFromResource(R.xml.settings, rootKey);
19 | }
20 |
21 | @Override
22 | public boolean onPreferenceTreeClick(Preference preference) {
23 | switch (preference.getKey()) {
24 | case "about_author":
25 | openLink(getString(R.string.settings_author_detail));
26 | break;
27 | case "about_repo":
28 | openLink(getString(R.string.settings_repo_detail));
29 | break;
30 | case "license":
31 | new LicensesDialog.Builder(getActivity()).setNotices(R.raw.notices).build().show();
32 | break;
33 | case "version":
34 | openLink("https://github.com/reed-overflow/Saimin-APP/releases");
35 | break;
36 | default:
37 | break;
38 | }
39 | return super.onPreferenceTreeClick(preference);
40 | }
41 |
42 | private void openLink(String link) {
43 | Uri uri = Uri.parse(link);
44 | Intent intent = new Intent(Intent.ACTION_VIEW, uri);
45 | startActivity(intent);
46 | }
47 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/reedoverflow/saiminapp/utils/RippleBackground.java:
--------------------------------------------------------------------------------
1 | package com.reedoverflow.saiminapp.utils;
2 |
3 | import android.animation.Animator;
4 | import android.animation.AnimatorSet;
5 | import android.animation.ObjectAnimator;
6 | import android.content.Context;
7 | import android.content.res.TypedArray;
8 | import android.graphics.Canvas;
9 | import android.graphics.Paint;
10 | import android.util.AttributeSet;
11 | import android.view.View;
12 | import android.view.animation.AccelerateDecelerateInterpolator;
13 | import android.widget.RelativeLayout;
14 |
15 | import com.reedoverflow.saiminapp.R;
16 |
17 | import java.util.ArrayList;
18 |
19 | /**
20 | * Created by fyu on 11/3/14.
21 | *
22 | * Edited by reed-overflow on 6/4/20
23 | */
24 |
25 | public class RippleBackground extends RelativeLayout{
26 |
27 | private static final int DEFAULT_RIPPLE_COUNT=6;
28 | private static final int DEFAULT_DURATION_TIME=3000;
29 | private static final float DEFAULT_SCALE=6.0f;
30 | private static final int DEFAULT_FILL_TYPE=0;
31 |
32 | private int rippleColor;
33 | private float rippleStrokeWidth;
34 | private float rippleRadius;
35 | private int rippleDurationTime;
36 | private int rippleAmount;
37 | private int rippleDelay;
38 | private float rippleScale;
39 | private int rippleType;
40 | private Paint paint;
41 | private boolean animationRunning=false;
42 | private AnimatorSet animatorSet;
43 | private ArrayList animatorList;
44 | private LayoutParams rippleParams;
45 | private ArrayList rippleViewList=new ArrayList();
46 |
47 | public RippleBackground(Context context) {
48 | super(context);
49 | }
50 |
51 | public RippleBackground(Context context, AttributeSet attrs) {
52 | super(context, attrs);
53 | init(context, attrs);
54 | }
55 |
56 | public RippleBackground(Context context, AttributeSet attrs, int defStyleAttr) {
57 | super(context, attrs, defStyleAttr);
58 | init(context, attrs);
59 | }
60 |
61 | private void init(final Context context, final AttributeSet attrs) {
62 | if (isInEditMode())
63 | return;
64 |
65 | if (null == attrs) {
66 | throw new IllegalArgumentException("Attributes should be provided to this view,");
67 | }
68 |
69 | final TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.RippleBackground);
70 | rippleColor=typedArray.getColor(R.styleable.RippleBackground_rb_color, getResources().getColor(R.color.rippelColor));
71 | rippleStrokeWidth=typedArray.getDimension(R.styleable.RippleBackground_rb_strokeWidth, getResources().getDimension(R.dimen.rippleStrokeWidth));
72 | rippleRadius=typedArray.getDimension(R.styleable.RippleBackground_rb_radius,getResources().getDimension(R.dimen.rippleRadius));
73 | rippleDurationTime=typedArray.getInt(R.styleable.RippleBackground_rb_duration,DEFAULT_DURATION_TIME);
74 | rippleAmount=typedArray.getInt(R.styleable.RippleBackground_rb_rippleAmount,DEFAULT_RIPPLE_COUNT);
75 | rippleScale=typedArray.getFloat(R.styleable.RippleBackground_rb_scale,DEFAULT_SCALE);
76 | rippleType=typedArray.getInt(R.styleable.RippleBackground_rb_type,DEFAULT_FILL_TYPE);
77 | typedArray.recycle();
78 |
79 | rippleDelay=rippleDurationTime/rippleAmount;
80 |
81 | paint = new Paint();
82 | paint.setAntiAlias(true);
83 | if(rippleType==DEFAULT_FILL_TYPE){
84 | rippleStrokeWidth=0;
85 | paint.setStyle(Paint.Style.FILL);
86 | }else {
87 | paint.setStrokeWidth(rippleStrokeWidth);
88 | paint.setStyle(Paint.Style.STROKE);
89 | }
90 | paint.setColor(rippleColor);
91 |
92 | rippleParams=new LayoutParams((int)(2*(rippleRadius+rippleStrokeWidth)),(int)(2*(rippleRadius+rippleStrokeWidth)));
93 | rippleParams.addRule(CENTER_IN_PARENT, TRUE);
94 |
95 | animatorSet = new AnimatorSet();
96 | animatorSet.setInterpolator(new AccelerateDecelerateInterpolator());
97 | animatorList=new ArrayList();
98 |
99 | for(int i=0;i
2 |
8 |
12 |
13 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu_home.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu_settings.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_menu_switch.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/side_nav_bar.xml:
--------------------------------------------------------------------------------
1 |
3 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/app_bar_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_baisc.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
22 |
23 |
34 |
35 |
43 |
44 |
45 |
46 |
47 |
48 |
54 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_extend.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
22 |
23 |
34 |
35 |
43 |
44 |
45 |
46 |
47 |
48 |
53 |
54 |
64 |
65 |
72 |
73 |
79 |
80 |
98 |
99 |
100 |
101 |
102 |
110 |
111 |
117 |
118 |
136 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nav_header_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/activity_main_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reed-overflow/Saimin-APP/68c5eec0c4274f99dcad5bc03627e51acd8bbabc/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reed-overflow/Saimin-APP/68c5eec0c4274f99dcad5bc03627e51acd8bbabc/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reed-overflow/Saimin-APP/68c5eec0c4274f99dcad5bc03627e51acd8bbabc/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reed-overflow/Saimin-APP/68c5eec0c4274f99dcad5bc03627e51acd8bbabc/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reed-overflow/Saimin-APP/68c5eec0c4274f99dcad5bc03627e51acd8bbabc/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reed-overflow/Saimin-APP/68c5eec0c4274f99dcad5bc03627e51acd8bbabc/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reed-overflow/Saimin-APP/68c5eec0c4274f99dcad5bc03627e51acd8bbabc/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reed-overflow/Saimin-APP/68c5eec0c4274f99dcad5bc03627e51acd8bbabc/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reed-overflow/Saimin-APP/68c5eec0c4274f99dcad5bc03627e51acd8bbabc/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reed-overflow/Saimin-APP/68c5eec0c4274f99dcad5bc03627e51acd8bbabc/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/navigation/mobile_navigation.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/raw/notices.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Saimin-APP
5 | https://github.com/reed-overflow/Saimin-APP
6 | Copyright (c) 2020 reed-overflow
7 | MIT License
8 |
9 |
10 |
11 | LicensesDialog
12 | https://github.com/PSDev/LicensesDialog
13 | Copyright 2013 Philip Schiffer
14 | Apache Software License 2.0
15 |
16 |
17 |
18 | android-ripple-background
19 | https://github.com/skyfishjy/android-ripple-background
20 | Copyright (c) 2014 Yao Yu
21 | MIT License
22 |
23 |
24 |
25 | SwitchButton
26 | https://github.com/kyleduo/SwitchButton
27 | Apache Software License 2.0
28 |
29 |
30 |
31 | BubbleSeekBar
32 | https://github.com/woxingxiao/BubbleSeekBar
33 | Copyright 2017 woxingxiao
34 | Apache Software License 2.0
35 |
36 |
37 |
38 | RippleAnimation
39 | https://github.com/Ifxcyr/RippleAnimation
40 | Apache Software License 2.0
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/res/values-en/array.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - "Basic mode"
4 | - "Extend mode"
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values-en/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Saimin APP
3 |
4 | Home
5 | Settings
6 |
7 | Switch mode
8 | Switch saimin mode
9 |
10 | Author info
11 |
12 | Repo link
13 |
14 | License
15 | License info
16 |
17 | Version
18 |
19 | Saimin service stopped
20 | Saimin service started
21 | Saimin service starting…
22 | Shutdown Saimin service…
23 |
24 | Sensitive
25 | Obey
26 |
--------------------------------------------------------------------------------
/app/src/main/res/values/array.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - "基础模式"
4 | - "扩展模式"
5 |
6 |
7 | - 0
8 | - 1
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F48FB1
4 | #F06292
5 | #81D4FA
6 |
7 | #0099CC
8 |
9 | #fff
10 | #000
11 |
12 | @color/white
13 | @color/black
14 | @color/colorPrimary
15 | @color/colorAccent
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 8dp
6 | 176dp
7 | 16dp
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimensions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 2dp
4 | 64dp
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F48FB1
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Saimin APP
3 |
4 | 主页
5 | 设置
6 |
7 | 模式切换
8 | 切换应用模式
9 |
10 | 作者信息
11 | https://github.com/reed-overflow
12 |
13 | 项目地址
14 | https://github.com/reed-overflow/Saimin-APP
15 |
16 | License
17 | 开源许可
18 |
19 | 版本
20 | 0.1.1b
21 |
22 | 未启动
23 | 催眠中
24 | 催眠服务启动中…
25 | 催眠服务关闭中…
26 |
27 | 敏感度
28 | 服从度
29 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
15 |
16 |
20 |
21 |
25 |
26 |
30 |
31 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/test/java/com/reedoverflow/saiminapp/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.reedoverflow.saiminapp;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/art/Screenshot_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reed-overflow/Saimin-APP/68c5eec0c4274f99dcad5bc03627e51acd8bbabc/art/Screenshot_1.png
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath "com.android.tools.build:gradle:4.0.0"
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | task clean(type: Delete) {
23 | delete rootProject.buildDir
24 | }
--------------------------------------------------------------------------------
/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
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 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/reed-overflow/Saimin-APP/68c5eec0c4274f99dcad5bc03627e51acd8bbabc/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Jun 01 14:13:04 CST 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | rootProject.name = "Saimin APP"
--------------------------------------------------------------------------------