修复功能不全的bug,文档命名更改

yt_branch
HZXhuang 2 years ago
parent 27387e8327
commit 77226b5ad9

@ -19,7 +19,8 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="net.micode.notes" package="net.micode.notes"
android:versionCode="1" android:versionCode="1"
android:versionName="0.1" > android:versionName="0.1"
tools:ignore="GradleOverrides">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" /> <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
@ -36,24 +37,34 @@
android:label="@string/app_name"> android:label="@string/app_name">
<activity <activity
android:name=".ui.NotesListActivity" android:name=".ui.NotesListActivity"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|navigation"
android:label="@string/app_name" android:label="@string/app_name"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/NoteTheme" android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
android:uiOptions="splitActionBarWhenNarrow" android:uiOptions="splitActionBarWhenNarrow"
android:exported="true"
android:windowSoftInputMode="adjustPan" > android:windowSoftInputMode="adjustPan" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </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" />
<meta-data android:name="android.app.default_searchable"
android:value=".ui.NotesListActivity" />
</activity> </activity>
<activity <activity
android:exported="true"
android:name=".ui.NoteEditActivity" android:name=".ui.NoteEditActivity"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/NoteTheme" > android:theme="@style/Theme.AppCompat.Light.DarkActionBar" >
<intent-filter android:scheme="http" <intent-filter android:scheme="http"
tools:ignore="AppLinkUrlError"> tools:ignore="AppLinkUrlError">
@ -83,9 +94,11 @@
<provider <provider
android:name="net.micode.notes.data.NotesProvider" android:name="net.micode.notes.data.NotesProvider"
android:authorities="micode_notes" android:authorities="micode_notes"
android:multiprocess="true" /> android:multiprocess="true"
android:exported="false" />
<receiver <receiver
android:exported="false"
android:name=".widget.NoteWidgetProvider_2x" android:name=".widget.NoteWidgetProvider_2x"
android:label="@string/app_widget2x2" > android:label="@string/app_widget2x2" >
<intent-filter> <intent-filter>
@ -99,6 +112,7 @@
android:resource="@xml/widget_2x_info" /> android:resource="@xml/widget_2x_info" />
</receiver> </receiver>
<receiver <receiver
android:exported="false"
android:name=".widget.NoteWidgetProvider_4x" android:name=".widget.NoteWidgetProvider_4x"
android:label="@string/app_widget4x4" > android:label="@string/app_widget4x4" >
@ -113,18 +127,20 @@
android:resource="@xml/widget_4x_info" /> android:resource="@xml/widget_4x_info" />
</receiver> </receiver>
<receiver android:name=".ui.AlarmInitReceiver" > <receiver android:name=".ui.AlarmInitReceiver" android:exported="false">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<receiver <receiver
android:exported="false"
android:name="net.micode.notes.ui.AlarmReceiver" android:name="net.micode.notes.ui.AlarmReceiver"
android:process=":remote" > android:process=":remote" >
</receiver> </receiver>
<activity <activity
android:exported="true"
android:name=".ui.AlarmAlertActivity" android:name=".ui.AlarmAlertActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:launchMode="singleInstance" android:launchMode="singleInstance"
@ -132,10 +148,12 @@
</activity> </activity>
<activity <activity
android:exported="true"
android:name="net.micode.notes.ui.NotesPreferenceActivity" android:name="net.micode.notes.ui.NotesPreferenceActivity"
android:label="@string/preferences_title" android:label="@string/preferences_title"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@android:style/Theme.Holo.Light" > android:theme="@android:style/Theme.Holo.Light" >
</activity> </activity>
<service <service

@ -52,6 +52,8 @@ import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import net.micode.notes.R; import net.micode.notes.R;
import net.micode.notes.data.Notes; import net.micode.notes.data.Notes;
import net.micode.notes.data.Notes.TextNote; import net.micode.notes.data.Notes.TextNote;
@ -72,7 +74,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
public class NoteEditActivity extends Activity implements OnClickListener, public class NoteEditActivity extends AppCompatActivity implements OnClickListener,
NoteSettingChangedListener, OnTextViewChangeListener { NoteSettingChangedListener, OnTextViewChangeListener {
private class HeadViewHolder { private class HeadViewHolder {
public TextView tvModified; public TextView tvModified;

@ -37,7 +37,7 @@ import net.micode.notes.R;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class NoteEditText extends EditText { public class NoteEditText extends androidx.appcompat.widget.AppCompatEditText {
private static final String TAG = "NoteEditText"; private static final String TAG = "NoteEditText";
private int mIndex; private int mIndex;
private int mSelectionStartBeforeDelete; private int mSelectionStartBeforeDelete;

@ -19,6 +19,7 @@ package net.micode.notes.ui;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
import android.app.SearchManager;
import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetManager;
import android.content.AsyncQueryHandler; import android.content.AsyncQueryHandler;
import android.content.ContentResolver; import android.content.ContentResolver;
@ -60,6 +61,8 @@ import android.widget.PopupMenu;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import net.micode.notes.R; import net.micode.notes.R;
import net.micode.notes.data.Notes; import net.micode.notes.data.Notes;
import net.micode.notes.data.Notes.NoteColumns; import net.micode.notes.data.Notes.NoteColumns;
@ -78,7 +81,7 @@ import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.util.HashSet; import java.util.HashSet;
public class NotesListActivity extends Activity implements OnClickListener, OnItemLongClickListener { public class NotesListActivity extends AppCompatActivity implements OnClickListener, OnItemLongClickListener {
private static final int FOLDER_NOTE_LIST_QUERY_TOKEN = 0; private static final int FOLDER_NOTE_LIST_QUERY_TOKEN = 0;
private static final int FOLDER_LIST_QUERY_TOKEN = 1; private static final int FOLDER_LIST_QUERY_TOKEN = 1;
@ -145,6 +148,31 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
* Insert an introduction when user firstly use this application * Insert an introduction when user firstly use this application
*/ */
setAppInfoFromRawRes(); setAppInfoFromRawRes();
handleIntent(getIntent());
}
/**
* intent
* @param intent
*/
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
handleIntent(intent);
}
/**
*
* @param intent
*/
private void handleIntent(Intent intent) {
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
String query = intent.getStringExtra(SearchManager.QUERY);
System.out.println(query);
}
} }
@Override @Override
@ -820,10 +848,13 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
@Override @Override
public boolean onSearchRequested() { public boolean onSearchRequested() {
startSearch(null, false, null /* appData */, false); Bundle appData = new Bundle();
appData.putString(SearchManager.USER_QUERY, "明天");
startSearch(null, false, appData /* appData */, false);
return true; return true;
} }
private void exportNoteToText() { private void exportNoteToText() {
final BackupUtils backup = BackupUtils.getInstance(NotesListActivity.this); final BackupUtils backup = BackupUtils.getInstance(NotesListActivity.this);
new AsyncTask<Void, Void, Integer>() { new AsyncTask<Void, Void, Integer>() {

@ -45,7 +45,7 @@
android:cacheColorHint="@null" android:cacheColorHint="@null"
android:listSelector="@android:color/transparent" android:listSelector="@android:color/transparent"
android:divider="@null" android:divider="@null"
android:fadingEdge="@null" /> android:fadingEdge="none" />
</LinearLayout> </LinearLayout>
<Button <Button

@ -12,6 +12,10 @@ buildscript {
} }
} }
plugins {
id "org.sonarqube" version "2.7"
}
allprojects { allprojects {
repositories { repositories {
google() google()

Loading…
Cancel
Save