Compare commits
16 Commits
李秋锦_branch
...
MASTER
Author | SHA1 | Date |
---|---|---|
pgy6mavf3 | 3e900dd726 | 6 months ago |
名称 | 372f05d3fa | 6 months ago |
pgy6mavf3 | e0c9665afc | 6 months ago |
名称 | f64dfe25e8 | 6 months ago |
pgy6mavf3 | 2eee737c1f | 6 months ago |
名称 | 748f96f2aa | 6 months ago |
pgy6mavf3 | 97b752f0b0 | 6 months ago |
名称 | bb06a39cee | 6 months ago |
名称 | 2c22ada31e | 6 months ago |
pgy6mavf3 | 4b01238ec6 | 6 months ago |
名称 | c9a062d241 | 6 months ago |
pgy6mavf3 | 457b6c75ad | 7 months ago |
名称 | 73160564c7 | 7 months ago |
pgy6mavf3 | 77ff94186b | 7 months ago |
名称 | 64a229a758 | 7 months ago |
名称 | c09592a63e | 7 months ago |
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/ReadCodeAndAnalyse.iml" filepath="$PROJECT_DIR$/ReadCodeAndAnalyse.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -1,9 +0,0 @@
|
||||
# generated files
|
||||
bin/
|
||||
gen/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
project.properties
|
||||
.settings/
|
||||
.classpath
|
||||
.project
|
@ -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
|
||||
|
@ -1 +0,0 @@
|
||||
Welcome to use MIUI notes!
|
@ -1,73 +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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package net.micode.notes.data;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.provider.ContactsContract.CommonDataKinds.Phone;
|
||||
import android.provider.ContactsContract.Data;
|
||||
import android.telephony.PhoneNumberUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class Contact {
|
||||
private static HashMap<String, String> sContactCache;
|
||||
private static final String TAG = "Contact";
|
||||
|
||||
private static final String CALLER_ID_SELECTION = "PHONE_NUMBERS_EQUAL(" + Phone.NUMBER
|
||||
+ ",?) AND " + Data.MIMETYPE + "='" + Phone.CONTENT_ITEM_TYPE + "'"
|
||||
+ " AND " + Data.RAW_CONTACT_ID + " IN "
|
||||
+ "(SELECT raw_contact_id "
|
||||
+ " FROM phone_lookup"
|
||||
+ " WHERE min_match = '+')";
|
||||
|
||||
public static String getContact(Context context, String phoneNumber) {
|
||||
if(sContactCache == null) {
|
||||
sContactCache = new HashMap<String, String>();
|
||||
}
|
||||
|
||||
if(sContactCache.containsKey(phoneNumber)) {
|
||||
return sContactCache.get(phoneNumber);
|
||||
}
|
||||
|
||||
String selection = CALLER_ID_SELECTION.replace("+",
|
||||
PhoneNumberUtils.toCallerIDMinMatch(phoneNumber));
|
||||
Cursor cursor = context.getContentResolver().query(
|
||||
Data.CONTENT_URI,
|
||||
new String [] { Phone.DISPLAY_NAME },
|
||||
selection,
|
||||
new String[] { phoneNumber },
|
||||
null);
|
||||
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
try {
|
||||
String name = cursor.getString(0);
|
||||
sContactCache.put(phoneNumber, name);
|
||||
return name;
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
Log.e(TAG, " Cursor get string error " + e.toString());
|
||||
return null;
|
||||
} finally {
|
||||
cursor.close();
|
||||
}
|
||||
} else {
|
||||
Log.d(TAG, "No contact matched with number:" + phoneNumber);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,873 +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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlarmManager;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.SearchManager;
|
||||
import android.appwidget.AppWidgetManager;
|
||||
import android.content.ContentUris;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Paint;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.TextUtils;
|
||||
import android.text.format.DateUtils;
|
||||
import android.text.style.BackgroundColorSpan;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.micode.notes.R;
|
||||
import net.micode.notes.data.Notes;
|
||||
import net.micode.notes.data.Notes.TextNote;
|
||||
import net.micode.notes.model.WorkingNote;
|
||||
import net.micode.notes.model.WorkingNote.NoteSettingChangedListener;
|
||||
import net.micode.notes.tool.DataUtils;
|
||||
import net.micode.notes.tool.ResourceParser;
|
||||
import net.micode.notes.tool.ResourceParser.TextAppearanceResources;
|
||||
import net.micode.notes.ui.DateTimePickerDialog.OnDateTimeSetListener;
|
||||
import net.micode.notes.ui.NoteEditText.OnTextViewChangeListener;
|
||||
import net.micode.notes.widget.NoteWidgetProvider_2x;
|
||||
import net.micode.notes.widget.NoteWidgetProvider_4x;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
||||
public class NoteEditActivity extends Activity implements OnClickListener,
|
||||
NoteSettingChangedListener, OnTextViewChangeListener {
|
||||
private class HeadViewHolder {
|
||||
public TextView tvModified;
|
||||
|
||||
public ImageView ivAlertIcon;
|
||||
|
||||
public TextView tvAlertDate;
|
||||
|
||||
public ImageView ibSetBgColor;
|
||||
}
|
||||
|
||||
private static final Map<Integer, Integer> sBgSelectorBtnsMap = new HashMap<Integer, Integer>();
|
||||
static {
|
||||
sBgSelectorBtnsMap.put(R.id.iv_bg_yellow, ResourceParser.YELLOW);
|
||||
sBgSelectorBtnsMap.put(R.id.iv_bg_red, ResourceParser.RED);
|
||||
sBgSelectorBtnsMap.put(R.id.iv_bg_blue, ResourceParser.BLUE);
|
||||
sBgSelectorBtnsMap.put(R.id.iv_bg_green, ResourceParser.GREEN);
|
||||
sBgSelectorBtnsMap.put(R.id.iv_bg_white, ResourceParser.WHITE);
|
||||
}
|
||||
|
||||
private static final Map<Integer, Integer> sBgSelectorSelectionMap = new HashMap<Integer, Integer>();
|
||||
static {
|
||||
sBgSelectorSelectionMap.put(ResourceParser.YELLOW, R.id.iv_bg_yellow_select);
|
||||
sBgSelectorSelectionMap.put(ResourceParser.RED, R.id.iv_bg_red_select);
|
||||
sBgSelectorSelectionMap.put(ResourceParser.BLUE, R.id.iv_bg_blue_select);
|
||||
sBgSelectorSelectionMap.put(ResourceParser.GREEN, R.id.iv_bg_green_select);
|
||||
sBgSelectorSelectionMap.put(ResourceParser.WHITE, R.id.iv_bg_white_select);
|
||||
}
|
||||
|
||||
private static final Map<Integer, Integer> sFontSizeBtnsMap = new HashMap<Integer, Integer>();
|
||||
static {
|
||||
sFontSizeBtnsMap.put(R.id.ll_font_large, ResourceParser.TEXT_LARGE);
|
||||
sFontSizeBtnsMap.put(R.id.ll_font_small, ResourceParser.TEXT_SMALL);
|
||||
sFontSizeBtnsMap.put(R.id.ll_font_normal, ResourceParser.TEXT_MEDIUM);
|
||||
sFontSizeBtnsMap.put(R.id.ll_font_super, ResourceParser.TEXT_SUPER);
|
||||
}
|
||||
|
||||
private static final Map<Integer, Integer> sFontSelectorSelectionMap = new HashMap<Integer, Integer>();
|
||||
static {
|
||||
sFontSelectorSelectionMap.put(ResourceParser.TEXT_LARGE, R.id.iv_large_select);
|
||||
sFontSelectorSelectionMap.put(ResourceParser.TEXT_SMALL, R.id.iv_small_select);
|
||||
sFontSelectorSelectionMap.put(ResourceParser.TEXT_MEDIUM, R.id.iv_medium_select);
|
||||
sFontSelectorSelectionMap.put(ResourceParser.TEXT_SUPER, R.id.iv_super_select);
|
||||
}
|
||||
|
||||
private static final String TAG = "NoteEditActivity";
|
||||
|
||||
private HeadViewHolder mNoteHeaderHolder;
|
||||
|
||||
private View mHeadViewPanel;
|
||||
|
||||
private View mNoteBgColorSelector;
|
||||
|
||||
private View mFontSizeSelector;
|
||||
|
||||
private EditText mNoteEditor;
|
||||
|
||||
private View mNoteEditorPanel;
|
||||
|
||||
private WorkingNote mWorkingNote;
|
||||
|
||||
private SharedPreferences mSharedPrefs;
|
||||
private int mFontSizeId;
|
||||
|
||||
private static final String PREFERENCE_FONT_SIZE = "pref_font_size";
|
||||
|
||||
private static final int SHORTCUT_ICON_TITLE_MAX_LEN = 10;
|
||||
|
||||
public static final String TAG_CHECKED = String.valueOf('\u221A');
|
||||
public static final String TAG_UNCHECKED = String.valueOf('\u25A1');
|
||||
|
||||
private LinearLayout mEditTextList;
|
||||
|
||||
private String mUserQuery;
|
||||
private Pattern mPattern;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
this.setContentView(R.layout.note_edit);
|
||||
|
||||
if (savedInstanceState == null && !initActivityState(getIntent())) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
initResources();
|
||||
}
|
||||
|
||||
/**
|
||||
* Current activity may be killed when the memory is low. Once it is killed, for another time
|
||||
* user load this activity, we should restore the former state
|
||||
*/
|
||||
@Override
|
||||
protected void onRestoreInstanceState(Bundle savedInstanceState) {
|
||||
super.onRestoreInstanceState(savedInstanceState);
|
||||
if (savedInstanceState != null && savedInstanceState.containsKey(Intent.EXTRA_UID)) {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.putExtra(Intent.EXTRA_UID, savedInstanceState.getLong(Intent.EXTRA_UID));
|
||||
if (!initActivityState(intent)) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
Log.d(TAG, "Restoring from killed activity");
|
||||
}
|
||||
}
|
||||
|
||||
private boolean initActivityState(Intent intent) {
|
||||
/**
|
||||
* If the user specified the {@link Intent#ACTION_VIEW} but not provided with id,
|
||||
* then jump to the NotesListActivity
|
||||
*/
|
||||
mWorkingNote = null;
|
||||
if (TextUtils.equals(Intent.ACTION_VIEW, intent.getAction())) {
|
||||
long noteId = intent.getLongExtra(Intent.EXTRA_UID, 0);
|
||||
mUserQuery = "";
|
||||
|
||||
/**
|
||||
* Starting from the searched result
|
||||
*/
|
||||
if (intent.hasExtra(SearchManager.EXTRA_DATA_KEY)) {
|
||||
noteId = Long.parseLong(intent.getStringExtra(SearchManager.EXTRA_DATA_KEY));
|
||||
mUserQuery = intent.getStringExtra(SearchManager.USER_QUERY);
|
||||
}
|
||||
|
||||
if (!DataUtils.visibleInNoteDatabase(getContentResolver(), noteId, Notes.TYPE_NOTE)) {
|
||||
Intent jump = new Intent(this, NotesListActivity.class);
|
||||
startActivity(jump);
|
||||
showToast(R.string.error_note_not_exist);
|
||||
finish();
|
||||
return false;
|
||||
} else {
|
||||
mWorkingNote = WorkingNote.load(this, noteId);
|
||||
if (mWorkingNote == null) {
|
||||
Log.e(TAG, "load note failed with note id" + noteId);
|
||||
finish();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
getWindow().setSoftInputMode(
|
||||
WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN
|
||||
| WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
} else if(TextUtils.equals(Intent.ACTION_INSERT_OR_EDIT, intent.getAction())) {
|
||||
// New note
|
||||
long folderId = intent.getLongExtra(Notes.INTENT_EXTRA_FOLDER_ID, 0);
|
||||
int widgetId = intent.getIntExtra(Notes.INTENT_EXTRA_WIDGET_ID,
|
||||
AppWidgetManager.INVALID_APPWIDGET_ID);
|
||||
int widgetType = intent.getIntExtra(Notes.INTENT_EXTRA_WIDGET_TYPE,
|
||||
Notes.TYPE_WIDGET_INVALIDE);
|
||||
int bgResId = intent.getIntExtra(Notes.INTENT_EXTRA_BACKGROUND_ID,
|
||||
ResourceParser.getDefaultBgId(this));
|
||||
|
||||
// Parse call-record note
|
||||
String phoneNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
|
||||
long callDate = intent.getLongExtra(Notes.INTENT_EXTRA_CALL_DATE, 0);
|
||||
if (callDate != 0 && phoneNumber != null) {
|
||||
if (TextUtils.isEmpty(phoneNumber)) {
|
||||
Log.w(TAG, "The call record number is null");
|
||||
}
|
||||
long noteId = 0;
|
||||
if ((noteId = DataUtils.getNoteIdByPhoneNumberAndCallDate(getContentResolver(),
|
||||
phoneNumber, callDate)) > 0) {
|
||||
mWorkingNote = WorkingNote.load(this, noteId);
|
||||
if (mWorkingNote == null) {
|
||||
Log.e(TAG, "load call note failed with note id" + noteId);
|
||||
finish();
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
mWorkingNote = WorkingNote.createEmptyNote(this, folderId, widgetId,
|
||||
widgetType, bgResId);
|
||||
mWorkingNote.convertToCallNote(phoneNumber, callDate);
|
||||
}
|
||||
} else {
|
||||
mWorkingNote = WorkingNote.createEmptyNote(this, folderId, widgetId, widgetType,
|
||||
bgResId);
|
||||
}
|
||||
|
||||
getWindow().setSoftInputMode(
|
||||
WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
|
||||
| WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
||||
} else {
|
||||
Log.e(TAG, "Intent not specified action, should not support");
|
||||
finish();
|
||||
return false;
|
||||
}
|
||||
mWorkingNote.setOnSettingStatusChangedListener(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
initNoteScreen();
|
||||
}
|
||||
|
||||
private void initNoteScreen() {
|
||||
mNoteEditor.setTextAppearance(this, TextAppearanceResources
|
||||
.getTexAppearanceResource(mFontSizeId));
|
||||
if (mWorkingNote.getCheckListMode() == TextNote.MODE_CHECK_LIST) {
|
||||
switchToListMode(mWorkingNote.getContent());
|
||||
} else {
|
||||
mNoteEditor.setText(getHighlightQueryResult(mWorkingNote.getContent(), mUserQuery));
|
||||
mNoteEditor.setSelection(mNoteEditor.getText().length());
|
||||
}
|
||||
for (Integer id : sBgSelectorSelectionMap.keySet()) {
|
||||
findViewById(sBgSelectorSelectionMap.get(id)).setVisibility(View.GONE);
|
||||
}
|
||||
mHeadViewPanel.setBackgroundResource(mWorkingNote.getTitleBgResId());
|
||||
mNoteEditorPanel.setBackgroundResource(mWorkingNote.getBgColorResId());
|
||||
|
||||
mNoteHeaderHolder.tvModified.setText(DateUtils.formatDateTime(this,
|
||||
mWorkingNote.getModifiedDate(), DateUtils.FORMAT_SHOW_DATE
|
||||
| DateUtils.FORMAT_NUMERIC_DATE | DateUtils.FORMAT_SHOW_TIME
|
||||
| DateUtils.FORMAT_SHOW_YEAR));
|
||||
|
||||
/**
|
||||
* TODO: Add the menu for setting alert. Currently disable it because the DateTimePicker
|
||||
* is not ready
|
||||
*/
|
||||
showAlertHeader();
|
||||
}
|
||||
|
||||
private void showAlertHeader() {
|
||||
if (mWorkingNote.hasClockAlert()) {
|
||||
long time = System.currentTimeMillis();
|
||||
if (time > mWorkingNote.getAlertDate()) {
|
||||
mNoteHeaderHolder.tvAlertDate.setText(R.string.note_alert_expired);
|
||||
} else {
|
||||
mNoteHeaderHolder.tvAlertDate.setText(DateUtils.getRelativeTimeSpanString(
|
||||
mWorkingNote.getAlertDate(), time, DateUtils.MINUTE_IN_MILLIS));
|
||||
}
|
||||
mNoteHeaderHolder.tvAlertDate.setVisibility(View.VISIBLE);
|
||||
mNoteHeaderHolder.ivAlertIcon.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mNoteHeaderHolder.tvAlertDate.setVisibility(View.GONE);
|
||||
mNoteHeaderHolder.ivAlertIcon.setVisibility(View.GONE);
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
initActivityState(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
/**
|
||||
* For new note without note id, we should firstly save it to
|
||||
* generate a id. If the editing note is not worth saving, there
|
||||
* is no id which is equivalent to create new note
|
||||
*/
|
||||
if (!mWorkingNote.existInDatabase()) {
|
||||
saveNote();
|
||||
}
|
||||
outState.putLong(Intent.EXTRA_UID, mWorkingNote.getNoteId());
|
||||
Log.d(TAG, "Save working note id: " + mWorkingNote.getNoteId() + " onSaveInstanceState");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchTouchEvent(MotionEvent ev) {
|
||||
if (mNoteBgColorSelector.getVisibility() == View.VISIBLE
|
||||
&& !inRangeOfView(mNoteBgColorSelector, ev)) {
|
||||
mNoteBgColorSelector.setVisibility(View.GONE);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mFontSizeSelector.getVisibility() == View.VISIBLE
|
||||
&& !inRangeOfView(mFontSizeSelector, ev)) {
|
||||
mFontSizeSelector.setVisibility(View.GONE);
|
||||
return true;
|
||||
}
|
||||
return super.dispatchTouchEvent(ev);
|
||||
}
|
||||
|
||||
private boolean inRangeOfView(View view, MotionEvent ev) {
|
||||
int []location = new int[2];
|
||||
view.getLocationOnScreen(location);
|
||||
int x = location[0];
|
||||
int y = location[1];
|
||||
if (ev.getX() < x
|
||||
|| ev.getX() > (x + view.getWidth())
|
||||
|| ev.getY() < y
|
||||
|| ev.getY() > (y + view.getHeight())) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void initResources() {
|
||||
mHeadViewPanel = findViewById(R.id.note_title);
|
||||
mNoteHeaderHolder = new HeadViewHolder();
|
||||
mNoteHeaderHolder.tvModified = (TextView) findViewById(R.id.tv_modified_date);
|
||||
mNoteHeaderHolder.ivAlertIcon = (ImageView) findViewById(R.id.iv_alert_icon);
|
||||
mNoteHeaderHolder.tvAlertDate = (TextView) findViewById(R.id.tv_alert_date);
|
||||
mNoteHeaderHolder.ibSetBgColor = (ImageView) findViewById(R.id.btn_set_bg_color);
|
||||
mNoteHeaderHolder.ibSetBgColor.setOnClickListener(this);
|
||||
mNoteEditor = (EditText) findViewById(R.id.note_edit_view);
|
||||
mNoteEditorPanel = findViewById(R.id.sv_note_edit);
|
||||
mNoteBgColorSelector = findViewById(R.id.note_bg_color_selector);
|
||||
for (int id : sBgSelectorBtnsMap.keySet()) {
|
||||
ImageView iv = (ImageView) findViewById(id);
|
||||
iv.setOnClickListener(this);
|
||||
}
|
||||
|
||||
mFontSizeSelector = findViewById(R.id.font_size_selector);
|
||||
for (int id : sFontSizeBtnsMap.keySet()) {
|
||||
View view = findViewById(id);
|
||||
view.setOnClickListener(this);
|
||||
};
|
||||
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
mFontSizeId = mSharedPrefs.getInt(PREFERENCE_FONT_SIZE, ResourceParser.BG_DEFAULT_FONT_SIZE);
|
||||
/**
|
||||
* HACKME: Fix bug of store the resource id in shared preference.
|
||||
* The id may larger than the length of resources, in this case,
|
||||
* return the {@link ResourceParser#BG_DEFAULT_FONT_SIZE}
|
||||
*/
|
||||
if(mFontSizeId >= TextAppearanceResources.getResourcesSize()) {
|
||||
mFontSizeId = ResourceParser.BG_DEFAULT_FONT_SIZE;
|
||||
}
|
||||
mEditTextList = (LinearLayout) findViewById(R.id.note_edit_list);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
if(saveNote()) {
|
||||
Log.d(TAG, "Note data was saved with length:" + mWorkingNote.getContent().length());
|
||||
}
|
||||
clearSettingState();
|
||||
}
|
||||
|
||||
private void updateWidget() {
|
||||
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
|
||||
if (mWorkingNote.getWidgetType() == Notes.TYPE_WIDGET_2X) {
|
||||
intent.setClass(this, NoteWidgetProvider_2x.class);
|
||||
} else if (mWorkingNote.getWidgetType() == Notes.TYPE_WIDGET_4X) {
|
||||
intent.setClass(this, NoteWidgetProvider_4x.class);
|
||||
} else {
|
||||
Log.e(TAG, "Unspported widget type");
|
||||
return;
|
||||
}
|
||||
|
||||
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, new int[] {
|
||||
mWorkingNote.getWidgetId()
|
||||
});
|
||||
|
||||
sendBroadcast(intent);
|
||||
setResult(RESULT_OK, intent);
|
||||
}
|
||||
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
if (id == R.id.btn_set_bg_color) {
|
||||
mNoteBgColorSelector.setVisibility(View.VISIBLE);
|
||||
findViewById(sBgSelectorSelectionMap.get(mWorkingNote.getBgColorId())).setVisibility(
|
||||
- View.VISIBLE);
|
||||
} else if (sBgSelectorBtnsMap.containsKey(id)) {
|
||||
findViewById(sBgSelectorSelectionMap.get(mWorkingNote.getBgColorId())).setVisibility(
|
||||
View.GONE);
|
||||
mWorkingNote.setBgColorId(sBgSelectorBtnsMap.get(id));
|
||||
mNoteBgColorSelector.setVisibility(View.GONE);
|
||||
} else if (sFontSizeBtnsMap.containsKey(id)) {
|
||||
findViewById(sFontSelectorSelectionMap.get(mFontSizeId)).setVisibility(View.GONE);
|
||||
mFontSizeId = sFontSizeBtnsMap.get(id);
|
||||
mSharedPrefs.edit().putInt(PREFERENCE_FONT_SIZE, mFontSizeId).commit();
|
||||
findViewById(sFontSelectorSelectionMap.get(mFontSizeId)).setVisibility(View.VISIBLE);
|
||||
if (mWorkingNote.getCheckListMode() == TextNote.MODE_CHECK_LIST) {
|
||||
getWorkingText();
|
||||
switchToListMode(mWorkingNote.getContent());
|
||||
} else {
|
||||
mNoteEditor.setTextAppearance(this,
|
||||
TextAppearanceResources.getTexAppearanceResource(mFontSizeId));
|
||||
}
|
||||
mFontSizeSelector.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if(clearSettingState()) {
|
||||
return;
|
||||
}
|
||||
|
||||
saveNote();
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
private boolean clearSettingState() {
|
||||
if (mNoteBgColorSelector.getVisibility() == View.VISIBLE) {
|
||||
mNoteBgColorSelector.setVisibility(View.GONE);
|
||||
return true;
|
||||
} else if (mFontSizeSelector.getVisibility() == View.VISIBLE) {
|
||||
mFontSizeSelector.setVisibility(View.GONE);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void onBackgroundColorChanged() {
|
||||
findViewById(sBgSelectorSelectionMap.get(mWorkingNote.getBgColorId())).setVisibility(
|
||||
View.VISIBLE);
|
||||
mNoteEditorPanel.setBackgroundResource(mWorkingNote.getBgColorResId());
|
||||
mHeadViewPanel.setBackgroundResource(mWorkingNote.getTitleBgResId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||
if (isFinishing()) {
|
||||
return true;
|
||||
}
|
||||
clearSettingState();
|
||||
menu.clear();
|
||||
if (mWorkingNote.getFolderId() == Notes.ID_CALL_RECORD_FOLDER) {
|
||||
getMenuInflater().inflate(R.menu.call_note_edit, menu);
|
||||
} else {
|
||||
getMenuInflater().inflate(R.menu.note_edit, menu);
|
||||
}
|
||||
if (mWorkingNote.getCheckListMode() == TextNote.MODE_CHECK_LIST) {
|
||||
menu.findItem(R.id.menu_list_mode).setTitle(R.string.menu_normal_mode);
|
||||
} else {
|
||||
menu.findItem(R.id.menu_list_mode).setTitle(R.string.menu_list_mode);
|
||||
}
|
||||
if (mWorkingNote.hasClockAlert()) {
|
||||
menu.findItem(R.id.menu_alert).setVisible(false);
|
||||
} else {
|
||||
menu.findItem(R.id.menu_delete_remind).setVisible(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void setReminder() {
|
||||
DateTimePickerDialog d = new DateTimePickerDialog(this, System.currentTimeMillis());
|
||||
d.setOnDateTimeSetListener(new OnDateTimeSetListener() {
|
||||
public void OnDateTimeSet(AlertDialog dialog, long date) {
|
||||
mWorkingNote.setAlertDate(date , true);
|
||||
}
|
||||
});
|
||||
d.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Share note to apps that support {@link Intent#ACTION_SEND} action
|
||||
* and {@text/plain} type
|
||||
*/
|
||||
private void sendTo(Context context, String info) {
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
intent.putExtra(Intent.EXTRA_TEXT, info);
|
||||
intent.setType("text/plain");
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
private void createNewNote() {
|
||||
// Firstly, save current editing notes
|
||||
saveNote();
|
||||
|
||||
// For safety, start a new NoteEditActivity
|
||||
finish();
|
||||
Intent intent = new Intent(this, NoteEditActivity.class);
|
||||
intent.setAction(Intent.ACTION_INSERT_OR_EDIT);
|
||||
intent.putExtra(Notes.INTENT_EXTRA_FOLDER_ID, mWorkingNote.getFolderId());
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
private void deleteCurrentNote() {
|
||||
if (mWorkingNote.existInDatabase()) {
|
||||
HashSet<Long> ids = new HashSet<Long>();
|
||||
long id = mWorkingNote.getNoteId();
|
||||
if (id != Notes.ID_ROOT_FOLDER) {
|
||||
ids.add(id);
|
||||
} else {
|
||||
Log.d(TAG, "Wrong note id, should not happen");
|
||||
}
|
||||
if (!isSyncMode()) {
|
||||
if (!DataUtils.batchDeleteNotes(getContentResolver(), ids)) {
|
||||
Log.e(TAG, "Delete Note error");
|
||||
}
|
||||
} else {
|
||||
if (!DataUtils.batchMoveToFolder(getContentResolver(), ids, Notes.ID_TRASH_FOLER)) {
|
||||
Log.e(TAG, "Move notes to trash folder error, should not happens");
|
||||
}
|
||||
}
|
||||
}
|
||||
mWorkingNote.markDeleted(true);
|
||||
}
|
||||
|
||||
private boolean isSyncMode() {
|
||||
return NotesPreferenceActivity.getSyncAccountName(this).trim().length() > 0;
|
||||
}
|
||||
|
||||
public void onClockAlertChanged(long date, boolean set) {
|
||||
/**
|
||||
* User could set clock to an unsaved note, so before setting the
|
||||
* alert clock, we should save the note first
|
||||
*/
|
||||
if (!mWorkingNote.existInDatabase()) {
|
||||
saveNote();
|
||||
}
|
||||
if (mWorkingNote.getNoteId() > 0) {
|
||||
Intent intent = new Intent(this, AlarmReceiver.class);
|
||||
intent.setData(ContentUris.withAppendedId(Notes.CONTENT_NOTE_URI, mWorkingNote.getNoteId()));
|
||||
PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, 0);
|
||||
AlarmManager alarmManager = ((AlarmManager) getSystemService(ALARM_SERVICE));
|
||||
showAlertHeader();
|
||||
if(!set) {
|
||||
alarmManager.cancel(pendingIntent);
|
||||
} else {
|
||||
alarmManager.set(AlarmManager.RTC_WAKEUP, date, pendingIntent);
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* There is the condition that user has input nothing (the note is
|
||||
* not worthy saving), we have no note id, remind the user that he
|
||||
* should input something
|
||||
*/
|
||||
Log.e(TAG, "Clock alert setting error");
|
||||
showToast(R.string.error_note_empty_for_clock);
|
||||
}
|
||||
}
|
||||
|
||||
public void onWidgetChanged() {
|
||||
updateWidget();
|
||||
}
|
||||
|
||||
public void onEditTextDelete(int index, String text) {
|
||||
int childCount = mEditTextList.getChildCount();
|
||||
if (childCount == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = index + 1; i < childCount; i++) {
|
||||
((NoteEditText) mEditTextList.getChildAt(i).findViewById(R.id.et_edit_text))
|
||||
.setIndex(i - 1);
|
||||
}
|
||||
|
||||
mEditTextList.removeViewAt(index);
|
||||
NoteEditText edit = null;
|
||||
if(index == 0) {
|
||||
edit = (NoteEditText) mEditTextList.getChildAt(0).findViewById(
|
||||
R.id.et_edit_text);
|
||||
} else {
|
||||
edit = (NoteEditText) mEditTextList.getChildAt(index - 1).findViewById(
|
||||
R.id.et_edit_text);
|
||||
}
|
||||
int length = edit.length();
|
||||
edit.append(text);
|
||||
edit.requestFocus();
|
||||
edit.setSelection(length);
|
||||
}
|
||||
|
||||
public void onEditTextEnter(int index, String text) {
|
||||
/**
|
||||
* Should not happen, check for debug
|
||||
*/
|
||||
if(index > mEditTextList.getChildCount()) {
|
||||
Log.e(TAG, "Index out of mEditTextList boundrary, should not happen");
|
||||
}
|
||||
|
||||
View view = getListItem(text, index);
|
||||
mEditTextList.addView(view, index);
|
||||
NoteEditText edit = (NoteEditText) view.findViewById(R.id.et_edit_text);
|
||||
edit.requestFocus();
|
||||
edit.setSelection(0);
|
||||
for (int i = index + 1; i < mEditTextList.getChildCount(); i++) {
|
||||
((NoteEditText) mEditTextList.getChildAt(i).findViewById(R.id.et_edit_text))
|
||||
.setIndex(i);
|
||||
}
|
||||
}
|
||||
|
||||
private void switchToListMode(String text) {
|
||||
mEditTextList.removeAllViews();
|
||||
String[] items = text.split("\n");
|
||||
int index = 0;
|
||||
for (String item : items) {
|
||||
if(!TextUtils.isEmpty(item)) {
|
||||
mEditTextList.addView(getListItem(item, index));
|
||||
index++;
|
||||
}
|
||||
}
|
||||
mEditTextList.addView(getListItem("", index));
|
||||
mEditTextList.getChildAt(index).findViewById(R.id.et_edit_text).requestFocus();
|
||||
|
||||
mNoteEditor.setVisibility(View.GONE);
|
||||
mEditTextList.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
private Spannable getHighlightQueryResult(String fullText, String userQuery) {
|
||||
SpannableString spannable = new SpannableString(fullText == null ? "" : fullText);
|
||||
if (!TextUtils.isEmpty(userQuery)) {
|
||||
mPattern = Pattern.compile(userQuery);
|
||||
Matcher m = mPattern.matcher(fullText);
|
||||
int start = 0;
|
||||
while (m.find(start)) {
|
||||
spannable.setSpan(
|
||||
new BackgroundColorSpan(this.getResources().getColor(
|
||||
R.color.user_query_highlight)), m.start(), m.end(),
|
||||
Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
start = m.end();
|
||||
}
|
||||
}
|
||||
return spannable;
|
||||
}
|
||||
|
||||
private View getListItem(String item, int index) {
|
||||
View view = LayoutInflater.from(this).inflate(R.layout.note_edit_list_item, null);
|
||||
final NoteEditText edit = (NoteEditText) view.findViewById(R.id.et_edit_text);
|
||||
edit.setTextAppearance(this, TextAppearanceResources.getTexAppearanceResource(mFontSizeId));
|
||||
CheckBox cb = ((CheckBox) view.findViewById(R.id.cb_edit_item));
|
||||
cb.setOnCheckedChangeListener(new OnCheckedChangeListener() {
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (isChecked) {
|
||||
edit.setPaintFlags(edit.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
|
||||
} else {
|
||||
edit.setPaintFlags(Paint.ANTI_ALIAS_FLAG | Paint.DEV_KERN_TEXT_FLAG);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (item.startsWith(TAG_CHECKED)) {
|
||||
cb.setChecked(true);
|
||||
edit.setPaintFlags(edit.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
|
||||
item = item.substring(TAG_CHECKED.length(), item.length()).trim();
|
||||
} else if (item.startsWith(TAG_UNCHECKED)) {
|
||||
cb.setChecked(false);
|
||||
edit.setPaintFlags(Paint.ANTI_ALIAS_FLAG | Paint.DEV_KERN_TEXT_FLAG);
|
||||
item = item.substring(TAG_UNCHECKED.length(), item.length()).trim();
|
||||
}
|
||||
|
||||
edit.setOnTextViewChangeListener(this);
|
||||
edit.setIndex(index);
|
||||
edit.setText(getHighlightQueryResult(item, mUserQuery));
|
||||
return view;
|
||||
}
|
||||
|
||||
public void onTextChange(int index, boolean hasText) {
|
||||
if (index >= mEditTextList.getChildCount()) {
|
||||
Log.e(TAG, "Wrong index, should not happen");
|
||||
return;
|
||||
}
|
||||
if(hasText) {
|
||||
mEditTextList.getChildAt(index).findViewById(R.id.cb_edit_item).setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mEditTextList.getChildAt(index).findViewById(R.id.cb_edit_item).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void onCheckListModeChanged(int oldMode, int newMode) {
|
||||
if (newMode == TextNote.MODE_CHECK_LIST) {
|
||||
switchToListMode(mNoteEditor.getText().toString());
|
||||
} else {
|
||||
if (!getWorkingText()) {
|
||||
mWorkingNote.setWorkingText(mWorkingNote.getContent().replace(TAG_UNCHECKED + " ",
|
||||
""));
|
||||
}
|
||||
mNoteEditor.setText(getHighlightQueryResult(mWorkingNote.getContent(), mUserQuery));
|
||||
mEditTextList.setVisibility(View.GONE);
|
||||
mNoteEditor.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean getWorkingText() {
|
||||
boolean hasChecked = false;
|
||||
if (mWorkingNote.getCheckListMode() == TextNote.MODE_CHECK_LIST) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < mEditTextList.getChildCount(); i++) {
|
||||
View view = mEditTextList.getChildAt(i);
|
||||
NoteEditText edit = (NoteEditText) view.findViewById(R.id.et_edit_text);
|
||||
if (!TextUtils.isEmpty(edit.getText())) {
|
||||
if (((CheckBox) view.findViewById(R.id.cb_edit_item)).isChecked()) {
|
||||
sb.append(TAG_CHECKED).append(" ").append(edit.getText()).append("\n");
|
||||
hasChecked = true;
|
||||
} else {
|
||||
sb.append(TAG_UNCHECKED).append(" ").append(edit.getText()).append("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
mWorkingNote.setWorkingText(sb.toString());
|
||||
} else {
|
||||
mWorkingNote.setWorkingText(mNoteEditor.getText().toString());
|
||||
}
|
||||
return hasChecked;
|
||||
}
|
||||
|
||||
private boolean saveNote() {
|
||||
getWorkingText();
|
||||
boolean saved = mWorkingNote.saveNote();
|
||||
if (saved) {
|
||||
/**
|
||||
* There are two modes from List view to edit view, open one note,
|
||||
* create/edit a node. Opening node requires to the original
|
||||
* position in the list when back from edit view, while creating a
|
||||
* new node requires to the top of the list. This code
|
||||
* {@link #RESULT_OK} is used to identify the create/edit state
|
||||
*/
|
||||
setResult(RESULT_OK);
|
||||
}
|
||||
return saved;
|
||||
}
|
||||
|
||||
private void sendToDesktop() {
|
||||
/**
|
||||
* Before send message to home, we should make sure that current
|
||||
* editing note is exists in databases. So, for new note, firstly
|
||||
* save it
|
||||
*/
|
||||
if (!mWorkingNote.existInDatabase()) {
|
||||
saveNote();
|
||||
}
|
||||
|
||||
if (mWorkingNote.getNoteId() > 0) {
|
||||
Intent sender = new Intent();
|
||||
Intent shortcutIntent = new Intent(this, NoteEditActivity.class);
|
||||
shortcutIntent.setAction(Intent.ACTION_VIEW);
|
||||
shortcutIntent.putExtra(Intent.EXTRA_UID, mWorkingNote.getNoteId());
|
||||
sender.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
|
||||
sender.putExtra(Intent.EXTRA_SHORTCUT_NAME,
|
||||
makeShortcutIconTitle(mWorkingNote.getContent()));
|
||||
sender.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
|
||||
Intent.ShortcutIconResource.fromContext(this, R.drawable.icon_app));
|
||||
sender.putExtra("duplicate", true);
|
||||
sender.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
|
||||
showToast(R.string.info_note_enter_desktop);
|
||||
sendBroadcast(sender);
|
||||
} else {
|
||||
/**
|
||||
* There is the condition that user has input nothing (the note is
|
||||
* not worthy saving), we have no note id, remind the user that he
|
||||
* should input something
|
||||
*/
|
||||
Log.e(TAG, "Send to desktop error");
|
||||
showToast(R.string.error_note_empty_for_send_to_desktop);
|
||||
}
|
||||
}
|
||||
|
||||
private String makeShortcutIconTitle(String content) {
|
||||
content = content.replace(TAG_CHECKED, "");
|
||||
content = content.replace(TAG_UNCHECKED, "");
|
||||
return content.length() > SHORTCUT_ICON_TITLE_MAX_LEN ? content.substring(0,
|
||||
SHORTCUT_ICON_TITLE_MAX_LEN) : content;
|
||||
}
|
||||
|
||||
private void showToast(int resId) {
|
||||
showToast(resId, Toast.LENGTH_SHORT);
|
||||
}
|
||||
|
||||
private void showToast(int resId, int duration) {
|
||||
Toast.makeText(this, resId, duration).show();
|
||||
}
|
||||
}
|
@ -1,2 +1,43 @@
|
||||
# ReadCodeAndAnalyse
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
||||
|
||||
小米便签
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
#Mon Apr 22 16:27:11 CST 2024
|
||||
java.home=C\:\\SOFTWARE\\Android_Studio\\jbr
|
@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveExternalAnnotations" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectMigrations">
|
||||
<option name="MigrateToGradleLocalJavaHome">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,2 @@
|
||||
#Mon Apr 22 16:48:52 CST 2024
|
||||
java.home=C\:\\SOFTWARE\\Android_Studio\\jbr
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveExternalAnnotations" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectMigrations">
|
||||
<option name="MigrateToGradleLocalJavaHome">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,205 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="NONE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="8872f43c-c857-49cd-baa8-b1d00d8f4cdc" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/.gitignore" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/.idea/.gitignore" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/.idea/misc.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/.idea/modules.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/AndroidManifest.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/NOTICE" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/Notes-master.iml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/README" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/color/primary_text_dark.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/color/secondary_text_dark.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/bg_btn_set_color.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/bg_color_btn_mask.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/call_record.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/clock.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/delete.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/dropdown_icon.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/edit_blue.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/edit_green.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/edit_red.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/edit_title_blue.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/edit_title_green.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/edit_title_red.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/edit_title_white.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/edit_title_yellow.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/edit_white.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/edit_yellow.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/font_large.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/font_normal.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/font_size_selector_bg.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/font_small.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/font_super.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/icon_app.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_background.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_blue_down.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_blue_middle.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_blue_single.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_blue_up.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_folder.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_footer_bg.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_green_down.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_green_middle.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_green_single.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_green_up.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_red_down.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_red_middle.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_red_single.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_red_up.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_white_down.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_white_middle.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_white_single.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_white_up.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_yellow_down.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_yellow_middle.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_yellow_single.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/list_yellow_up.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/menu_delete.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/menu_move.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/new_note_normal.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/new_note_pressed.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/note_edit_color_selector_panel.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/notification.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/search_result.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/selected.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/title_alert.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/title_bar_bg.9.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/widget_2x_blue.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/widget_2x_green.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/widget_2x_red.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/widget_2x_white.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/widget_2x_yellow.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/widget_4x_blue.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/widget_4x_green.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/widget_4x_red.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/widget_4x_white.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable-hdpi/widget_4x_yellow.png" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/drawable/new_note.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/account_dialog_title.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/add_account_text.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/datetime_picker.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/dialog_edit_text.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/folder_list_item.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/note_edit.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/note_edit_list_item.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/note_item.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/note_list.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/note_list_dropdown_menu.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/note_list_footer.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/settings_header.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/widget_2x.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/layout/widget_4x.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/menu/call_note_edit.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/menu/call_record_folder.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/menu/note_edit.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/menu/note_list.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/menu/note_list_dropdown.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/menu/note_list_options.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/menu/sub_folder.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/raw-zh-rCN/introduction" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/raw/introduction" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/values-zh-rCN/arrays.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/values-zh-rCN/strings.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/values-zh-rTW/arrays.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/values-zh-rTW/strings.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/values/arrays.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/values/colors.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/values/dimens.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/values/strings.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/values/styles.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/xml/preferences.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/xml/searchable.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/xml/widget_2x_info.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/res/xml/widget_4x_info.xml" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/data/Contact.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/data/Notes.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/data/NotesDatabaseHelper.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/data/NotesProvider.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/gtask/data/MetaData.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/gtask/data/Node.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/gtask/data/SqlData.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/gtask/data/SqlNote.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/gtask/data/Task.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/gtask/data/TaskList.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/gtask/exception/ActionFailureException.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/gtask/exception/NetworkFailureException.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/gtask/remote/GTaskASyncTask.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/gtask/remote/GTaskClient.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/gtask/remote/GTaskManager.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/gtask/remote/GTaskSyncService.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/model/Note.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/model/WorkingNote.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/tool/BackupUtils.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/tool/DataUtils.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/tool/GTaskStringUtils.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/tool/ResourceParser.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/AlarmAlertActivity.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/AlarmInitReceiver.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/AlarmReceiver.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/DateTimePicker.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/DateTimePickerDialog.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/DropdownMenu.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/FoldersListAdapter.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/NoteEditActivity.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/NoteEditText.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/NoteItemData.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/NotesListActivity.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/NotesListAdapter.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/NotesListItem.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/ui/NotesPreferenceActivity.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/widget/NoteWidgetProvider.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/widget/NoteWidgetProvider_2x.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../Notes-master/src/net/micode/notes/widget/NoteWidgetProvider_4x.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../README.md" beforeDir="false" afterPath="$PROJECT_DIR$/../../README.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../新建 DOCX 文档.docx" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../../测试2.docx" beforeDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ClangdSettings">
|
||||
<option name="formatViaClangd" value="false" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../.." />
|
||||
</component>
|
||||
<component name="ProjectColorInfo"><![CDATA[{
|
||||
"customColor": "",
|
||||
"associatedIndex": 6
|
||||
}]]></component>
|
||||
<component name="ProjectId" id="2fRtTlEYrfFKm9MDc3bfDVoDdPH" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||
"android.gradle.sync.needed": "true",
|
||||
"cf.first.check.clang-format": "false",
|
||||
"cidr.known.project.marker": "true",
|
||||
"git-widget-placeholder": "main"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="8872f43c-c857-49cd-baa8-b1d00d8f4cdc" name="Changes" comment="" />
|
||||
<created>1713775730227</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1713775730227</updated>
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
</project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
#Sun Jun 02 20:13:58 CST 2024
|
||||
gradle.version=7.4
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
#Mon May 20 18:43:39 CST 2024
|
||||
java.home=C\:\\SOFTWARE\\Android_Studio\\jbr
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
@ -0,0 +1 @@
|
||||
Contact.java
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="17" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<value>
|
||||
<entry key="app">
|
||||
<State />
|
||||
</entry>
|
||||
</value>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/data/Notes.java" charset="GBK" />
|
||||
<file url="PROJECT" charset="GBK" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveExternalAnnotations" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="maven" />
|
||||
<option name="name" value="maven" />
|
||||
<option name="url" value="https://maven.aliyun.com/nexus/content/groups/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="BintrayJCenter" />
|
||||
<option name="name" value="BintrayJCenter" />
|
||||
<option name="url" value="https://jcenter.bintray.com/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Google" />
|
||||
<option name="name" value="Google" />
|
||||
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectMigrations">
|
||||
<option name="MigrateToGradleLocalJavaHome">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,9 @@
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="hg4idea" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
@ -0,0 +1 @@
|
||||
1
|
@ -0,0 +1,48 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
compileSdk 34
|
||||
|
||||
|
||||
buildToolsVersion '34.0.0'
|
||||
|
||||
defaultConfig {
|
||||
|
||||
applicationId "net.micode.notes"
|
||||
|
||||
minSdkVersion 16
|
||||
|
||||
//noinspection ExpiredTargetSdkVersion
|
||||
|
||||
targetSdkVersion 20
|
||||
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
||||
release {
|
||||
|
||||
minifyEnabled false
|
||||
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
}
|
||||
aaptOptions.cruncherEnabled = false
|
||||
aaptOptions.useNewCruncher = false
|
||||
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// implementation 'com.android.support:recyclerview-v7:28.0.0'
|
||||
//noinspection GradleCompatible
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
// Generated by view binder compiler. Do not edit!
|
||||
package net.micode.notes.databinding;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.viewbinding.ViewBinding;
|
||||
import android.viewbinding.ViewBindings;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import java.lang.NullPointerException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import net.micode.notes.R;
|
||||
|
||||
public final class AccountDialogTitleBinding implements ViewBinding {
|
||||
@NonNull
|
||||
private final LinearLayout rootView;
|
||||
|
||||
@NonNull
|
||||
public final TextView accountDialogSubtitle;
|
||||
|
||||
@NonNull
|
||||
public final TextView accountDialogTitle;
|
||||
|
||||
private AccountDialogTitleBinding(@NonNull LinearLayout rootView,
|
||||
@NonNull TextView accountDialogSubtitle, @NonNull TextView accountDialogTitle) {
|
||||
this.rootView = rootView;
|
||||
this.accountDialogSubtitle = accountDialogSubtitle;
|
||||
this.accountDialogTitle = accountDialogTitle;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public LinearLayout getRoot() {
|
||||
return rootView;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static AccountDialogTitleBinding inflate(@NonNull LayoutInflater inflater) {
|
||||
return inflate(inflater, null, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static AccountDialogTitleBinding inflate(@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup parent, boolean attachToParent) {
|
||||
View root = inflater.inflate(R.layout.account_dialog_title, parent, false);
|
||||
if (attachToParent) {
|
||||
parent.addView(root);
|
||||
}
|
||||
return bind(root);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static AccountDialogTitleBinding bind(@NonNull View rootView) {
|
||||
// The body of this method is generated in a way you would not otherwise write.
|
||||
// This is done to optimize the compiled bytecode for size and performance.
|
||||
int id;
|
||||
missingId: {
|
||||
id = R.id.account_dialog_subtitle;
|
||||
TextView accountDialogSubtitle = ViewBindings.findChildViewById(rootView, id);
|
||||
if (accountDialogSubtitle == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.account_dialog_title;
|
||||
TextView accountDialogTitle = ViewBindings.findChildViewById(rootView, id);
|
||||
if (accountDialogTitle == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
return new AccountDialogTitleBinding((LinearLayout) rootView, accountDialogSubtitle,
|
||||
accountDialogTitle);
|
||||
}
|
||||
String missingId = rootView.getResources().getResourceName(id);
|
||||
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
// Generated by view binder compiler. Do not edit!
|
||||
package net.micode.notes.databinding;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.viewbinding.ViewBinding;
|
||||
import android.viewbinding.ViewBindings;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import java.lang.NullPointerException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import net.micode.notes.R;
|
||||
import net.micode.notes.ui.NoteEditText;
|
||||
|
||||
public final class ActicityWordBinding implements ViewBinding {
|
||||
@NonNull
|
||||
private final RelativeLayout rootView;
|
||||
|
||||
@NonNull
|
||||
public final TextView characterCount;
|
||||
|
||||
@NonNull
|
||||
public final NoteEditText editText;
|
||||
|
||||
private ActicityWordBinding(@NonNull RelativeLayout rootView, @NonNull TextView characterCount,
|
||||
@NonNull NoteEditText editText) {
|
||||
this.rootView = rootView;
|
||||
this.characterCount = characterCount;
|
||||
this.editText = editText;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public RelativeLayout getRoot() {
|
||||
return rootView;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static ActicityWordBinding inflate(@NonNull LayoutInflater inflater) {
|
||||
return inflate(inflater, null, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static ActicityWordBinding inflate(@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup parent, boolean attachToParent) {
|
||||
View root = inflater.inflate(R.layout.acticity_word, parent, false);
|
||||
if (attachToParent) {
|
||||
parent.addView(root);
|
||||
}
|
||||
return bind(root);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static ActicityWordBinding bind(@NonNull View rootView) {
|
||||
// The body of this method is generated in a way you would not otherwise write.
|
||||
// This is done to optimize the compiled bytecode for size and performance.
|
||||
int id;
|
||||
missingId: {
|
||||
id = R.id.character_count;
|
||||
TextView characterCount = ViewBindings.findChildViewById(rootView, id);
|
||||
if (characterCount == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.edit_text;
|
||||
NoteEditText editText = ViewBindings.findChildViewById(rootView, id);
|
||||
if (editText == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
return new ActicityWordBinding((RelativeLayout) rootView, characterCount, editText);
|
||||
}
|
||||
String missingId = rootView.getResources().getResourceName(id);
|
||||
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
// Generated by view binder compiler. Do not edit!
|
||||
package net.micode.notes.databinding;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.viewbinding.ViewBinding;
|
||||
import android.viewbinding.ViewBindings;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import java.lang.NullPointerException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import net.micode.notes.R;
|
||||
|
||||
public final class ActivitySplashBinding implements ViewBinding {
|
||||
@NonNull
|
||||
private final FrameLayout rootView;
|
||||
|
||||
@NonNull
|
||||
public final TextView fullscreenContent;
|
||||
|
||||
@NonNull
|
||||
public final LinearLayout fullscreenContentControls;
|
||||
|
||||
private ActivitySplashBinding(@NonNull FrameLayout rootView, @NonNull TextView fullscreenContent,
|
||||
@NonNull LinearLayout fullscreenContentControls) {
|
||||
this.rootView = rootView;
|
||||
this.fullscreenContent = fullscreenContent;
|
||||
this.fullscreenContentControls = fullscreenContentControls;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public FrameLayout getRoot() {
|
||||
return rootView;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static ActivitySplashBinding inflate(@NonNull LayoutInflater inflater) {
|
||||
return inflate(inflater, null, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static ActivitySplashBinding inflate(@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup parent, boolean attachToParent) {
|
||||
View root = inflater.inflate(R.layout.activity_splash, parent, false);
|
||||
if (attachToParent) {
|
||||
parent.addView(root);
|
||||
}
|
||||
return bind(root);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static ActivitySplashBinding bind(@NonNull View rootView) {
|
||||
// The body of this method is generated in a way you would not otherwise write.
|
||||
// This is done to optimize the compiled bytecode for size and performance.
|
||||
int id;
|
||||
missingId: {
|
||||
id = R.id.fullscreen_content;
|
||||
TextView fullscreenContent = ViewBindings.findChildViewById(rootView, id);
|
||||
if (fullscreenContent == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.fullscreen_content_controls;
|
||||
LinearLayout fullscreenContentControls = ViewBindings.findChildViewById(rootView, id);
|
||||
if (fullscreenContentControls == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
return new ActivitySplashBinding((FrameLayout) rootView, fullscreenContent,
|
||||
fullscreenContentControls);
|
||||
}
|
||||
String missingId = rootView.getResources().getResourceName(id);
|
||||
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
// Generated by view binder compiler. Do not edit!
|
||||
package net.micode.notes.databinding;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.viewbinding.ViewBinding;
|
||||
import android.widget.LinearLayout;
|
||||
import java.lang.NullPointerException;
|
||||
import java.lang.Override;
|
||||
import net.micode.notes.R;
|
||||
|
||||
public final class AddAccountTextBinding implements ViewBinding {
|
||||
@NonNull
|
||||
private final LinearLayout rootView;
|
||||
|
||||
private AddAccountTextBinding(@NonNull LinearLayout rootView) {
|
||||
this.rootView = rootView;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public LinearLayout getRoot() {
|
||||
return rootView;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static AddAccountTextBinding inflate(@NonNull LayoutInflater inflater) {
|
||||
return inflate(inflater, null, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static AddAccountTextBinding inflate(@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup parent, boolean attachToParent) {
|
||||
View root = inflater.inflate(R.layout.add_account_text, parent, false);
|
||||
if (attachToParent) {
|
||||
parent.addView(root);
|
||||
}
|
||||
return bind(root);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static AddAccountTextBinding bind(@NonNull View rootView) {
|
||||
if (rootView == null) {
|
||||
throw new NullPointerException("rootView");
|
||||
}
|
||||
|
||||
return new AddAccountTextBinding((LinearLayout) rootView);
|
||||
}
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
// Generated by view binder compiler. Do not edit!
|
||||
package net.micode.notes.databinding;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.viewbinding.ViewBinding;
|
||||
import android.viewbinding.ViewBindings;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.NumberPicker;
|
||||
import java.lang.NullPointerException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import net.micode.notes.R;
|
||||
|
||||
public final class DatetimePickerBinding implements ViewBinding {
|
||||
@NonNull
|
||||
private final LinearLayout rootView;
|
||||
|
||||
@NonNull
|
||||
public final NumberPicker amPm;
|
||||
|
||||
@NonNull
|
||||
public final NumberPicker date;
|
||||
|
||||
@NonNull
|
||||
public final NumberPicker hour;
|
||||
|
||||
@NonNull
|
||||
public final NumberPicker minute;
|
||||
|
||||
private DatetimePickerBinding(@NonNull LinearLayout rootView, @NonNull NumberPicker amPm,
|
||||
@NonNull NumberPicker date, @NonNull NumberPicker hour, @NonNull NumberPicker minute) {
|
||||
this.rootView = rootView;
|
||||
this.amPm = amPm;
|
||||
this.date = date;
|
||||
this.hour = hour;
|
||||
this.minute = minute;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public LinearLayout getRoot() {
|
||||
return rootView;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static DatetimePickerBinding inflate(@NonNull LayoutInflater inflater) {
|
||||
return inflate(inflater, null, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static DatetimePickerBinding inflate(@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup parent, boolean attachToParent) {
|
||||
View root = inflater.inflate(R.layout.datetime_picker, parent, false);
|
||||
if (attachToParent) {
|
||||
parent.addView(root);
|
||||
}
|
||||
return bind(root);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static DatetimePickerBinding bind(@NonNull View rootView) {
|
||||
// The body of this method is generated in a way you would not otherwise write.
|
||||
// This is done to optimize the compiled bytecode for size and performance.
|
||||
int id;
|
||||
missingId: {
|
||||
id = R.id.amPm;
|
||||
NumberPicker amPm = ViewBindings.findChildViewById(rootView, id);
|
||||
if (amPm == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.date;
|
||||
NumberPicker date = ViewBindings.findChildViewById(rootView, id);
|
||||
if (date == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.hour;
|
||||
NumberPicker hour = ViewBindings.findChildViewById(rootView, id);
|
||||
if (hour == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.minute;
|
||||
NumberPicker minute = ViewBindings.findChildViewById(rootView, id);
|
||||
if (minute == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
return new DatetimePickerBinding((LinearLayout) rootView, amPm, date, hour, minute);
|
||||
}
|
||||
String missingId = rootView.getResources().getResourceName(id);
|
||||
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
|
||||
}
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
// Generated by view binder compiler. Do not edit!
|
||||
package net.micode.notes.databinding;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.viewbinding.ViewBinding;
|
||||
import android.viewbinding.ViewBindings;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import java.lang.NullPointerException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import net.micode.notes.R;
|
||||
|
||||
public final class DialogEditBinding implements ViewBinding {
|
||||
@NonNull
|
||||
private final RelativeLayout rootView;
|
||||
|
||||
@NonNull
|
||||
public final EditText etPhone;
|
||||
|
||||
@NonNull
|
||||
public final Button no;
|
||||
|
||||
@NonNull
|
||||
public final TextView title;
|
||||
|
||||
@NonNull
|
||||
public final Button yes;
|
||||
|
||||
private DialogEditBinding(@NonNull RelativeLayout rootView, @NonNull EditText etPhone,
|
||||
@NonNull Button no, @NonNull TextView title, @NonNull Button yes) {
|
||||
this.rootView = rootView;
|
||||
this.etPhone = etPhone;
|
||||
this.no = no;
|
||||
this.title = title;
|
||||
this.yes = yes;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public RelativeLayout getRoot() {
|
||||
return rootView;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static DialogEditBinding inflate(@NonNull LayoutInflater inflater) {
|
||||
return inflate(inflater, null, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static DialogEditBinding inflate(@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup parent, boolean attachToParent) {
|
||||
View root = inflater.inflate(R.layout.dialog_edit, parent, false);
|
||||
if (attachToParent) {
|
||||
parent.addView(root);
|
||||
}
|
||||
return bind(root);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static DialogEditBinding bind(@NonNull View rootView) {
|
||||
// The body of this method is generated in a way you would not otherwise write.
|
||||
// This is done to optimize the compiled bytecode for size and performance.
|
||||
int id;
|
||||
missingId: {
|
||||
id = R.id.et_phone;
|
||||
EditText etPhone = ViewBindings.findChildViewById(rootView, id);
|
||||
if (etPhone == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.no;
|
||||
Button no = ViewBindings.findChildViewById(rootView, id);
|
||||
if (no == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.title;
|
||||
TextView title = ViewBindings.findChildViewById(rootView, id);
|
||||
if (title == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.yes;
|
||||
Button yes = ViewBindings.findChildViewById(rootView, id);
|
||||
if (yes == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
return new DialogEditBinding((RelativeLayout) rootView, etPhone, no, title, yes);
|
||||
}
|
||||
String missingId = rootView.getResources().getResourceName(id);
|
||||
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
// Generated by view binder compiler. Do not edit!
|
||||
package net.micode.notes.databinding;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.viewbinding.ViewBinding;
|
||||
import android.widget.EditText;
|
||||
import java.lang.NullPointerException;
|
||||
import java.lang.Override;
|
||||
import net.micode.notes.R;
|
||||
|
||||
public final class DialogEditTextBinding implements ViewBinding {
|
||||
@NonNull
|
||||
private final EditText rootView;
|
||||
|
||||
@NonNull
|
||||
public final EditText etFolerName;
|
||||
|
||||
private DialogEditTextBinding(@NonNull EditText rootView, @NonNull EditText etFolerName) {
|
||||
this.rootView = rootView;
|
||||
this.etFolerName = etFolerName;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public EditText getRoot() {
|
||||
return rootView;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static DialogEditTextBinding inflate(@NonNull LayoutInflater inflater) {
|
||||
return inflate(inflater, null, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static DialogEditTextBinding inflate(@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup parent, boolean attachToParent) {
|
||||
View root = inflater.inflate(R.layout.dialog_edit_text, parent, false);
|
||||
if (attachToParent) {
|
||||
parent.addView(root);
|
||||
}
|
||||
return bind(root);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static DialogEditTextBinding bind(@NonNull View rootView) {
|
||||
if (rootView == null) {
|
||||
throw new NullPointerException("rootView");
|
||||
}
|
||||
|
||||
EditText etFolerName = (EditText) rootView;
|
||||
|
||||
return new DialogEditTextBinding((EditText) rootView, etFolerName);
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
// Generated by view binder compiler. Do not edit!
|
||||
package net.micode.notes.databinding;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.viewbinding.ViewBinding;
|
||||
import android.viewbinding.ViewBindings;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import java.lang.NullPointerException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import net.micode.notes.R;
|
||||
|
||||
public final class FolderListItemBinding implements ViewBinding {
|
||||
@NonNull
|
||||
private final LinearLayout rootView;
|
||||
|
||||
@NonNull
|
||||
public final TextView tvFolderName;
|
||||
|
||||
private FolderListItemBinding(@NonNull LinearLayout rootView, @NonNull TextView tvFolderName) {
|
||||
this.rootView = rootView;
|
||||
this.tvFolderName = tvFolderName;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public LinearLayout getRoot() {
|
||||
return rootView;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static FolderListItemBinding inflate(@NonNull LayoutInflater inflater) {
|
||||
return inflate(inflater, null, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static FolderListItemBinding inflate(@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup parent, boolean attachToParent) {
|
||||
View root = inflater.inflate(R.layout.folder_list_item, parent, false);
|
||||
if (attachToParent) {
|
||||
parent.addView(root);
|
||||
}
|
||||
return bind(root);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static FolderListItemBinding bind(@NonNull View rootView) {
|
||||
// The body of this method is generated in a way you would not otherwise write.
|
||||
// This is done to optimize the compiled bytecode for size and performance.
|
||||
int id;
|
||||
missingId: {
|
||||
id = R.id.tv_folder_name;
|
||||
TextView tvFolderName = ViewBindings.findChildViewById(rootView, id);
|
||||
if (tvFolderName == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
return new FolderListItemBinding((LinearLayout) rootView, tvFolderName);
|
||||
}
|
||||
String missingId = rootView.getResources().getResourceName(id);
|
||||
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
|
||||
}
|
||||
}
|
@ -0,0 +1,391 @@
|
||||
// Generated by view binder compiler. Do not edit!
|
||||
package net.micode.notes.databinding;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.viewbinding.ViewBinding;
|
||||
import android.viewbinding.ViewBindings;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import java.lang.NullPointerException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import net.micode.notes.R;
|
||||
import net.micode.notes.ui.NoteEditText;
|
||||
|
||||
public final class NoteEditBinding implements ViewBinding {
|
||||
@NonNull
|
||||
private final FrameLayout rootView;
|
||||
|
||||
@NonNull
|
||||
public final ImageView btnSetBgColor;
|
||||
|
||||
@NonNull
|
||||
public final Button buttonPlayAudio;
|
||||
|
||||
@NonNull
|
||||
public final Button clearButton;
|
||||
|
||||
@NonNull
|
||||
public final LinearLayout fontSizeSelector;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivAlertIcon;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivBgBlue;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivBgBlueSelect;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivBgGreen;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivBgGreenSelect;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivBgRed;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivBgRedSelect;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivBgWhite;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivBgWhiteSelect;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivBgYellow;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivBgYellowSelect;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivLargeSelect;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivMediumSelect;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivSmallSelect;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivSuperSelect;
|
||||
|
||||
@NonNull
|
||||
public final FrameLayout llFontLarge;
|
||||
|
||||
@NonNull
|
||||
public final FrameLayout llFontNormal;
|
||||
|
||||
@NonNull
|
||||
public final FrameLayout llFontSmall;
|
||||
|
||||
@NonNull
|
||||
public final FrameLayout llFontSuper;
|
||||
|
||||
@NonNull
|
||||
public final LinearLayout noteBgColorSelector;
|
||||
|
||||
@NonNull
|
||||
public final LinearLayout noteEditList;
|
||||
|
||||
@NonNull
|
||||
public final NoteEditText noteEditView;
|
||||
|
||||
@NonNull
|
||||
public final LinearLayout noteTitle;
|
||||
|
||||
@NonNull
|
||||
public final LinearLayout svNoteEdit;
|
||||
|
||||
@NonNull
|
||||
public final TextView textNum;
|
||||
|
||||
@NonNull
|
||||
public final TextView tvAlertDate;
|
||||
|
||||
@NonNull
|
||||
public final TextView tvModifiedDate;
|
||||
|
||||
private NoteEditBinding(@NonNull FrameLayout rootView, @NonNull ImageView btnSetBgColor,
|
||||
@NonNull Button buttonPlayAudio, @NonNull Button clearButton,
|
||||
@NonNull LinearLayout fontSizeSelector, @NonNull ImageView ivAlertIcon,
|
||||
@NonNull ImageView ivBgBlue, @NonNull ImageView ivBgBlueSelect, @NonNull ImageView ivBgGreen,
|
||||
@NonNull ImageView ivBgGreenSelect, @NonNull ImageView ivBgRed,
|
||||
@NonNull ImageView ivBgRedSelect, @NonNull ImageView ivBgWhite,
|
||||
@NonNull ImageView ivBgWhiteSelect, @NonNull ImageView ivBgYellow,
|
||||
@NonNull ImageView ivBgYellowSelect, @NonNull ImageView ivLargeSelect,
|
||||
@NonNull ImageView ivMediumSelect, @NonNull ImageView ivSmallSelect,
|
||||
@NonNull ImageView ivSuperSelect, @NonNull FrameLayout llFontLarge,
|
||||
@NonNull FrameLayout llFontNormal, @NonNull FrameLayout llFontSmall,
|
||||
@NonNull FrameLayout llFontSuper, @NonNull LinearLayout noteBgColorSelector,
|
||||
@NonNull LinearLayout noteEditList, @NonNull NoteEditText noteEditView,
|
||||
@NonNull LinearLayout noteTitle, @NonNull LinearLayout svNoteEdit, @NonNull TextView textNum,
|
||||
@NonNull TextView tvAlertDate, @NonNull TextView tvModifiedDate) {
|
||||
this.rootView = rootView;
|
||||
this.btnSetBgColor = btnSetBgColor;
|
||||
this.buttonPlayAudio = buttonPlayAudio;
|
||||
this.clearButton = clearButton;
|
||||
this.fontSizeSelector = fontSizeSelector;
|
||||
this.ivAlertIcon = ivAlertIcon;
|
||||
this.ivBgBlue = ivBgBlue;
|
||||
this.ivBgBlueSelect = ivBgBlueSelect;
|
||||
this.ivBgGreen = ivBgGreen;
|
||||
this.ivBgGreenSelect = ivBgGreenSelect;
|
||||
this.ivBgRed = ivBgRed;
|
||||
this.ivBgRedSelect = ivBgRedSelect;
|
||||
this.ivBgWhite = ivBgWhite;
|
||||
this.ivBgWhiteSelect = ivBgWhiteSelect;
|
||||
this.ivBgYellow = ivBgYellow;
|
||||
this.ivBgYellowSelect = ivBgYellowSelect;
|
||||
this.ivLargeSelect = ivLargeSelect;
|
||||
this.ivMediumSelect = ivMediumSelect;
|
||||
this.ivSmallSelect = ivSmallSelect;
|
||||
this.ivSuperSelect = ivSuperSelect;
|
||||
this.llFontLarge = llFontLarge;
|
||||
this.llFontNormal = llFontNormal;
|
||||
this.llFontSmall = llFontSmall;
|
||||
this.llFontSuper = llFontSuper;
|
||||
this.noteBgColorSelector = noteBgColorSelector;
|
||||
this.noteEditList = noteEditList;
|
||||
this.noteEditView = noteEditView;
|
||||
this.noteTitle = noteTitle;
|
||||
this.svNoteEdit = svNoteEdit;
|
||||
this.textNum = textNum;
|
||||
this.tvAlertDate = tvAlertDate;
|
||||
this.tvModifiedDate = tvModifiedDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public FrameLayout getRoot() {
|
||||
return rootView;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static NoteEditBinding inflate(@NonNull LayoutInflater inflater) {
|
||||
return inflate(inflater, null, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static NoteEditBinding inflate(@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup parent, boolean attachToParent) {
|
||||
View root = inflater.inflate(R.layout.note_edit, parent, false);
|
||||
if (attachToParent) {
|
||||
parent.addView(root);
|
||||
}
|
||||
return bind(root);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static NoteEditBinding bind(@NonNull View rootView) {
|
||||
// The body of this method is generated in a way you would not otherwise write.
|
||||
// This is done to optimize the compiled bytecode for size and performance.
|
||||
int id;
|
||||
missingId: {
|
||||
id = R.id.btn_set_bg_color;
|
||||
ImageView btnSetBgColor = ViewBindings.findChildViewById(rootView, id);
|
||||
if (btnSetBgColor == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.button_play_audio;
|
||||
Button buttonPlayAudio = ViewBindings.findChildViewById(rootView, id);
|
||||
if (buttonPlayAudio == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.clearButton;
|
||||
Button clearButton = ViewBindings.findChildViewById(rootView, id);
|
||||
if (clearButton == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.font_size_selector;
|
||||
LinearLayout fontSizeSelector = ViewBindings.findChildViewById(rootView, id);
|
||||
if (fontSizeSelector == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_alert_icon;
|
||||
ImageView ivAlertIcon = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivAlertIcon == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_bg_blue;
|
||||
ImageView ivBgBlue = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivBgBlue == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_bg_blue_select;
|
||||
ImageView ivBgBlueSelect = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivBgBlueSelect == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_bg_green;
|
||||
ImageView ivBgGreen = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivBgGreen == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_bg_green_select;
|
||||
ImageView ivBgGreenSelect = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivBgGreenSelect == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_bg_red;
|
||||
ImageView ivBgRed = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivBgRed == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_bg_red_select;
|
||||
ImageView ivBgRedSelect = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivBgRedSelect == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_bg_white;
|
||||
ImageView ivBgWhite = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivBgWhite == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_bg_white_select;
|
||||
ImageView ivBgWhiteSelect = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivBgWhiteSelect == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_bg_yellow;
|
||||
ImageView ivBgYellow = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivBgYellow == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_bg_yellow_select;
|
||||
ImageView ivBgYellowSelect = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivBgYellowSelect == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_large_select;
|
||||
ImageView ivLargeSelect = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivLargeSelect == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_medium_select;
|
||||
ImageView ivMediumSelect = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivMediumSelect == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_small_select;
|
||||
ImageView ivSmallSelect = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivSmallSelect == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_super_select;
|
||||
ImageView ivSuperSelect = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivSuperSelect == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.ll_font_large;
|
||||
FrameLayout llFontLarge = ViewBindings.findChildViewById(rootView, id);
|
||||
if (llFontLarge == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.ll_font_normal;
|
||||
FrameLayout llFontNormal = ViewBindings.findChildViewById(rootView, id);
|
||||
if (llFontNormal == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.ll_font_small;
|
||||
FrameLayout llFontSmall = ViewBindings.findChildViewById(rootView, id);
|
||||
if (llFontSmall == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.ll_font_super;
|
||||
FrameLayout llFontSuper = ViewBindings.findChildViewById(rootView, id);
|
||||
if (llFontSuper == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.note_bg_color_selector;
|
||||
LinearLayout noteBgColorSelector = ViewBindings.findChildViewById(rootView, id);
|
||||
if (noteBgColorSelector == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.note_edit_list;
|
||||
LinearLayout noteEditList = ViewBindings.findChildViewById(rootView, id);
|
||||
if (noteEditList == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.note_edit_view;
|
||||
NoteEditText noteEditView = ViewBindings.findChildViewById(rootView, id);
|
||||
if (noteEditView == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.note_title;
|
||||
LinearLayout noteTitle = ViewBindings.findChildViewById(rootView, id);
|
||||
if (noteTitle == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.sv_note_edit;
|
||||
LinearLayout svNoteEdit = ViewBindings.findChildViewById(rootView, id);
|
||||
if (svNoteEdit == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.text_num;
|
||||
TextView textNum = ViewBindings.findChildViewById(rootView, id);
|
||||
if (textNum == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.tv_alert_date;
|
||||
TextView tvAlertDate = ViewBindings.findChildViewById(rootView, id);
|
||||
if (tvAlertDate == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.tv_modified_date;
|
||||
TextView tvModifiedDate = ViewBindings.findChildViewById(rootView, id);
|
||||
if (tvModifiedDate == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
return new NoteEditBinding((FrameLayout) rootView, btnSetBgColor, buttonPlayAudio,
|
||||
clearButton, fontSizeSelector, ivAlertIcon, ivBgBlue, ivBgBlueSelect, ivBgGreen,
|
||||
ivBgGreenSelect, ivBgRed, ivBgRedSelect, ivBgWhite, ivBgWhiteSelect, ivBgYellow,
|
||||
ivBgYellowSelect, ivLargeSelect, ivMediumSelect, ivSmallSelect, ivSuperSelect,
|
||||
llFontLarge, llFontNormal, llFontSmall, llFontSuper, noteBgColorSelector, noteEditList,
|
||||
noteEditView, noteTitle, svNoteEdit, textNum, tvAlertDate, tvModifiedDate);
|
||||
}
|
||||
String missingId = rootView.getResources().getResourceName(id);
|
||||
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
// Generated by view binder compiler. Do not edit!
|
||||
package net.micode.notes.databinding;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.viewbinding.ViewBinding;
|
||||
import android.viewbinding.ViewBindings;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.LinearLayout;
|
||||
import java.lang.NullPointerException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import net.micode.notes.R;
|
||||
import net.micode.notes.ui.NoteEditText;
|
||||
|
||||
public final class NoteEditListItemBinding implements ViewBinding {
|
||||
@NonNull
|
||||
private final LinearLayout rootView;
|
||||
|
||||
@NonNull
|
||||
public final CheckBox cbEditItem;
|
||||
|
||||
@NonNull
|
||||
public final NoteEditText etEditText;
|
||||
|
||||
private NoteEditListItemBinding(@NonNull LinearLayout rootView, @NonNull CheckBox cbEditItem,
|
||||
@NonNull NoteEditText etEditText) {
|
||||
this.rootView = rootView;
|
||||
this.cbEditItem = cbEditItem;
|
||||
this.etEditText = etEditText;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public LinearLayout getRoot() {
|
||||
return rootView;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static NoteEditListItemBinding inflate(@NonNull LayoutInflater inflater) {
|
||||
return inflate(inflater, null, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static NoteEditListItemBinding inflate(@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup parent, boolean attachToParent) {
|
||||
View root = inflater.inflate(R.layout.note_edit_list_item, parent, false);
|
||||
if (attachToParent) {
|
||||
parent.addView(root);
|
||||
}
|
||||
return bind(root);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static NoteEditListItemBinding bind(@NonNull View rootView) {
|
||||
// The body of this method is generated in a way you would not otherwise write.
|
||||
// This is done to optimize the compiled bytecode for size and performance.
|
||||
int id;
|
||||
missingId: {
|
||||
id = R.id.cb_edit_item;
|
||||
CheckBox cbEditItem = ViewBindings.findChildViewById(rootView, id);
|
||||
if (cbEditItem == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.et_edit_text;
|
||||
NoteEditText etEditText = ViewBindings.findChildViewById(rootView, id);
|
||||
if (etEditText == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
return new NoteEditListItemBinding((LinearLayout) rootView, cbEditItem, etEditText);
|
||||
}
|
||||
String missingId = rootView.getResources().getResourceName(id);
|
||||
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
|
||||
}
|
||||
}
|
@ -0,0 +1,119 @@
|
||||
// Generated by view binder compiler. Do not edit!
|
||||
package net.micode.notes.databinding;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.viewbinding.ViewBinding;
|
||||
import android.viewbinding.ViewBindings;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import java.lang.NullPointerException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import net.micode.notes.R;
|
||||
|
||||
public final class NoteItemBinding implements ViewBinding {
|
||||
@NonNull
|
||||
private final FrameLayout rootView;
|
||||
|
||||
@NonNull
|
||||
public final CheckBox checkbox;
|
||||
|
||||
@NonNull
|
||||
public final ImageView ivAlertIcon;
|
||||
|
||||
@NonNull
|
||||
public final FrameLayout noteItem;
|
||||
|
||||
@NonNull
|
||||
public final TextView tvName;
|
||||
|
||||
@NonNull
|
||||
public final TextView tvTime;
|
||||
|
||||
@NonNull
|
||||
public final TextView tvTitle;
|
||||
|
||||
private NoteItemBinding(@NonNull FrameLayout rootView, @NonNull CheckBox checkbox,
|
||||
@NonNull ImageView ivAlertIcon, @NonNull FrameLayout noteItem, @NonNull TextView tvName,
|
||||
@NonNull TextView tvTime, @NonNull TextView tvTitle) {
|
||||
this.rootView = rootView;
|
||||
this.checkbox = checkbox;
|
||||
this.ivAlertIcon = ivAlertIcon;
|
||||
this.noteItem = noteItem;
|
||||
this.tvName = tvName;
|
||||
this.tvTime = tvTime;
|
||||
this.tvTitle = tvTitle;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public FrameLayout getRoot() {
|
||||
return rootView;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static NoteItemBinding inflate(@NonNull LayoutInflater inflater) {
|
||||
return inflate(inflater, null, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static NoteItemBinding inflate(@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup parent, boolean attachToParent) {
|
||||
View root = inflater.inflate(R.layout.note_item, parent, false);
|
||||
if (attachToParent) {
|
||||
parent.addView(root);
|
||||
}
|
||||
return bind(root);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static NoteItemBinding bind(@NonNull View rootView) {
|
||||
// The body of this method is generated in a way you would not otherwise write.
|
||||
// This is done to optimize the compiled bytecode for size and performance.
|
||||
int id;
|
||||
missingId: {
|
||||
id = android.R.id.checkbox;
|
||||
CheckBox checkbox = ViewBindings.findChildViewById(rootView, id);
|
||||
if (checkbox == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.iv_alert_icon;
|
||||
ImageView ivAlertIcon = ViewBindings.findChildViewById(rootView, id);
|
||||
if (ivAlertIcon == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
FrameLayout noteItem = (FrameLayout) rootView;
|
||||
|
||||
id = R.id.tv_name;
|
||||
TextView tvName = ViewBindings.findChildViewById(rootView, id);
|
||||
if (tvName == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.tv_time;
|
||||
TextView tvTime = ViewBindings.findChildViewById(rootView, id);
|
||||
if (tvTime == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.tv_title;
|
||||
TextView tvTitle = ViewBindings.findChildViewById(rootView, id);
|
||||
if (tvTitle == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
return new NoteItemBinding((FrameLayout) rootView, checkbox, ivAlertIcon, noteItem, tvName,
|
||||
tvTime, tvTitle);
|
||||
}
|
||||
String missingId = rootView.getResources().getResourceName(id);
|
||||
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
|
||||
}
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
// Generated by view binder compiler. Do not edit!
|
||||
package net.micode.notes.databinding;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.viewbinding.ViewBinding;
|
||||
import android.viewbinding.ViewBindings;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import java.lang.NullPointerException;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import net.micode.notes.R;
|
||||
|
||||
public final class NoteListBinding implements ViewBinding {
|
||||
@NonNull
|
||||
private final FrameLayout rootView;
|
||||
|
||||
@NonNull
|
||||
public final Button btnNewNote;
|
||||
|
||||
@NonNull
|
||||
public final ListView notesList;
|
||||
|
||||
@NonNull
|
||||
public final TextView tvTitleBar;
|
||||
|
||||
private NoteListBinding(@NonNull FrameLayout rootView, @NonNull Button btnNewNote,
|
||||
@NonNull ListView notesList, @NonNull TextView tvTitleBar) {
|
||||
this.rootView = rootView;
|
||||
this.btnNewNote = btnNewNote;
|
||||
this.notesList = notesList;
|
||||
this.tvTitleBar = tvTitleBar;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public FrameLayout getRoot() {
|
||||
return rootView;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static NoteListBinding inflate(@NonNull LayoutInflater inflater) {
|
||||
return inflate(inflater, null, false);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static NoteListBinding inflate(@NonNull LayoutInflater inflater,
|
||||
@Nullable ViewGroup parent, boolean attachToParent) {
|
||||
View root = inflater.inflate(R.layout.note_list, parent, false);
|
||||
if (attachToParent) {
|
||||
parent.addView(root);
|
||||
}
|
||||
return bind(root);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static NoteListBinding bind(@NonNull View rootView) {
|
||||
// The body of this method is generated in a way you would not otherwise write.
|
||||
// This is done to optimize the compiled bytecode for size and performance.
|
||||
int id;
|
||||
missingId: {
|
||||
id = R.id.btn_new_note;
|
||||
Button btnNewNote = ViewBindings.findChildViewById(rootView, id);
|
||||
if (btnNewNote == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.notes_list;
|
||||
ListView notesList = ViewBindings.findChildViewById(rootView, id);
|
||||
if (notesList == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
id = R.id.tv_title_bar;
|
||||
TextView tvTitleBar = ViewBindings.findChildViewById(rootView, id);
|
||||
if (tvTitleBar == null) {
|
||||
break missingId;
|
||||
}
|
||||
|
||||
return new NoteListBinding((FrameLayout) rootView, btnNewNote, notesList, tvTitleBar);
|
||||
}
|
||||
String missingId = rootView.getResources().getResourceName(id);
|
||||
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue