diff --git a/MiNote/app/build.gradle.kts b/MiNote/app/build.gradle.kts index 0c131fd..db14589 100644 --- a/MiNote/app/build.gradle.kts +++ b/MiNote/app/build.gradle.kts @@ -54,7 +54,8 @@ dependencies { //noinspection GradlePath implementation(files("E:\\AndroidProjects\\MiNote_Rewrite\\MiNote\\httpcomponents-client-4.5.14-bin\\lib\\httpclient-osgi-4.5.14.jar")) implementation(files("E:\\AndroidProjects\\MiNote_Rewrite\\MiNote\\httpcomponents-client-4.5.14-bin\\lib\\httpclient-win-4.5.14.jar")) - implementation(files("E:\\AndroidProjects\\MiNote_Rewrite\\MiNote\\httpcomponents-client-4.5.14-bin\\lib\\httpcore-4.4.16.jar")) + implementation(files("E:/AndroidProjects/MiNote_Rewrite/MiNote/httpcomponents-client-4.5.14-bin/lib/httpcore-4.4.16.jar")) + implementation("jp.wasabeef:richeditor-android:2.0.0") // implementation(fileTree(mapOf( // "dir" to "E:\\AndroidProjects\\MiNote_Rewrite\\MiNote\\httpcomponents-client-4.5.14-bin\\lib", // "include" to listOf("*.aar", "*.jar"), diff --git a/MiNote/app/src/main/AndroidManifest.xml b/MiNote/app/src/main/AndroidManifest.xml index 0407c61..1c01460 100644 --- a/MiNote/app/src/main/AndroidManifest.xml +++ b/MiNote/app/src/main/AndroidManifest.xml @@ -23,46 +23,52 @@ android:supportsRtl="true" android:theme="@style/Theme.MiNote" tools:targetApi="31"> + + + + + + - - - - - + android:windowSoftInputMode="adjustPan"> - - + android:theme="@style/Theme.AppCompat.Light.DarkActionBar"> + + - + + - + @@ -71,16 +77,15 @@ android:resource="@xml/searchable" /> - + android:exported="true" + android:label="@string/app_widget2x2"> @@ -93,9 +98,8 @@ - + android:exported="true" + android:label="@string/app_widget4x4"> @@ -106,52 +110,35 @@ android:name="android.appwidget.provider" android:resource="@xml/widget_4x_info" /> - - - - + android:name=".ui.AlarmReceiver" + android:process=":remote" /> - - + android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar" /> - + android:theme="@android:style/Theme.Holo.Light" /> - + android:name=".gtask.remote.GTaskSyncService" + android:exported="false" /> - - - - - - - - - - - \ No newline at end of file diff --git a/MiNote/app/src/main/java/net/micode/notes/ui/LoginActivity.java b/MiNote/app/src/main/java/net/micode/notes/ui/LoginActivity.java new file mode 100644 index 0000000..217045b --- /dev/null +++ b/MiNote/app/src/main/java/net/micode/notes/ui/LoginActivity.java @@ -0,0 +1,72 @@ +package net.micode.notes.ui; + +import android.app.Activity; +import android.app.ProgressDialog; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.Toast; + +import androidx.activity.EdgeToEdge; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.graphics.Insets; +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowInsetsCompat; + +import net.micode.notes.R; + +public class LoginActivity extends Activity { + private EditText accountEdict; + private EditText passwordEdict; + private Button login; + private Button cancel; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); +// EdgeToEdge.enable(this); + setContentView(R.layout.activity_login); + accountEdict = (EditText) findViewById(R.id.account); + accountEdict.setSingleLine(); + passwordEdict = (EditText) findViewById(R.id.password); + passwordEdict.setSingleLine(); + login = (Button) findViewById(R.id.login); + cancel = (Button) findViewById(R.id.cancel); + cancel.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Toast.makeText(LoginActivity.this,R.string.app_already_quit,Toast.LENGTH_LONG).show(); + finish(); + } + }); + login.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + String account = accountEdict.getText().toString(); + String password = passwordEdict.getText().toString(); + + + if(account.equals("czx") && password.equals("123456")){ + AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this); + builder.setMessage(getString(R.string.Loading)); + builder.setCancelable(true); + AlertDialog progressDialog = builder.create(); + progressDialog.show(); + + Intent intent = new Intent(LoginActivity.this,NotesListActivity.class); + startActivity(intent); + finish(); + }else { + Toast.makeText(LoginActivity.this, R.string.invalid,Toast.LENGTH_SHORT).show(); + } + } + }); +// 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/MiNote/app/src/main/res/drawable-hdpi/saying.jpg b/MiNote/app/src/main/res/drawable-hdpi/saying.jpg deleted file mode 100644 index 1ec26af..0000000 Binary files a/MiNote/app/src/main/res/drawable-hdpi/saying.jpg and /dev/null differ diff --git a/MiNote/app/src/main/res/layout/activity_login.xml b/MiNote/app/src/main/res/layout/activity_login.xml new file mode 100644 index 0000000..cdd335a --- /dev/null +++ b/MiNote/app/src/main/res/layout/activity_login.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + +