Compare commits
12 Commits
4c9fa6b5e5
...
90fd30adb8
Author | SHA1 | Date |
---|---|---|
LiuSC | 90fd30adb8 | 6 months ago |
LiuSC | fb33c655d6 | 6 months ago |
LiuSC | e05531a922 | 7 months ago |
LiuSC | ab7581d899 | 7 months ago |
LiuSC | 10d5b7da9e | 7 months ago |
LiuSC | d6d7f1b120 | 7 months ago |
LiuSC | bc759dc067 | 7 months ago |
LiuSC | 6615a5c7d6 | 7 months ago |
LiuSC | cd6857db6a | 7 months ago |
LiuSC | 81a72cc150 | 7 months ago |
LiuSC | 4971d65365 | 7 months ago |
LiuSC | 00ad41d628 | 7 months ago |
@ -1,3 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/Notes-master.iml" filepath="$PROJECT_DIR$/Notes-master.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -1 +0,0 @@
|
||||
Welcome to use MIUI notes!
|
@ -0,0 +1 @@
|
||||
表示需要提交的文档
|
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 148 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 129 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 143 KiB |
@ -0,0 +1 @@
|
||||
表示需要提交的文档
|
@ -0,0 +1 @@
|
||||
表示需要提交的文档
|
@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="net.micode.notes"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="16" />
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
||||
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
|
||||
<application
|
||||
android:icon="@drawable/icon_app"
|
||||
android:label="@string/app_name"
|
||||
tools:ignore="ExtraText">
|
||||
|
||||
<!-- 其他声明 -->
|
||||
<activity
|
||||
android:name=".ui.ShowResultActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
|
||||
android:label="Show Result" />
|
||||
<!-- 其他声明 -->
|
||||
|
||||
|
||||
<activity
|
||||
android:name=".ui.SplashActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:theme="@style/Theme.Notes1.Fullscreen">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.NotesListActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
|
||||
android:uiOptions="splitActionBarWhenNarrow"
|
||||
android:windowSoftInputMode="adjustPan"></activity>
|
||||
<activity
|
||||
android:name=".ui.NoteEditActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Theme.AppCompat.Light.DarkActionBar">
|
||||
|
||||
<!-- android:theme="@style/NoteTheme" -->
|
||||
|
||||
<intent-filter tools:ignore="AppLinkUrlError">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:mimeType="vnd.android.cursor.item/text_note" />
|
||||
<data android:mimeType="vnd.android.cursor.item/call_note" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.INSERT_OR_EDIT" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:mimeType="vnd.android.cursor.item/text_note" />
|
||||
<data android:mimeType="vnd.android.cursor.item/call_note" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEARCH" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.app.searchable"
|
||||
android:resource="@xml/searchable" />
|
||||
</activity>
|
||||
|
||||
<provider
|
||||
android:name=".data.NotesProvider"
|
||||
android:authorities="micode_notes"
|
||||
android:multiprocess="true" />
|
||||
|
||||
<receiver
|
||||
android:name=".widget.NoteWidgetProvider_2x"
|
||||
android:label="@string/app_widget2x2">
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
|
||||
<action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.appwidget.provider"
|
||||
android:resource="@xml/widget_2x_info" />
|
||||
</receiver>
|
||||
<receiver
|
||||
android:name=".widget.NoteWidgetProvider_4x"
|
||||
android:label="@string/app_widget4x4">
|
||||
<intent-filter>
|
||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
|
||||
<action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.appwidget.provider"
|
||||
android:resource="@xml/widget_4x_info" />
|
||||
</receiver>
|
||||
<receiver android:name=".ui.AlarmInitReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver
|
||||
android:name=".ui.AlarmReceiver"
|
||||
android:process=":remote"></receiver>
|
||||
|
||||
<activity
|
||||
android:name=".ui.AlarmAlertActivity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleInstance"
|
||||
android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar"></activity>
|
||||
<activity
|
||||
android:name=".ui.NotesPreferenceActivity"
|
||||
android:label="@string/preferences_title"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@android:style/Theme.Holo.Light"></activity>
|
||||
|
||||
<service
|
||||
android:name=".gtask.remote.GTaskSyncService"
|
||||
android:exported="false"></service>
|
||||
|
||||
<meta-data
|
||||
android:name="android.app.default_searchable"
|
||||
android:value=".ui.NoteEditActivity" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,136 @@
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.micode.notes.R;
|
||||
|
||||
|
||||
public class EditDialog extends Dialog {
|
||||
private Button yes, no; // 确定按钮和取消按钮
|
||||
private TextView titleTv; // 消息标题文本视图
|
||||
private EditText et_key; // 输入密码的编辑文本框
|
||||
private String titleStr; // 外界设置的标题文本
|
||||
private String messageStr; // 外界设置的消息文本
|
||||
private String yesStr, noStr; // 确定按钮和取消按钮的显示内容
|
||||
|
||||
private onNoOnclickListener noOnclickListener; // 取消按钮被点击了的监听器
|
||||
private onYesOnclickListener yesOnclickListener; // 确定按钮被点击了的监听器
|
||||
|
||||
// 设置取消按钮的显示内容和监听
|
||||
public void setNoOnclickListener(String str, onNoOnclickListener onNoOnclickListener) {
|
||||
if (str != null) {
|
||||
noStr = str;
|
||||
}
|
||||
this.noOnclickListener = onNoOnclickListener;
|
||||
}
|
||||
|
||||
// 设置确定按钮的显示内容和监听
|
||||
public void setYesOnclickListener(String str, onYesOnclickListener onYesOnclickListener) {
|
||||
if (str != null) {
|
||||
yesStr = str;
|
||||
}
|
||||
this.yesOnclickListener = onYesOnclickListener;
|
||||
}
|
||||
|
||||
public EditDialog(Context context) {
|
||||
super(context, R.style.Dialog_Msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.dialog_edit);
|
||||
setCanceledOnTouchOutside(false); // 点击空白处不能取消动画
|
||||
|
||||
// 初始化界面控件
|
||||
initView();
|
||||
// 初始化界面数据
|
||||
initData();
|
||||
// 初始化界面控件的事件
|
||||
initEvent();
|
||||
}
|
||||
|
||||
// 初始化界面的确定和取消监听器
|
||||
private void initEvent() {
|
||||
// 设置确定按钮被点击后的监听器
|
||||
yes.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (yesOnclickListener != null) {
|
||||
// 回调确定按钮被点击的方法,并传递输入的密码
|
||||
yesOnclickListener.onYesClick(et_key.getText().toString());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 设置取消按钮被点击后的监听器
|
||||
no.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (noOnclickListener != null) {
|
||||
// 回调取消按钮被点击的方法
|
||||
noOnclickListener.onNoClick();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化界面控件的显示数据
|
||||
private void initData() {
|
||||
// 如果用户自定了title
|
||||
if (titleStr != null) {
|
||||
titleTv.setText(titleStr);
|
||||
}
|
||||
// 如果设置了确定按钮的文字
|
||||
if (yesStr != null) {
|
||||
yes.setText(yesStr);
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化界面控件
|
||||
private void initView() {
|
||||
yes = findViewById(R.id.yes);
|
||||
no = findViewById(R.id.no);
|
||||
titleTv = findViewById(R.id.title);
|
||||
et_key = findViewById(R.id.et_phone);
|
||||
}
|
||||
|
||||
// 从外部Activity为Dialog设置标题
|
||||
public void setTitle(String title) {
|
||||
titleStr = title;
|
||||
}
|
||||
|
||||
// 从外部Activity为Dialog设置消息
|
||||
public void setMessage(String message) {
|
||||
messageStr = message;
|
||||
}
|
||||
|
||||
// 确定按钮被点击的接口
|
||||
public interface onYesOnclickListener {
|
||||
void onYesClick(String key);
|
||||
}
|
||||
|
||||
// 取消按钮被点击的接口
|
||||
public interface onNoOnclickListener {
|
||||
void onNoClick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
super.show();
|
||||
// 设置对话框的宽度和高度为全屏
|
||||
WindowManager.LayoutParams layoutParams = getWindow().getAttributes();
|
||||
layoutParams.width = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT;
|
||||
getWindow().getDecorView().setPadding(0, 0, 0, 0);
|
||||
getWindow().setAttributes(layoutParams);
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
public class LoginActivity extends Activity {
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 443 B After Width: | Height: | Size: 443 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |