diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 7efc0ae..0000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -Notes-master \ No newline at end of file diff --git a/.idea/AndroidProjectSystem.xml b/.idea/AndroidProjectSystem.xml deleted file mode 100644 index 4a53bee..0000000 --- a/.idea/AndroidProjectSystem.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml index b86273d..b589d56 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 639c779..32522c1 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -1,10 +1,8 @@ - diff --git a/.idea/misc.xml b/.idea/misc.xml index e6df80d..f104487 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,44 +1,7 @@ - - - - - - Android Lint: Security - - - Android Lint: Usability - - - CodePlugin DevKit - - - JUnit - - - Java - - - Plugin DevKit - - - Probable bugsJava - - - Verbose or redundant code constructsJava - - - - - User defined - - - - - - + diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 16660f1..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index d843f34..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c5f3f6b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "interactive" +} \ No newline at end of file diff --git a/NOTICE b/NOTICE deleted file mode 100644 index 9a54521..0000000 --- a/NOTICE +++ /dev/null @@ -1,190 +0,0 @@ - - Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - diff --git a/README b/README deleted file mode 100644 index fc0d824..0000000 --- a/README +++ /dev/null @@ -1,23 +0,0 @@ -[中文] - -1. MiCode便签是小米便签的社区开源版,由MIUI团队(www.miui.com) 发起并贡献第一批代码,遵循NOTICE文件所描述的开源协议, - 今后为MiCode社区(www.micode.net) 拥有,并由社区发布和维护。 - -2. Bug反馈和跟踪,请访问Github, - https://github.com/MiCode/Notes/issues?sort=created&direction=desc&state=open - -3. 功能建议和综合讨论,请访问MiCode, - http://micode.net/forum.php?mod=forumdisplay&fid=38 - - -[English] - -1. MiCode Notes is open source edition of XM notepad, it's first initiated and sponsored by MIUI team (www.miui.com). - It's opened under license described by NOTICE file. It's owned by the MiCode community (www.micode.net). In future, - the MiCode community will release and maintain this project. - -2. Regarding issue tracking, please visit Github, - https://github.com/MiCode/Notes/issues?sort=created&direction=desc&state=open - -3. Regarding feature request and general discussion, please visit Micode forum, - http://micode.net/forum.php?mod=forumdisplay&fid=38 diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..d23a164 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,73 @@ +plugins { + alias(libs.plugins.android.application) +} + +android { + namespace = "net.micode.notes" + compileSdk = 34 + + defaultConfig { + applicationId = "net.micode.notes" + minSdk = 24 + targetSdk = 34 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + flavorDimensions += "device" + productFlavors { + create("phone") { + dimension = "device" + applicationIdSuffix = ".phone" + versionNameSuffix = "-phone" + } + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + packaging { + resources { + excludes += "/META-INF/{AL2.0,LGPL2.1}" + excludes += "META-INF/DEPENDENCIES" + excludes += "META-INF/LICENSE" + excludes += "META-INF/LICENSE.txt" + excludes += "META-INF/license.txt" + excludes += "META-INF/NOTICE" + excludes += "META-INF/NOTICE.txt" + excludes += "META-INF/notice.txt" + excludes += "META-INF/ASL2.0" + } + } +} + +dependencies { + implementation(libs.appcompat) + implementation(libs.material) + implementation(libs.activity) + implementation(libs.constraintlayout) + + // OkHttp dependencies + implementation("com.squareup.okhttp3:okhttp:3.14.9") { + exclude(group = "org.bouncycastle", module = "bcprov-jdk15on") + exclude(group = "org.bouncycastle", module = "bcpkix-jdk15on") + } + implementation("com.squareup.okio:okio:1.17.5") + + testImplementation(libs.junit) + androidTestImplementation(libs.ext.junit) + androidTestImplementation(libs.espresso.core) +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/app/src/androidTest/java/net/micode/notes/ExampleInstrumentedTest.java b/app/src/androidTest/java/net/micode/notes/ExampleInstrumentedTest.java new file mode 100644 index 0000000..a889a75 --- /dev/null +++ b/app/src/androidTest/java/net/micode/notes/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package net.micode.notes; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("net.micode.notes", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/AndroidManifest.xml b/app/src/main/AndroidManifest.xml similarity index 95% rename from AndroidManifest.xml rename to app/src/main/AndroidManifest.xml index 3dd5709..37ae826 100644 --- a/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,156 +1,155 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/net/micode/notes/MainActivity.java b/app/src/main/java/net/micode/notes/MainActivity.java new file mode 100644 index 0000000..8091753 --- /dev/null +++ b/app/src/main/java/net/micode/notes/MainActivity.java @@ -0,0 +1,24 @@ +package net.micode.notes; + +import android.os.Bundle; + +import androidx.activity.EdgeToEdge; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; + +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + EdgeToEdge.enable(this); + setContentView(R.layout.activity_main); + ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> { + Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()); + v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom); + return insets; + }); + } +} \ No newline at end of file diff --git a/src/net/micode/notes/data/Contact.java b/app/src/main/java/net/micode/notes/data/Contact.java similarity index 100% rename from src/net/micode/notes/data/Contact.java rename to app/src/main/java/net/micode/notes/data/Contact.java diff --git a/src/net/micode/notes/data/Notes.java b/app/src/main/java/net/micode/notes/data/Notes.java similarity index 100% rename from src/net/micode/notes/data/Notes.java rename to app/src/main/java/net/micode/notes/data/Notes.java diff --git a/src/net/micode/notes/data/NotesDatabaseHelper.java b/app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java similarity index 100% rename from src/net/micode/notes/data/NotesDatabaseHelper.java rename to app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java diff --git a/src/net/micode/notes/data/NotesProvider.java b/app/src/main/java/net/micode/notes/data/NotesProvider.java similarity index 100% rename from src/net/micode/notes/data/NotesProvider.java rename to app/src/main/java/net/micode/notes/data/NotesProvider.java diff --git a/src/net/micode/notes/gtask/data/MetaData.java b/app/src/main/java/net/micode/notes/gtask/data/MetaData.java similarity index 100% rename from src/net/micode/notes/gtask/data/MetaData.java rename to app/src/main/java/net/micode/notes/gtask/data/MetaData.java diff --git a/src/net/micode/notes/gtask/data/Node.java b/app/src/main/java/net/micode/notes/gtask/data/Node.java similarity index 100% rename from src/net/micode/notes/gtask/data/Node.java rename to app/src/main/java/net/micode/notes/gtask/data/Node.java diff --git a/src/net/micode/notes/gtask/data/SqlData.java b/app/src/main/java/net/micode/notes/gtask/data/SqlData.java similarity index 100% rename from src/net/micode/notes/gtask/data/SqlData.java rename to app/src/main/java/net/micode/notes/gtask/data/SqlData.java diff --git a/src/net/micode/notes/gtask/data/SqlNote.java b/app/src/main/java/net/micode/notes/gtask/data/SqlNote.java similarity index 100% rename from src/net/micode/notes/gtask/data/SqlNote.java rename to app/src/main/java/net/micode/notes/gtask/data/SqlNote.java diff --git a/src/net/micode/notes/gtask/data/Task.java b/app/src/main/java/net/micode/notes/gtask/data/Task.java similarity index 100% rename from src/net/micode/notes/gtask/data/Task.java rename to app/src/main/java/net/micode/notes/gtask/data/Task.java diff --git a/src/net/micode/notes/gtask/data/TaskList.java b/app/src/main/java/net/micode/notes/gtask/data/TaskList.java similarity index 100% rename from src/net/micode/notes/gtask/data/TaskList.java rename to app/src/main/java/net/micode/notes/gtask/data/TaskList.java diff --git a/src/net/micode/notes/gtask/exception/ActionFailureException.java b/app/src/main/java/net/micode/notes/gtask/exception/ActionFailureException.java similarity index 100% rename from src/net/micode/notes/gtask/exception/ActionFailureException.java rename to app/src/main/java/net/micode/notes/gtask/exception/ActionFailureException.java diff --git a/src/net/micode/notes/gtask/exception/NetworkFailureException.java b/app/src/main/java/net/micode/notes/gtask/exception/NetworkFailureException.java similarity index 100% rename from src/net/micode/notes/gtask/exception/NetworkFailureException.java rename to app/src/main/java/net/micode/notes/gtask/exception/NetworkFailureException.java diff --git a/src/net/micode/notes/gtask/remote/GTaskASyncTask.java b/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java similarity index 84% rename from src/net/micode/notes/gtask/remote/GTaskASyncTask.java rename to app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java index b3b61e7..f5b5a7e 100644 --- a/src/net/micode/notes/gtask/remote/GTaskASyncTask.java +++ b/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java @@ -1,4 +1,3 @@ - /* * Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net) * @@ -64,22 +63,26 @@ public class GTaskASyncTask extends AsyncTask { } private void showNotification(int tickerId, String content) { - Notification notification = new Notification(R.drawable.notification, mContext - .getString(tickerId), System.currentTimeMillis()); - notification.defaults = Notification.DEFAULT_LIGHTS; - notification.flags = Notification.FLAG_AUTO_CANCEL; + Notification.Builder builder = new Notification.Builder(mContext) + .setSmallIcon(R.drawable.notification) + .setTicker(mContext.getString(tickerId)) + .setWhen(System.currentTimeMillis()) + .setDefaults(Notification.DEFAULT_LIGHTS) + .setAutoCancel(true) + .setContentTitle(mContext.getString(R.string.app_name)) + .setContentText(content); + PendingIntent pendingIntent; if (tickerId != R.string.ticker_success) { pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(mContext, - NotesPreferenceActivity.class), 0); - + NotesPreferenceActivity.class), PendingIntent.FLAG_IMMUTABLE); } else { pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(mContext, - NotesListActivity.class), 0); + NotesListActivity.class), PendingIntent.FLAG_IMMUTABLE); } - notification.setLatestEventInfo(mContext, mContext.getString(R.string.app_name), content, - pendingIntent); - mNotifiManager.notify(GTASK_SYNC_NOTIFICATION_ID, notification); + builder.setContentIntent(pendingIntent); + + mNotifiManager.notify(GTASK_SYNC_NOTIFICATION_ID, builder.build()); } @Override diff --git a/src/net/micode/notes/gtask/remote/GTaskClient.java b/app/src/main/java/net/micode/notes/gtask/remote/GTaskClient.java similarity index 84% rename from src/net/micode/notes/gtask/remote/GTaskClient.java rename to app/src/main/java/net/micode/notes/gtask/remote/GTaskClient.java index c67dfdf..9d7f0f9 100644 --- a/src/net/micode/notes/gtask/remote/GTaskClient.java +++ b/app/src/main/java/net/micode/notes/gtask/remote/GTaskClient.java @@ -32,20 +32,6 @@ import net.micode.notes.gtask.exception.NetworkFailureException; import net.micode.notes.tool.GTaskStringUtils; import net.micode.notes.ui.NotesPreferenceActivity; -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.entity.UrlEncodedFormEntity; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.cookie.Cookie; -import org.apache.http.impl.client.BasicCookieStore; -import org.apache.http.impl.client.DefaultHttpClient; -import org.apache.http.message.BasicNameValuePair; -import org.apache.http.params.BasicHttpParams; -import org.apache.http.params.HttpConnectionParams; -import org.apache.http.params.HttpParams; -import org.apache.http.params.HttpProtocolParams; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -54,12 +40,25 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import java.util.LinkedList; +import java.util.ArrayList; import java.util.List; +import java.util.concurrent.TimeUnit; import java.util.zip.GZIPInputStream; import java.util.zip.Inflater; import java.util.zip.InflaterInputStream; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.Cookie; +import okhttp3.CookieJar; +import okhttp3.FormBody; +import okhttp3.HttpUrl; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import okhttp3.ResponseBody; public class GTaskClient { private static final String TAG = GTaskClient.class.getSimpleName(); @@ -72,7 +71,7 @@ public class GTaskClient { private static GTaskClient mInstance = null; - private DefaultHttpClient mHttpClient; + private OkHttpClient mHttpClient; private String mGetUrl; @@ -91,7 +90,23 @@ public class GTaskClient { private JSONArray mUpdateArray; private GTaskClient() { - mHttpClient = null; + mHttpClient = new OkHttpClient.Builder() + .connectTimeout(10, TimeUnit.SECONDS) + .readTimeout(15, TimeUnit.SECONDS) + .cookieJar(new CookieJar() { + private final List cookies = new ArrayList<>(); + + @Override + public void saveFromResponse(HttpUrl url, List cookies) { + this.cookies.addAll(cookies); + } + + @Override + public List loadForRequest(HttpUrl url) { + return cookies; + } + }) + .build(); mGetUrl = GTASK_GET_URL; mPostUrl = GTASK_POST_URL; mClientVersion = -1; @@ -228,26 +243,23 @@ public class GTaskClient { private boolean loginGtask(String authToken) { int timeoutConnection = 10000; int timeoutSocket = 15000; - HttpParams httpParameters = new BasicHttpParams(); - HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection); - HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket); - mHttpClient = new DefaultHttpClient(httpParameters); - BasicCookieStore localBasicCookieStore = new BasicCookieStore(); - mHttpClient.setCookieStore(localBasicCookieStore); - HttpProtocolParams.setUseExpectContinue(mHttpClient.getParams(), false); + OkHttpClient.Builder builder = new OkHttpClient.Builder(); + builder.connectTimeout(timeoutConnection, TimeUnit.MILLISECONDS); + builder.readTimeout(timeoutSocket, TimeUnit.MILLISECONDS); + mHttpClient = builder.build(); // login gtask try { - String loginUrl = mGetUrl + "?auth=" + authToken; - HttpGet httpGet = new HttpGet(loginUrl); - HttpResponse response = null; - response = mHttpClient.execute(httpGet); + Request request = new Request.Builder() + .url(mGetUrl + "?auth=" + authToken) + .build(); + Response response = mHttpClient.newCall(request).execute(); // get the cookie now - List cookies = mHttpClient.getCookieStore().getCookies(); + List cookies = mHttpClient.cookieJar().loadForRequest(request.url()); boolean hasAuthCookie = false; for (Cookie cookie : cookies) { - if (cookie.getName().contains("GTL")) { + if (cookie.name().contains("GTL")) { hasAuthCookie = true; } } @@ -256,7 +268,7 @@ public class GTaskClient { } // get the client version - String resString = getResponseContent(response.getEntity()); + String resString = getResponseContent(response.body().byteStream()); String jsBegin = "_setup("; String jsEnd = ")}"; int begin = resString.indexOf(jsBegin); @@ -284,26 +296,27 @@ public class GTaskClient { return mActionId++; } - private HttpPost createHttpPost() { - HttpPost httpPost = new HttpPost(mPostUrl); - httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); - httpPost.setHeader("AT", "1"); - return httpPost; + private Request createRequest() { + Request.Builder builder = new Request.Builder() + .url(mPostUrl) + .addHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8") + .addHeader("AT", "1"); + return builder.build(); } - private String getResponseContent(HttpEntity entity) throws IOException { + private String getResponseContent(InputStream inputStream) throws IOException { String contentEncoding = null; - if (entity.getContentEncoding() != null) { - contentEncoding = entity.getContentEncoding().getValue(); + if (inputStream != null) { + contentEncoding = inputStream.toString(); Log.d(TAG, "encoding: " + contentEncoding); } - InputStream input = entity.getContent(); + InputStream input = inputStream; if (contentEncoding != null && contentEncoding.equalsIgnoreCase("gzip")) { - input = new GZIPInputStream(entity.getContent()); + input = new GZIPInputStream(inputStream); } else if (contentEncoding != null && contentEncoding.equalsIgnoreCase("deflate")) { Inflater inflater = new Inflater(true); - input = new InflaterInputStream(entity.getContent(), inflater); + input = new InflaterInputStream(inputStream, inflater); } try { @@ -329,22 +342,18 @@ public class GTaskClient { throw new ActionFailureException("not logged in"); } - HttpPost httpPost = createHttpPost(); + Request request = createRequest(); + RequestBody body = new FormBody.Builder() + .add("r", js.toString()) + .build(); + Request postRequest = request.newBuilder() + .post(body) + .build(); + try { - LinkedList list = new LinkedList(); - list.add(new BasicNameValuePair("r", js.toString())); - UrlEncodedFormEntity entity = new UrlEncodedFormEntity(list, "UTF-8"); - httpPost.setEntity(entity); - - // execute the post - HttpResponse response = mHttpClient.execute(httpPost); - String jsString = getResponseContent(response.getEntity()); + Response response = mHttpClient.newCall(postRequest).execute(); + String jsString = getResponseContent(response.body().byteStream()); return new JSONObject(jsString); - - } catch (ClientProtocolException e) { - Log.e(TAG, e.toString()); - e.printStackTrace(); - throw new NetworkFailureException("postRequest failed"); } catch (IOException e) { Log.e(TAG, e.toString()); e.printStackTrace(); @@ -516,12 +525,13 @@ public class GTaskClient { } try { - HttpGet httpGet = new HttpGet(mGetUrl); - HttpResponse response = null; - response = mHttpClient.execute(httpGet); + Request request = new Request.Builder() + .url(mGetUrl) + .build(); + Response response = mHttpClient.newCall(request).execute(); // get the task list - String resString = getResponseContent(response.getEntity()); + String resString = getResponseContent(response.body().byteStream()); String jsBegin = "_setup("; String jsEnd = ")}"; int begin = resString.indexOf(jsBegin); @@ -532,10 +542,6 @@ public class GTaskClient { } JSONObject js = new JSONObject(jsString); return js.getJSONObject("t").getJSONArray(GTaskStringUtils.GTASK_JSON_LISTS); - } catch (ClientProtocolException e) { - Log.e(TAG, e.toString()); - e.printStackTrace(); - throw new NetworkFailureException("gettasklists: httpget failed"); } catch (IOException e) { Log.e(TAG, e.toString()); e.printStackTrace(); diff --git a/src/net/micode/notes/gtask/remote/GTaskManager.java b/app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java similarity index 100% rename from src/net/micode/notes/gtask/remote/GTaskManager.java rename to app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java diff --git a/src/net/micode/notes/gtask/remote/GTaskSyncService.java b/app/src/main/java/net/micode/notes/gtask/remote/GTaskSyncService.java similarity index 100% rename from src/net/micode/notes/gtask/remote/GTaskSyncService.java rename to app/src/main/java/net/micode/notes/gtask/remote/GTaskSyncService.java diff --git a/src/net/micode/notes/model/Note.java b/app/src/main/java/net/micode/notes/model/Note.java similarity index 100% rename from src/net/micode/notes/model/Note.java rename to app/src/main/java/net/micode/notes/model/Note.java diff --git a/src/net/micode/notes/model/WorkingNote.java b/app/src/main/java/net/micode/notes/model/WorkingNote.java similarity index 100% rename from src/net/micode/notes/model/WorkingNote.java rename to app/src/main/java/net/micode/notes/model/WorkingNote.java diff --git a/src/net/micode/notes/tool/BackupUtils.java b/app/src/main/java/net/micode/notes/tool/BackupUtils.java similarity index 100% rename from src/net/micode/notes/tool/BackupUtils.java rename to app/src/main/java/net/micode/notes/tool/BackupUtils.java diff --git a/src/net/micode/notes/tool/DataUtils.java b/app/src/main/java/net/micode/notes/tool/DataUtils.java similarity index 100% rename from src/net/micode/notes/tool/DataUtils.java rename to app/src/main/java/net/micode/notes/tool/DataUtils.java diff --git a/src/net/micode/notes/tool/GTaskStringUtils.java b/app/src/main/java/net/micode/notes/tool/GTaskStringUtils.java similarity index 100% rename from src/net/micode/notes/tool/GTaskStringUtils.java rename to app/src/main/java/net/micode/notes/tool/GTaskStringUtils.java diff --git a/src/net/micode/notes/tool/ResourceParser.java b/app/src/main/java/net/micode/notes/tool/ResourceParser.java similarity index 100% rename from src/net/micode/notes/tool/ResourceParser.java rename to app/src/main/java/net/micode/notes/tool/ResourceParser.java diff --git a/src/net/micode/notes/ui/AlarmAlertActivity.java b/app/src/main/java/net/micode/notes/ui/AlarmAlertActivity.java similarity index 100% rename from src/net/micode/notes/ui/AlarmAlertActivity.java rename to app/src/main/java/net/micode/notes/ui/AlarmAlertActivity.java diff --git a/src/net/micode/notes/ui/AlarmInitReceiver.java b/app/src/main/java/net/micode/notes/ui/AlarmInitReceiver.java similarity index 100% rename from src/net/micode/notes/ui/AlarmInitReceiver.java rename to app/src/main/java/net/micode/notes/ui/AlarmInitReceiver.java diff --git a/src/net/micode/notes/ui/AlarmReceiver.java b/app/src/main/java/net/micode/notes/ui/AlarmReceiver.java similarity index 100% rename from src/net/micode/notes/ui/AlarmReceiver.java rename to app/src/main/java/net/micode/notes/ui/AlarmReceiver.java diff --git a/src/net/micode/notes/ui/DateTimePicker.java b/app/src/main/java/net/micode/notes/ui/DateTimePicker.java similarity index 100% rename from src/net/micode/notes/ui/DateTimePicker.java rename to app/src/main/java/net/micode/notes/ui/DateTimePicker.java diff --git a/src/net/micode/notes/ui/DateTimePickerDialog.java b/app/src/main/java/net/micode/notes/ui/DateTimePickerDialog.java similarity index 100% rename from src/net/micode/notes/ui/DateTimePickerDialog.java rename to app/src/main/java/net/micode/notes/ui/DateTimePickerDialog.java diff --git a/src/net/micode/notes/ui/DropdownMenu.java b/app/src/main/java/net/micode/notes/ui/DropdownMenu.java similarity index 100% rename from src/net/micode/notes/ui/DropdownMenu.java rename to app/src/main/java/net/micode/notes/ui/DropdownMenu.java diff --git a/src/net/micode/notes/ui/FoldersListAdapter.java b/app/src/main/java/net/micode/notes/ui/FoldersListAdapter.java similarity index 100% rename from src/net/micode/notes/ui/FoldersListAdapter.java rename to app/src/main/java/net/micode/notes/ui/FoldersListAdapter.java diff --git a/src/net/micode/notes/ui/NoteEditActivity.java b/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java similarity index 94% rename from src/net/micode/notes/ui/NoteEditActivity.java rename to app/src/main/java/net/micode/notes/ui/NoteEditActivity.java index 96a9ff8..ecf5cd5 100644 --- a/src/net/micode/notes/ui/NoteEditActivity.java +++ b/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java @@ -507,50 +507,48 @@ public class NoteEditActivity extends Activity implements OnClickListener, @Override public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case R.id.menu_new_note: - createNewNote(); - break; - case R.id.menu_delete: - AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.setTitle(getString(R.string.alert_title_delete)); - builder.setIcon(android.R.drawable.ic_dialog_alert); - builder.setMessage(getString(R.string.alert_message_delete_note)); - builder.setPositiveButton(android.R.string.ok, - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int which) { - deleteCurrentNote(); - finish(); - } - }); - builder.setNegativeButton(android.R.string.cancel, null); - builder.show(); - break; - case R.id.menu_font_size: - mFontSizeSelector.setVisibility(View.VISIBLE); - findViewById(sFontSelectorSelectionMap.get(mFontSizeId)).setVisibility(View.VISIBLE); - break; - case R.id.menu_list_mode: - mWorkingNote.setCheckListMode(mWorkingNote.getCheckListMode() == 0 ? - TextNote.MODE_CHECK_LIST : 0); - break; - case R.id.menu_share: - getWorkingText(); - sendTo(this, mWorkingNote.getContent()); - break; - case R.id.menu_send_to_desktop: - sendToDesktop(); - break; - case R.id.menu_alert: - setReminder(); - break; - case R.id.menu_delete_remind: - mWorkingNote.setAlertDate(0, false); - break; - default: - break; + int id = item.getItemId(); + if (id == R.id.menu_new_note) { + createNewNote(); + return true; + } else if (id == R.id.menu_delete) { + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setTitle(getString(R.string.alert_title_delete)); + builder.setIcon(android.R.drawable.ic_dialog_alert); + builder.setMessage(getString(R.string.alert_message_delete_note)); + builder.setPositiveButton(android.R.string.ok, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + deleteCurrentNote(); + finish(); + } + }); + builder.setNegativeButton(android.R.string.cancel, null); + builder.show(); + return true; + } else if (id == R.id.menu_font_size) { + mFontSizeSelector.setVisibility(View.VISIBLE); + findViewById(sFontSelectorSelectionMap.get(mFontSizeId)).setVisibility(View.VISIBLE); + return true; + } else if (id == R.id.menu_list_mode) { + mWorkingNote.setCheckListMode(mWorkingNote.getCheckListMode() == 0 ? + TextNote.MODE_CHECK_LIST : 0); + return true; + } else if (id == R.id.menu_share) { + getWorkingText(); + sendTo(this, mWorkingNote.getContent()); + return true; + } else if (id == R.id.menu_send_to_desktop) { + sendToDesktop(); + return true; + } else if (id == R.id.menu_alert) { + setReminder(); + return true; + } else if (id == R.id.menu_delete_remind) { + mWorkingNote.setAlertDate(0, false); + return true; } - return true; + return super.onOptionsItemSelected(item); } private void setReminder() { diff --git a/src/net/micode/notes/ui/NoteEditText.java b/app/src/main/java/net/micode/notes/ui/NoteEditText.java similarity index 100% rename from src/net/micode/notes/ui/NoteEditText.java rename to app/src/main/java/net/micode/notes/ui/NoteEditText.java diff --git a/src/net/micode/notes/ui/NoteItemData.java b/app/src/main/java/net/micode/notes/ui/NoteItemData.java similarity index 100% rename from src/net/micode/notes/ui/NoteItemData.java rename to app/src/main/java/net/micode/notes/ui/NoteItemData.java diff --git a/src/net/micode/notes/ui/NotesListActivity.java b/app/src/main/java/net/micode/notes/ui/NotesListActivity.java similarity index 86% rename from src/net/micode/notes/ui/NotesListActivity.java rename to app/src/main/java/net/micode/notes/ui/NotesListActivity.java index e843aec..f1270ea 100644 --- a/src/net/micode/notes/ui/NotesListActivity.java +++ b/app/src/main/java/net/micode/notes/ui/NotesListActivity.java @@ -319,88 +319,68 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt return true; } - switch (item.getItemId()) { - case R.id.delete: - AlertDialog.Builder builder = new AlertDialog.Builder(NotesListActivity.this); - builder.setTitle(getString(R.string.alert_title_delete)); - builder.setIcon(android.R.drawable.ic_dialog_alert); - builder.setMessage(getString(R.string.alert_message_delete_notes, - mNotesListAdapter.getSelectedCount())); - builder.setPositiveButton(android.R.string.ok, - new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, - int which) { - batchDelete(); - } - }); - builder.setNegativeButton(android.R.string.cancel, null); - builder.show(); - break; - case R.id.move: - startQueryDestinationFolders(); - break; - default: - return false; + int id = item.getItemId(); + if (id == R.id.delete) { + AlertDialog.Builder builder = new AlertDialog.Builder(NotesListActivity.this); + builder.setTitle(getString(R.string.alert_title_delete)); + builder.setIcon(android.R.drawable.ic_dialog_alert); + builder.setMessage(getString(R.string.alert_message_delete_notes, + mNotesListAdapter.getSelectedCount())); + builder.setPositiveButton(android.R.string.ok, + new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, + int which) { + batchDelete(); + } + }); + builder.setNegativeButton(android.R.string.cancel, null); + builder.show(); + return true; + } else if (id == R.id.move) { + startQueryDestinationFolders(); + return true; } - return true; + return false; } } private class NewNoteOnTouchListener implements OnTouchListener { public boolean onTouch(View v, MotionEvent event) { - switch (event.getAction()) { - case MotionEvent.ACTION_DOWN: { - Display display = getWindowManager().getDefaultDisplay(); - int screenHeight = display.getHeight(); - int newNoteViewHeight = mAddNewNote.getHeight(); - int start = screenHeight - newNoteViewHeight; - int eventY = start + (int) event.getY(); - /** - * Minus TitleBar's height - */ - if (mState == ListEditState.SUB_FOLDER) { - eventY -= mTitleBar.getHeight(); - start -= mTitleBar.getHeight(); - } - /** - * HACKME:When click the transparent part of "New Note" button, dispatch - * the event to the list view behind this button. The transparent part of - * "New Note" button could be expressed by formula y=-0.12x+94(Unit:pixel) - * and the line top of the button. The coordinate based on left of the "New - * Note" button. The 94 represents maximum height of the transparent part. - * Notice that, if the background of the button changes, the formula should - * also change. This is very bad, just for the UI designer's strong requirement. - */ - if (event.getY() < (event.getX() * (-0.12) + 94)) { - View view = mNotesListView.getChildAt(mNotesListView.getChildCount() - 1 - - mNotesListView.getFooterViewsCount()); - if (view != null && view.getBottom() > start - && (view.getTop() < (start + 94))) { - mOriginY = (int) event.getY(); - mDispatchY = eventY; - event.setLocation(event.getX(), mDispatchY); - mDispatch = true; - return mNotesListView.dispatchTouchEvent(event); - } - } - break; + int action = event.getAction(); + if (action == MotionEvent.ACTION_DOWN) { + Display display = getWindowManager().getDefaultDisplay(); + int screenHeight = display.getHeight(); + int newNoteViewHeight = mAddNewNote.getHeight(); + int start = screenHeight - newNoteViewHeight; + int eventY = start + (int) event.getY(); + if (mState == ListEditState.SUB_FOLDER) { + eventY -= mTitleBar.getHeight(); + start -= mTitleBar.getHeight(); } - case MotionEvent.ACTION_MOVE: { - if (mDispatch) { - mDispatchY += (int) event.getY() - mOriginY; + if (event.getY() < (event.getX() * (-0.12) + 94)) { + View view = mNotesListView.getChildAt(mNotesListView.getChildCount() - 1 + - mNotesListView.getFooterViewsCount()); + if (view != null && view.getBottom() > start + && (view.getTop() < (start + 94))) { + mOriginY = (int) event.getY(); + mDispatchY = eventY; event.setLocation(event.getX(), mDispatchY); + mDispatch = true; return mNotesListView.dispatchTouchEvent(event); } - break; } - default: { - if (mDispatch) { - event.setLocation(event.getX(), mDispatchY); - mDispatch = false; - return mNotesListView.dispatchTouchEvent(event); - } - break; + } else if (action == MotionEvent.ACTION_MOVE) { + if (mDispatch) { + mDispatchY += (int) event.getY() - mOriginY; + event.setLocation(event.getX(), mDispatchY); + return mNotesListView.dispatchTouchEvent(event); + } + } else { + if (mDispatch) { + event.setLocation(event.getX(), mDispatchY); + mDispatch = false; + return mNotesListView.dispatchTouchEvent(event); } } return false; @@ -558,12 +538,9 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt } public void onClick(View v) { - switch (v.getId()) { - case R.id.btn_new_note: - createNewNote(); - break; - default: - break; + int id = v.getId(); + if (id == R.id.btn_new_note) { + createNewNote(); } } @@ -780,42 +757,27 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt @Override public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case R.id.menu_new_folder: { - showCreateOrModifyFolderDialog(true); - break; - } - case R.id.menu_export_text: { - exportNoteToText(); - break; - } - case R.id.menu_sync: { - if (isSyncMode()) { - if (TextUtils.equals(item.getTitle(), getString(R.string.menu_sync))) { - GTaskSyncService.startSync(this); - } else { - GTaskSyncService.cancelSync(this); - } - } else { - startPreferenceActivity(); - } - break; - } - case R.id.menu_setting: { - startPreferenceActivity(); - break; - } - case R.id.menu_new_note: { - createNewNote(); - break; - } - case R.id.menu_search: - onSearchRequested(); - break; - default: - break; + int id = item.getItemId(); + if (id == R.id.menu_new_folder) { + showCreateOrModifyFolderDialog(true); + return true; + } else if (id == R.id.menu_export_text) { + exportNoteToText(); + return true; + } else if (id == R.id.menu_sync) { + showSyncDialog(); + return true; + } else if (id == R.id.menu_setting) { + startPreferenceActivity(); + return true; + } else if (id == R.id.menu_new_note) { + createNewNote(); + return true; + } else if (id == R.id.menu_search) { + onSearchRequested(); + return true; } - return true; + return super.onOptionsItemSelected(item); } @Override @@ -951,4 +913,12 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt } return false; } + + private void showSyncDialog() { + if (GTaskSyncService.isSyncing()) { + GTaskSyncService.cancelSync(this); + } else { + GTaskSyncService.startSync(this); + } + } } diff --git a/src/net/micode/notes/ui/NotesListAdapter.java b/app/src/main/java/net/micode/notes/ui/NotesListAdapter.java similarity index 100% rename from src/net/micode/notes/ui/NotesListAdapter.java rename to app/src/main/java/net/micode/notes/ui/NotesListAdapter.java diff --git a/src/net/micode/notes/ui/NotesListItem.java b/app/src/main/java/net/micode/notes/ui/NotesListItem.java similarity index 100% rename from src/net/micode/notes/ui/NotesListItem.java rename to app/src/main/java/net/micode/notes/ui/NotesListItem.java diff --git a/src/net/micode/notes/ui/NotesPreferenceActivity.java b/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java similarity index 100% rename from src/net/micode/notes/ui/NotesPreferenceActivity.java rename to app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java diff --git a/src/net/micode/notes/widget/NoteWidgetProvider.java b/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java similarity index 100% rename from src/net/micode/notes/widget/NoteWidgetProvider.java rename to app/src/main/java/net/micode/notes/widget/NoteWidgetProvider.java diff --git a/src/net/micode/notes/widget/NoteWidgetProvider_2x.java b/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_2x.java similarity index 100% rename from src/net/micode/notes/widget/NoteWidgetProvider_2x.java rename to app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_2x.java diff --git a/src/net/micode/notes/widget/NoteWidgetProvider_4x.java b/app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_4x.java similarity index 100% rename from src/net/micode/notes/widget/NoteWidgetProvider_4x.java rename to app/src/main/java/net/micode/notes/widget/NoteWidgetProvider_4x.java diff --git a/res/color/primary_text_dark.xml b/app/src/main/res/color/primary_text_dark.xml similarity index 100% rename from res/color/primary_text_dark.xml rename to app/src/main/res/color/primary_text_dark.xml diff --git a/res/color/secondary_text_dark.xml b/app/src/main/res/color/secondary_text_dark.xml similarity index 100% rename from res/color/secondary_text_dark.xml rename to app/src/main/res/color/secondary_text_dark.xml diff --git a/res/drawable-hdpi/bg_btn_set_color.png b/app/src/main/res/drawable-hdpi/bg_btn_set_color.png similarity index 100% rename from res/drawable-hdpi/bg_btn_set_color.png rename to app/src/main/res/drawable-hdpi/bg_btn_set_color.png diff --git a/res/drawable-hdpi/bg_color_btn_mask.png b/app/src/main/res/drawable-hdpi/bg_color_btn_mask.png similarity index 100% rename from res/drawable-hdpi/bg_color_btn_mask.png rename to app/src/main/res/drawable-hdpi/bg_color_btn_mask.png diff --git a/res/drawable-hdpi/call_record.png b/app/src/main/res/drawable-hdpi/call_record.png similarity index 100% rename from res/drawable-hdpi/call_record.png rename to app/src/main/res/drawable-hdpi/call_record.png diff --git a/res/drawable-hdpi/clock.png b/app/src/main/res/drawable-hdpi/clock.png similarity index 100% rename from res/drawable-hdpi/clock.png rename to app/src/main/res/drawable-hdpi/clock.png diff --git a/res/drawable-hdpi/delete.png b/app/src/main/res/drawable-hdpi/delete.png similarity index 100% rename from res/drawable-hdpi/delete.png rename to app/src/main/res/drawable-hdpi/delete.png diff --git a/res/drawable-hdpi/dropdown_icon.9.png b/app/src/main/res/drawable-hdpi/dropdown_icon.9.png similarity index 100% rename from res/drawable-hdpi/dropdown_icon.9.png rename to app/src/main/res/drawable-hdpi/dropdown_icon.9.png diff --git a/res/drawable-hdpi/edit_blue.9.png b/app/src/main/res/drawable-hdpi/edit_blue.9.png similarity index 100% rename from res/drawable-hdpi/edit_blue.9.png rename to app/src/main/res/drawable-hdpi/edit_blue.9.png diff --git a/res/drawable-hdpi/edit_green.9.png b/app/src/main/res/drawable-hdpi/edit_green.9.png similarity index 100% rename from res/drawable-hdpi/edit_green.9.png rename to app/src/main/res/drawable-hdpi/edit_green.9.png diff --git a/res/drawable-hdpi/edit_red.9.png b/app/src/main/res/drawable-hdpi/edit_red.9.png similarity index 100% rename from res/drawable-hdpi/edit_red.9.png rename to app/src/main/res/drawable-hdpi/edit_red.9.png diff --git a/res/drawable-hdpi/edit_title_blue.9.png b/app/src/main/res/drawable-hdpi/edit_title_blue.9.png similarity index 100% rename from res/drawable-hdpi/edit_title_blue.9.png rename to app/src/main/res/drawable-hdpi/edit_title_blue.9.png diff --git a/res/drawable-hdpi/edit_title_green.9.png b/app/src/main/res/drawable-hdpi/edit_title_green.9.png similarity index 100% rename from res/drawable-hdpi/edit_title_green.9.png rename to app/src/main/res/drawable-hdpi/edit_title_green.9.png diff --git a/res/drawable-hdpi/edit_title_red.9.png b/app/src/main/res/drawable-hdpi/edit_title_red.9.png similarity index 100% rename from res/drawable-hdpi/edit_title_red.9.png rename to app/src/main/res/drawable-hdpi/edit_title_red.9.png diff --git a/res/drawable-hdpi/edit_title_white.9.png b/app/src/main/res/drawable-hdpi/edit_title_white.9.png similarity index 100% rename from res/drawable-hdpi/edit_title_white.9.png rename to app/src/main/res/drawable-hdpi/edit_title_white.9.png diff --git a/res/drawable-hdpi/edit_title_yellow.9.png b/app/src/main/res/drawable-hdpi/edit_title_yellow.9.png similarity index 100% rename from res/drawable-hdpi/edit_title_yellow.9.png rename to app/src/main/res/drawable-hdpi/edit_title_yellow.9.png diff --git a/res/drawable-hdpi/edit_white.9.png b/app/src/main/res/drawable-hdpi/edit_white.9.png similarity index 100% rename from res/drawable-hdpi/edit_white.9.png rename to app/src/main/res/drawable-hdpi/edit_white.9.png diff --git a/res/drawable-hdpi/edit_yellow.9.png b/app/src/main/res/drawable-hdpi/edit_yellow.9.png similarity index 100% rename from res/drawable-hdpi/edit_yellow.9.png rename to app/src/main/res/drawable-hdpi/edit_yellow.9.png diff --git a/res/drawable-hdpi/font_large.png b/app/src/main/res/drawable-hdpi/font_large.png similarity index 100% rename from res/drawable-hdpi/font_large.png rename to app/src/main/res/drawable-hdpi/font_large.png diff --git a/res/drawable-hdpi/font_normal.png b/app/src/main/res/drawable-hdpi/font_normal.png similarity index 100% rename from res/drawable-hdpi/font_normal.png rename to app/src/main/res/drawable-hdpi/font_normal.png diff --git a/res/drawable-hdpi/font_size_selector_bg.9.png b/app/src/main/res/drawable-hdpi/font_size_selector_bg.9.png similarity index 100% rename from res/drawable-hdpi/font_size_selector_bg.9.png rename to app/src/main/res/drawable-hdpi/font_size_selector_bg.9.png diff --git a/res/drawable-hdpi/font_small.png b/app/src/main/res/drawable-hdpi/font_small.png similarity index 100% rename from res/drawable-hdpi/font_small.png rename to app/src/main/res/drawable-hdpi/font_small.png diff --git a/res/drawable-hdpi/font_super.png b/app/src/main/res/drawable-hdpi/font_super.png similarity index 100% rename from res/drawable-hdpi/font_super.png rename to app/src/main/res/drawable-hdpi/font_super.png diff --git a/res/drawable-hdpi/icon_app.png b/app/src/main/res/drawable-hdpi/icon_app.png similarity index 100% rename from res/drawable-hdpi/icon_app.png rename to app/src/main/res/drawable-hdpi/icon_app.png diff --git a/res/drawable-hdpi/list_background.png b/app/src/main/res/drawable-hdpi/list_background.png similarity index 100% rename from res/drawable-hdpi/list_background.png rename to app/src/main/res/drawable-hdpi/list_background.png diff --git a/res/drawable-hdpi/list_blue_down.9.png b/app/src/main/res/drawable-hdpi/list_blue_down.9.png similarity index 100% rename from res/drawable-hdpi/list_blue_down.9.png rename to app/src/main/res/drawable-hdpi/list_blue_down.9.png diff --git a/res/drawable-hdpi/list_blue_middle.9.png b/app/src/main/res/drawable-hdpi/list_blue_middle.9.png similarity index 100% rename from res/drawable-hdpi/list_blue_middle.9.png rename to app/src/main/res/drawable-hdpi/list_blue_middle.9.png diff --git a/res/drawable-hdpi/list_blue_single.9.png b/app/src/main/res/drawable-hdpi/list_blue_single.9.png similarity index 100% rename from res/drawable-hdpi/list_blue_single.9.png rename to app/src/main/res/drawable-hdpi/list_blue_single.9.png diff --git a/res/drawable-hdpi/list_blue_up.9.png b/app/src/main/res/drawable-hdpi/list_blue_up.9.png similarity index 100% rename from res/drawable-hdpi/list_blue_up.9.png rename to app/src/main/res/drawable-hdpi/list_blue_up.9.png diff --git a/res/drawable-hdpi/list_folder.9.png b/app/src/main/res/drawable-hdpi/list_folder.9.png similarity index 100% rename from res/drawable-hdpi/list_folder.9.png rename to app/src/main/res/drawable-hdpi/list_folder.9.png diff --git a/res/drawable-hdpi/list_footer_bg.9.png b/app/src/main/res/drawable-hdpi/list_footer_bg.9.png similarity index 100% rename from res/drawable-hdpi/list_footer_bg.9.png rename to app/src/main/res/drawable-hdpi/list_footer_bg.9.png diff --git a/res/drawable-hdpi/list_green_down.9.png b/app/src/main/res/drawable-hdpi/list_green_down.9.png similarity index 100% rename from res/drawable-hdpi/list_green_down.9.png rename to app/src/main/res/drawable-hdpi/list_green_down.9.png diff --git a/res/drawable-hdpi/list_green_middle.9.png b/app/src/main/res/drawable-hdpi/list_green_middle.9.png similarity index 100% rename from res/drawable-hdpi/list_green_middle.9.png rename to app/src/main/res/drawable-hdpi/list_green_middle.9.png diff --git a/res/drawable-hdpi/list_green_single.9.png b/app/src/main/res/drawable-hdpi/list_green_single.9.png similarity index 100% rename from res/drawable-hdpi/list_green_single.9.png rename to app/src/main/res/drawable-hdpi/list_green_single.9.png diff --git a/res/drawable-hdpi/list_green_up.9.png b/app/src/main/res/drawable-hdpi/list_green_up.9.png similarity index 100% rename from res/drawable-hdpi/list_green_up.9.png rename to app/src/main/res/drawable-hdpi/list_green_up.9.png diff --git a/res/drawable-hdpi/list_red_down.9.png b/app/src/main/res/drawable-hdpi/list_red_down.9.png similarity index 100% rename from res/drawable-hdpi/list_red_down.9.png rename to app/src/main/res/drawable-hdpi/list_red_down.9.png diff --git a/res/drawable-hdpi/list_red_middle.9.png b/app/src/main/res/drawable-hdpi/list_red_middle.9.png similarity index 100% rename from res/drawable-hdpi/list_red_middle.9.png rename to app/src/main/res/drawable-hdpi/list_red_middle.9.png diff --git a/res/drawable-hdpi/list_red_single.9.png b/app/src/main/res/drawable-hdpi/list_red_single.9.png similarity index 100% rename from res/drawable-hdpi/list_red_single.9.png rename to app/src/main/res/drawable-hdpi/list_red_single.9.png diff --git a/res/drawable-hdpi/list_red_up.9.png b/app/src/main/res/drawable-hdpi/list_red_up.9.png similarity index 100% rename from res/drawable-hdpi/list_red_up.9.png rename to app/src/main/res/drawable-hdpi/list_red_up.9.png diff --git a/res/drawable-hdpi/list_white_down.9.png b/app/src/main/res/drawable-hdpi/list_white_down.9.png similarity index 100% rename from res/drawable-hdpi/list_white_down.9.png rename to app/src/main/res/drawable-hdpi/list_white_down.9.png diff --git a/res/drawable-hdpi/list_white_middle.9.png b/app/src/main/res/drawable-hdpi/list_white_middle.9.png similarity index 100% rename from res/drawable-hdpi/list_white_middle.9.png rename to app/src/main/res/drawable-hdpi/list_white_middle.9.png diff --git a/res/drawable-hdpi/list_white_single.9.png b/app/src/main/res/drawable-hdpi/list_white_single.9.png similarity index 100% rename from res/drawable-hdpi/list_white_single.9.png rename to app/src/main/res/drawable-hdpi/list_white_single.9.png diff --git a/res/drawable-hdpi/list_white_up.9.png b/app/src/main/res/drawable-hdpi/list_white_up.9.png similarity index 100% rename from res/drawable-hdpi/list_white_up.9.png rename to app/src/main/res/drawable-hdpi/list_white_up.9.png diff --git a/res/drawable-hdpi/list_yellow_down.9.png b/app/src/main/res/drawable-hdpi/list_yellow_down.9.png similarity index 100% rename from res/drawable-hdpi/list_yellow_down.9.png rename to app/src/main/res/drawable-hdpi/list_yellow_down.9.png diff --git a/res/drawable-hdpi/list_yellow_middle.9.png b/app/src/main/res/drawable-hdpi/list_yellow_middle.9.png similarity index 100% rename from res/drawable-hdpi/list_yellow_middle.9.png rename to app/src/main/res/drawable-hdpi/list_yellow_middle.9.png diff --git a/res/drawable-hdpi/list_yellow_single.9.png b/app/src/main/res/drawable-hdpi/list_yellow_single.9.png similarity index 100% rename from res/drawable-hdpi/list_yellow_single.9.png rename to app/src/main/res/drawable-hdpi/list_yellow_single.9.png diff --git a/res/drawable-hdpi/list_yellow_up.9.png b/app/src/main/res/drawable-hdpi/list_yellow_up.9.png similarity index 100% rename from res/drawable-hdpi/list_yellow_up.9.png rename to app/src/main/res/drawable-hdpi/list_yellow_up.9.png diff --git a/res/drawable-hdpi/menu_delete.png b/app/src/main/res/drawable-hdpi/menu_delete.png similarity index 100% rename from res/drawable-hdpi/menu_delete.png rename to app/src/main/res/drawable-hdpi/menu_delete.png diff --git a/res/drawable-hdpi/menu_move.png b/app/src/main/res/drawable-hdpi/menu_move.png similarity index 100% rename from res/drawable-hdpi/menu_move.png rename to app/src/main/res/drawable-hdpi/menu_move.png diff --git a/res/drawable-hdpi/new_note_normal.png b/app/src/main/res/drawable-hdpi/new_note_normal.png similarity index 100% rename from res/drawable-hdpi/new_note_normal.png rename to app/src/main/res/drawable-hdpi/new_note_normal.png diff --git a/res/drawable-hdpi/new_note_pressed.png b/app/src/main/res/drawable-hdpi/new_note_pressed.png similarity index 100% rename from res/drawable-hdpi/new_note_pressed.png rename to app/src/main/res/drawable-hdpi/new_note_pressed.png diff --git a/res/drawable-hdpi/note_edit_color_selector_panel.png b/app/src/main/res/drawable-hdpi/note_edit_color_selector_panel.png similarity index 100% rename from res/drawable-hdpi/note_edit_color_selector_panel.png rename to app/src/main/res/drawable-hdpi/note_edit_color_selector_panel.png diff --git a/res/drawable-hdpi/notification.png b/app/src/main/res/drawable-hdpi/notification.png similarity index 100% rename from res/drawable-hdpi/notification.png rename to app/src/main/res/drawable-hdpi/notification.png diff --git a/res/drawable-hdpi/search_result.png b/app/src/main/res/drawable-hdpi/search_result.png similarity index 100% rename from res/drawable-hdpi/search_result.png rename to app/src/main/res/drawable-hdpi/search_result.png diff --git a/res/drawable-hdpi/selected.png b/app/src/main/res/drawable-hdpi/selected.png similarity index 100% rename from res/drawable-hdpi/selected.png rename to app/src/main/res/drawable-hdpi/selected.png diff --git a/res/drawable-hdpi/title_alert.png b/app/src/main/res/drawable-hdpi/title_alert.png similarity index 100% rename from res/drawable-hdpi/title_alert.png rename to app/src/main/res/drawable-hdpi/title_alert.png diff --git a/res/drawable-hdpi/title_bar_bg.9.png b/app/src/main/res/drawable-hdpi/title_bar_bg.9.png similarity index 100% rename from res/drawable-hdpi/title_bar_bg.9.png rename to app/src/main/res/drawable-hdpi/title_bar_bg.9.png diff --git a/res/drawable-hdpi/widget_2x_blue.png b/app/src/main/res/drawable-hdpi/widget_2x_blue.png similarity index 100% rename from res/drawable-hdpi/widget_2x_blue.png rename to app/src/main/res/drawable-hdpi/widget_2x_blue.png diff --git a/res/drawable-hdpi/widget_2x_green.png b/app/src/main/res/drawable-hdpi/widget_2x_green.png similarity index 100% rename from res/drawable-hdpi/widget_2x_green.png rename to app/src/main/res/drawable-hdpi/widget_2x_green.png diff --git a/res/drawable-hdpi/widget_2x_red.png b/app/src/main/res/drawable-hdpi/widget_2x_red.png similarity index 100% rename from res/drawable-hdpi/widget_2x_red.png rename to app/src/main/res/drawable-hdpi/widget_2x_red.png diff --git a/res/drawable-hdpi/widget_2x_white.png b/app/src/main/res/drawable-hdpi/widget_2x_white.png similarity index 100% rename from res/drawable-hdpi/widget_2x_white.png rename to app/src/main/res/drawable-hdpi/widget_2x_white.png diff --git a/res/drawable-hdpi/widget_2x_yellow.png b/app/src/main/res/drawable-hdpi/widget_2x_yellow.png similarity index 100% rename from res/drawable-hdpi/widget_2x_yellow.png rename to app/src/main/res/drawable-hdpi/widget_2x_yellow.png diff --git a/res/drawable-hdpi/widget_4x_blue.png b/app/src/main/res/drawable-hdpi/widget_4x_blue.png similarity index 100% rename from res/drawable-hdpi/widget_4x_blue.png rename to app/src/main/res/drawable-hdpi/widget_4x_blue.png diff --git a/res/drawable-hdpi/widget_4x_green.png b/app/src/main/res/drawable-hdpi/widget_4x_green.png similarity index 100% rename from res/drawable-hdpi/widget_4x_green.png rename to app/src/main/res/drawable-hdpi/widget_4x_green.png diff --git a/res/drawable-hdpi/widget_4x_red.png b/app/src/main/res/drawable-hdpi/widget_4x_red.png similarity index 100% rename from res/drawable-hdpi/widget_4x_red.png rename to app/src/main/res/drawable-hdpi/widget_4x_red.png diff --git a/res/drawable-hdpi/widget_4x_white.png b/app/src/main/res/drawable-hdpi/widget_4x_white.png similarity index 100% rename from res/drawable-hdpi/widget_4x_white.png rename to app/src/main/res/drawable-hdpi/widget_4x_white.png diff --git a/res/drawable-hdpi/widget_4x_yellow.png b/app/src/main/res/drawable-hdpi/widget_4x_yellow.png similarity index 100% rename from res/drawable-hdpi/widget_4x_yellow.png rename to app/src/main/res/drawable-hdpi/widget_4x_yellow.png diff --git a/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from res/drawable/ic_launcher_background.xml rename to app/src/main/res/drawable/ic_launcher_background.xml diff --git a/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml similarity index 100% rename from res/drawable/ic_launcher_foreground.xml rename to app/src/main/res/drawable/ic_launcher_foreground.xml diff --git a/res/drawable/new_note.xml b/app/src/main/res/drawable/new_note.xml similarity index 100% rename from res/drawable/new_note.xml rename to app/src/main/res/drawable/new_note.xml diff --git a/res/layout/account_dialog_title.xml b/app/src/main/res/layout/account_dialog_title.xml similarity index 100% rename from res/layout/account_dialog_title.xml rename to app/src/main/res/layout/account_dialog_title.xml diff --git a/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml similarity index 100% rename from res/layout/activity_main.xml rename to app/src/main/res/layout/activity_main.xml diff --git a/res/layout/add_account_text.xml b/app/src/main/res/layout/add_account_text.xml similarity index 100% rename from res/layout/add_account_text.xml rename to app/src/main/res/layout/add_account_text.xml diff --git a/res/layout/datetime_picker.xml b/app/src/main/res/layout/datetime_picker.xml similarity index 100% rename from res/layout/datetime_picker.xml rename to app/src/main/res/layout/datetime_picker.xml diff --git a/res/layout/dialog_edit_text.xml b/app/src/main/res/layout/dialog_edit_text.xml similarity index 100% rename from res/layout/dialog_edit_text.xml rename to app/src/main/res/layout/dialog_edit_text.xml diff --git a/res/layout/folder_list_item.xml b/app/src/main/res/layout/folder_list_item.xml similarity index 100% rename from res/layout/folder_list_item.xml rename to app/src/main/res/layout/folder_list_item.xml diff --git a/res/layout/note_edit.xml b/app/src/main/res/layout/note_edit.xml similarity index 100% rename from res/layout/note_edit.xml rename to app/src/main/res/layout/note_edit.xml diff --git a/res/layout/note_edit_list_item.xml b/app/src/main/res/layout/note_edit_list_item.xml similarity index 100% rename from res/layout/note_edit_list_item.xml rename to app/src/main/res/layout/note_edit_list_item.xml diff --git a/res/layout/note_item.xml b/app/src/main/res/layout/note_item.xml similarity index 100% rename from res/layout/note_item.xml rename to app/src/main/res/layout/note_item.xml diff --git a/res/layout/note_list.xml b/app/src/main/res/layout/note_list.xml similarity index 100% rename from res/layout/note_list.xml rename to app/src/main/res/layout/note_list.xml diff --git a/res/layout/note_list_dropdown_menu.xml b/app/src/main/res/layout/note_list_dropdown_menu.xml similarity index 100% rename from res/layout/note_list_dropdown_menu.xml rename to app/src/main/res/layout/note_list_dropdown_menu.xml diff --git a/res/layout/note_list_footer.xml b/app/src/main/res/layout/note_list_footer.xml similarity index 100% rename from res/layout/note_list_footer.xml rename to app/src/main/res/layout/note_list_footer.xml diff --git a/res/layout/settings_header.xml b/app/src/main/res/layout/settings_header.xml similarity index 100% rename from res/layout/settings_header.xml rename to app/src/main/res/layout/settings_header.xml diff --git a/res/layout/widget_2x.xml b/app/src/main/res/layout/widget_2x.xml similarity index 100% rename from res/layout/widget_2x.xml rename to app/src/main/res/layout/widget_2x.xml diff --git a/res/layout/widget_4x.xml b/app/src/main/res/layout/widget_4x.xml similarity index 100% rename from res/layout/widget_4x.xml rename to app/src/main/res/layout/widget_4x.xml diff --git a/res/menu/call_note_edit.xml b/app/src/main/res/menu/call_note_edit.xml similarity index 100% rename from res/menu/call_note_edit.xml rename to app/src/main/res/menu/call_note_edit.xml diff --git a/res/menu/call_record_folder.xml b/app/src/main/res/menu/call_record_folder.xml similarity index 100% rename from res/menu/call_record_folder.xml rename to app/src/main/res/menu/call_record_folder.xml diff --git a/res/menu/note_edit.xml b/app/src/main/res/menu/note_edit.xml similarity index 100% rename from res/menu/note_edit.xml rename to app/src/main/res/menu/note_edit.xml diff --git a/res/menu/note_list.xml b/app/src/main/res/menu/note_list.xml similarity index 100% rename from res/menu/note_list.xml rename to app/src/main/res/menu/note_list.xml diff --git a/res/menu/note_list_dropdown.xml b/app/src/main/res/menu/note_list_dropdown.xml similarity index 100% rename from res/menu/note_list_dropdown.xml rename to app/src/main/res/menu/note_list_dropdown.xml diff --git a/res/menu/note_list_options.xml b/app/src/main/res/menu/note_list_options.xml similarity index 100% rename from res/menu/note_list_options.xml rename to app/src/main/res/menu/note_list_options.xml diff --git a/res/menu/sub_folder.xml b/app/src/main/res/menu/sub_folder.xml similarity index 100% rename from res/menu/sub_folder.xml rename to app/src/main/res/menu/sub_folder.xml diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000..c209e78 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000..b2dfe3d Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000..4f0f1d6 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..62b611d Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000..948a307 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..1b9a695 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..28d4b77 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9287f50 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..aa7d642 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9126ae3 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/res/raw-zh-rCN/introduction b/app/src/main/res/raw-zh-rCN/introduction similarity index 100% rename from res/raw-zh-rCN/introduction rename to app/src/main/res/raw-zh-rCN/introduction diff --git a/res/raw/introduction b/app/src/main/res/raw/introduction similarity index 100% rename from res/raw/introduction rename to app/src/main/res/raw/introduction diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..ad0fd96 --- /dev/null +++ b/app/src/main/res/values-night/themes.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/res/values-zh-rCN/arrays.xml b/app/src/main/res/values-zh-rCN/arrays.xml similarity index 100% rename from res/values-zh-rCN/arrays.xml rename to app/src/main/res/values-zh-rCN/arrays.xml diff --git a/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml similarity index 100% rename from res/values-zh-rCN/strings.xml rename to app/src/main/res/values-zh-rCN/strings.xml diff --git a/res/values-zh-rTW/arrays.xml b/app/src/main/res/values-zh-rTW/arrays.xml similarity index 100% rename from res/values-zh-rTW/arrays.xml rename to app/src/main/res/values-zh-rTW/arrays.xml diff --git a/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml similarity index 100% rename from res/values-zh-rTW/strings.xml rename to app/src/main/res/values-zh-rTW/strings.xml diff --git a/res/values/arrays.xml b/app/src/main/res/values/arrays.xml similarity index 100% rename from res/values/arrays.xml rename to app/src/main/res/values/arrays.xml diff --git a/res/values/colors.xml b/app/src/main/res/values/colors.xml similarity index 100% rename from res/values/colors.xml rename to app/src/main/res/values/colors.xml diff --git a/res/values/dimens.xml b/app/src/main/res/values/dimens.xml similarity index 100% rename from res/values/dimens.xml rename to app/src/main/res/values/dimens.xml diff --git a/res/values/strings.xml b/app/src/main/res/values/strings.xml similarity index 100% rename from res/values/strings.xml rename to app/src/main/res/values/strings.xml diff --git a/res/values/styles.xml b/app/src/main/res/values/styles.xml similarity index 100% rename from res/values/styles.xml rename to app/src/main/res/values/styles.xml diff --git a/res/values/themes.xml b/app/src/main/res/values/themes.xml similarity index 57% rename from res/values/themes.xml rename to app/src/main/res/values/themes.xml index 65db06a..aa02b68 100644 --- a/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -1,9 +1,9 @@ - -