zxc_branch
ps9up4ig6 2 years ago
commit c1d1830965

@ -1,2 +1,59 @@
# 小米便签
#### 目录组织:
+ model: 存放UML模型
+ doc: 存放各类文档
+ src: 存放源程序代码
+ other: 存放综合实践的总结、自评和汇报PPT等
+ README.md
#### 课外实验一
☑软件需求文档;
☑软件体系结构图,描述开源软件的模块构成;
☑SonarQube的开源软件质量报告
#### 课外实验二
☑理解开源代码的语义,撰写技术博客总结精读的成果及心得体会
☑具有标注的开源软件代码及其文件;
#### 课外实验三
UML用例图模型和软件需求描述文档
开源软件新增需求的用例交互图、分析类图、状态图以及软件需求规格说明书;
#### 课外实验四
软件体系结构模型(至少包括逻辑视点和物理视点的体系结构模型)
软件体系结构设计文档;
#### 课外实验五
用户界面原型用户界面的UML类图模型以及界面跳转的顺序图模型
#### 课外实验六
用类图、顺序图、活动图、状态图等描述的详细设计模型;
#### 课外实验七
开源软件的维护代码;
#### 课外实验八
反馈通过测试发现的软件缺陷
#### 课外实验九
可运行和可展示的开源软件系统;
#### 课外实验十
汇报PPT、技术博客等

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

@ -39,9 +39,6 @@
android:icon="@drawable/icon_app"
android:label="@string/app_name">
<!-- 移除android:label="@string/app_name"-->
<!-- 原因Redundant label can be removed.冗余标签可以移除第41行已经给出-->
<activity
android:name=".ui.NotesListActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
@ -159,22 +156,22 @@
<receiver
android:name="net.micode.notes.ui.AlarmReceiver"
android:process=":remote"></receiver>
android:process=":remote" />
<activity
android:name=".ui.AlarmAlertActivity"
android:launchMode="singleInstance"
android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar"></activity>
android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar" />
<activity
android:name="net.micode.notes.ui.NotesPreferenceActivity"
android:label="@string/preferences_title"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Holo.Light"></activity>
android:theme="@android:style/Theme.Holo.Light" />
<service
android:name="net.micode.notes.gtask.remote.GTaskSyncService"
android:exported="false"></service>
android:exported="false" />
<meta-data
android:name="android.app.default_searchable"

@ -1,3 +1,4 @@
// Apache许可证协议
/*
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
*

@ -24,10 +24,10 @@ public class Notes {
public static final int TYPE_FOLDER = 1;
public static final int TYPE_SYSTEM = 2;
/**
/*
* Following IDs are system folders' identifiers
* {@link Notes#ID_ROOT_FOLDER } is default folder
* {@link Notes#ID_TEMPARAY_FOLDER } is for notes belonging no folder
* {@link Notes#ID_TEMPORARY_FOLDER } is for notes belonging no folder
* {@link Notes#ID_CALL_RECORD_FOLDER} is to store call records
*/
public static final int ID_ROOT_FOLDER = 0;
@ -206,35 +206,35 @@ public class Notes {
public static final String CONTENT = "content";
/**
/*
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* integer data type
* <P> Type: INTEGER </P>
*/
public static final String DATA1 = "data1";
/**
/*
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* integer data type
* <P> Type: INTEGER </P>
*/
public static final String DATA2 = "data2";
/**
/*
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* TEXT data type
* <P> Type: TEXT </P>
*/
public static final String DATA3 = "data3";
/**
/*
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* TEXT data type
* <P> Type: TEXT </P>
*/
public static final String DATA4 = "data4";
/**
/*
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* TEXT data type
* <P> Type: TEXT </P>

@ -50,11 +50,11 @@ public abstract class NoteWidgetProvider extends AppWidgetProvider { // 小米
public void onDeleted(Context context, int[] appWidgetIds) { // 重写删除窗口小部件函数
ContentValues values = new ContentValues();
values.put(NoteColumns.WIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
for (int i = 0; i < appWidgetIds.length; i++) {
for (int appWidgetId : appWidgetIds) {
context.getContentResolver().update(Notes.CONTENT_NOTE_URI,
values,
NoteColumns.WIDGET_ID + "=?",
new String[] { String.valueOf(appWidgetIds[i])});
new String[]{String.valueOf(appWidgetId)});
}
}
@ -72,19 +72,22 @@ public abstract class NoteWidgetProvider extends AppWidgetProvider { // 小米
private void update(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds,
boolean privacyMode) { // 更新窗口小部件中的内容
for (int i = 0; i < appWidgetIds.length; i++) {
if (appWidgetIds[i] != AppWidgetManager.INVALID_APPWIDGET_ID) {
/*
* Generate the pending intent to start host for the widget
*/
for (int appWidgetId : appWidgetIds) {
if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {
int bgId = ResourceParser.getDefaultBgId(context);
String snippet = "";
Intent intent = new Intent(context, NoteEditActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra(Notes.INTENT_EXTRA_WIDGET_ID, appWidgetIds[i]);
intent.putExtra(Notes.INTENT_EXTRA_WIDGET_ID, appWidgetId);
intent.putExtra(Notes.INTENT_EXTRA_WIDGET_TYPE, getWidgetType());
Cursor c = getNoteWidgetInfo(context, appWidgetIds[i]);
Cursor c = getNoteWidgetInfo(context, appWidgetId);
if (c != null && c.moveToFirst()) {
if (c.getCount() > 1) {
Log.e(TAG, "Multiple message with same widget id:" + appWidgetIds[i]);
Log.e(TAG, "Multiple message with same widget id:" + appWidgetId);
c.close();
return;
}
@ -104,23 +107,23 @@ public abstract class NoteWidgetProvider extends AppWidgetProvider { // 小米
RemoteViews rv = new RemoteViews(context.getPackageName(), getLayoutId());
rv.setImageViewResource(R.id.widget_bg_image, getBgResourceId(bgId));
intent.putExtra(Notes.INTENT_EXTRA_BACKGROUND_ID, bgId);
/**
/*
* Generate the pending intent to start host for the widget
*/
PendingIntent pendingIntent = null;
if (privacyMode) {
rv.setTextViewText(R.id.widget_text,
context.getString(R.string.widget_under_visit_mode));
pendingIntent = PendingIntent.getActivity(context, appWidgetIds[i], new Intent(
pendingIntent = PendingIntent.getActivity(context, appWidgetId, new Intent(
context, NotesListActivity.class), PendingIntent.FLAG_UPDATE_CURRENT);
} else {
rv.setTextViewText(R.id.widget_text, snippet);
pendingIntent = PendingIntent.getActivity(context, appWidgetIds[i], intent,
pendingIntent = PendingIntent.getActivity(context, appWidgetId, intent,
PendingIntent.FLAG_UPDATE_CURRENT);
}
rv.setOnClickPendingIntent(R.id.widget_text, pendingIntent);
appWidgetManager.updateAppWidget(appWidgetIds[i], rv);
appWidgetManager.updateAppWidget(appWidgetId, rv);
}
}
}
@ -129,5 +132,5 @@ public abstract class NoteWidgetProvider extends AppWidgetProvider { // 小米
protected abstract int getLayoutId(); // 获取布局ID
protected abstract int getWidgetType(); // 获取窗口小部件的类型即2x2型或者4x4型
protected abstract int getWidgetType(); // 获取窗口小部件的类型即2x2型或者3x3型或者4x4型
}

@ -1,3 +1,18 @@
/*
* 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.widget;
import android.appwidget.AppWidgetManager;

@ -16,7 +16,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="#88555555" />
<item android:state_selected="true" android:color="#ff999999" />
<item android:color="#ff000000" />
<item android:color="#88555555" android:state_pressed="true" />
<item android:color="#ff999999" android:state_selected="true" />
<item android:color="#ff000000" />
</selector>

@ -16,5 +16,5 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#50000000" />
<item android:color="#50000000" />
</selector>

@ -1,23 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/new_note_pressed" />
<item
android:drawable="@drawable/new_note_normal" />
<item android:drawable="@drawable/new_note_pressed" android:state_pressed="true" />
<item android:drawable="@drawable/new_note_normal" />
</selector>

@ -24,13 +24,13 @@
<TextView
android:id="@+id/account_dialog_title"
style="?android:attr/textAppearanceMedium"
android:singleLine="true"
android:ellipsize="end"
android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-2.7dip"
android:layout_marginBottom="-2.7dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
android:ellipsize="end"
android:gravity="center"
android:singleLine="true" />
<TextView
android:id="@+id/account_dialog_subtitle"
@ -38,6 +38,6 @@
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:layout_marginBottom="1dip"
android:gravity="center"/>
android:gravity="center" />
</LinearLayout>

@ -19,14 +19,14 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="50dip"
android:gravity="center_vertical"
android:minHeight="50dip"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/preferences_add_account" />
android:text="@string/preferences_add_account"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>

@ -19,5 +19,5 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/et_foler_name"
android:layout_width="fill_parent"
android:hint="@string/hint_foler_name"
android:layout_height="fill_parent" />
android:layout_height="fill_parent"
android:hint="@string/hint_foler_name" />

@ -18,7 +18,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="50dip" >
android:minHeight="50dip">
<TextView
android:id="@+id/tv_folder_name"

@ -24,16 +24,16 @@
android:id="@+id/cb_edit_item"
android:layout_width="wrap_content"
android:layout_height="28dip"
android:layout_gravity="top|left"
android:checked="false"
android:focusable="false"
android:layout_gravity="top|left" />
android:focusable="false" />
<net.micode.notes.ui.NoteEditText
android:id="@+id/et_edit_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:lineSpacingMultiplier="1.2"
android:layout_gravity="center_vertical"
android:textAppearance="@style/TextAppearancePrimaryItem"
android:background="@null" />
android:background="@null"
android:lineSpacingMultiplier="1.2"
android:textAppearance="@style/TextAppearancePrimaryItem" />
</LinearLayout>

@ -65,8 +65,8 @@
android:id="@android:id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:clickable="false"
android:focusable="false"
android:visibility="gone" />
</LinearLayout>
@ -74,5 +74,5 @@
android:id="@+id/iv_alert_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|right"/>
android:layout_gravity="top|right" />
</FrameLayout>

@ -31,11 +31,11 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/title_bar_bg"
android:visibility="gone"
android:gravity="center_vertical"
android:singleLine="true"
android:textColor="#FFEAD1AE"
android:textSize="@dimen/text_font_size_medium" />
android:textSize="@dimen/text_font_size_medium"
android:visibility="gone" />
<ListView
android:id="@+id/notes_list"
@ -43,16 +43,16 @@
android:layout_height="0dip"
android:layout_weight="1"
android:cacheColorHint="@null"
android:listSelector="@android:color/transparent"
android:divider="@null"
android:fadingEdge="@null" />
android:fadingEdge="@null"
android:listSelector="@android:color/transparent" />
</LinearLayout>
<Button
android:id="@+id/btn_new_note"
android:background="@drawable/new_note"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:layout_gravity="bottom" />
android:layout_gravity="bottom"
android:background="@drawable/new_note"
android:focusable="false" />
</FrameLayout>

@ -19,6 +19,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="100dip"
android:visibility="invisible"
android:background="@drawable/list_footer_bg"
android:focusable="false"
android:background="@drawable/list_footer_bg" />
android:visibility="invisible" />

@ -23,19 +23,19 @@
<Button
android:id="@+id/preference_sync_button"
style="?android:attr/textAppearanceMedium"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dip"
android:layout_marginLeft="30dip"
android:layout_marginTop="15dip"
android:layout_marginRight="30dip"
style="?android:attr/textAppearanceMedium"
android:text="@string/preferences_button_sync_immediately"/>
android:text="@string/preferences_button_sync_immediately" />
<TextView
android:id="@+id/prefenerece_sync_status_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"/>
android:visibility="gone" />
</LinearLayout>

@ -19,19 +19,21 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="146dip"
android:layout_height="146dip">
<ImageView
android:id="@+id/widget_bg_image"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView
android:id="@+id/widget_text"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="20dip"
android:lineSpacingMultiplier="1.2"
android:maxLines="6"
android:paddingLeft="15dip"
android:paddingTop="20dip"
android:paddingRight="15dip"
android:textSize="14sp"
android:textColor="#FF663300"
android:maxLines="6"
android:lineSpacingMultiplier="1.2" />
android:textSize="14sp" />
</FrameLayout>

@ -4,19 +4,21 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="220dip"
android:layout_height="220dip">
<ImageView
android:id="@+id/widget_bg_image"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView
android:id="@+id/widget_text"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="30dip"
android:lineSpacingMultiplier="1.2"
android:maxLines="9"
android:paddingLeft="15dip"
android:paddingTop="30dip"
android:paddingRight="15dip"
android:textSize="14sp"
android:textColor="#FF663300"
android:maxLines="9"
android:lineSpacingMultiplier="1.2" />
android:textSize="14sp" />
</FrameLayout>

@ -29,11 +29,11 @@
android:id="@+id/widget_text"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="40dip"
android:lineSpacingMultiplier="1.2"
android:maxLines="12"
android:paddingLeft="15dip"
android:paddingTop="40dip"
android:paddingRight="15dip"
android:textSize="14sp"
android:textColor="#FF663300"
android:maxLines="12"
android:lineSpacingMultiplier="1.2" />
android:textSize="14sp" />
</FrameLayout>

@ -24,7 +24,7 @@
<item
android:id="@+id/menu_font_size"
android:title="@string/menu_font_size"/>
android:title="@string/menu_font_size" />
<item
android:id="@+id/menu_list_mode"
@ -32,11 +32,11 @@
<item
android:id="@+id/menu_share"
android:title="@string/menu_share"/>
android:title="@string/menu_share" />
<item
android:id="@+id/menu_send_to_desktop"
android:title="@string/menu_send_to_desktop"/>
android:title="@string/menu_send_to_desktop" />
<item
android:id="@+id/menu_alert"

@ -20,15 +20,15 @@
<item
android:id="@+id/menu_new_note"
android:title="@string/notelist_menu_new"/>
android:title="@string/notelist_menu_new" />
<item
android:id="@+id/menu_delete"
android:title="@string/menu_delete"/>
android:title="@string/menu_delete" />
<item
android:id="@+id/menu_font_size"
android:title="@string/menu_font_size"/>
android:title="@string/menu_font_size" />
<item
android:id="@+id/menu_list_mode"
@ -36,11 +36,11 @@
<item
android:id="@+id/menu_share"
android:title="@string/menu_share"/>
android:title="@string/menu_share" />
<item
android:id="@+id/menu_send_to_desktop"
android:title="@string/menu_send_to_desktop"/>
android:title="@string/menu_send_to_desktop" />
<item
android:id="@+id/menu_alert"

@ -19,15 +19,15 @@
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_new_folder"
android:title="@string/menu_create_folder"/>
android:title="@string/menu_create_folder" />
<item
android:id="@+id/menu_export_text"
android:title="@string/menu_export_text"/>
android:title="@string/menu_export_text" />
<item
android:id="@+id/menu_sync"
android:title="@string/menu_sync"/>
android:title="@string/menu_sync" />
<item
android:id="@+id/menu_setting"
@ -35,5 +35,5 @@
<item
android:id="@+id/menu_search"
android:title="@string/menu_search"/>
android:title="@string/menu_search" />
</menu>

@ -16,5 +16,7 @@
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/action_select_all" android:title="@string/menu_select_all" />
<item
android:id="@+id/action_select_all"
android:title="@string/menu_select_all" />
</menu>

@ -19,13 +19,13 @@
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/move"
android:title="@string/menu_move"
android:icon="@drawable/menu_move"
android:showAsAction="always|withText" />
android:showAsAction="always|withText"
android:title="@string/menu_move" />
<item
android:id="@+id/delete"
android:title="@string/menu_delete"
android:icon="@drawable/menu_delete"
android:showAsAction="always|withText" />
android:showAsAction="always|withText"
android:title="@string/menu_delete" />
</menu>

@ -20,5 +20,5 @@
<item
android:id="@+id/menu_new_note"
android:title="@string/notelist_menu_new"/>
android:title="@string/notelist_menu_new" />
</menu>

@ -16,18 +16,22 @@
-->
<resources>
<style name="TextAppearanceSuper">
<item name="android:textSize">@dimen/text_font_size_super</item>
<item name="android:textColorLink">#0000ff</item>
</style>
<style name="TextAppearanceLarge">
<item name="android:textSize">@dimen/text_font_size_large</item>
<item name="android:textColorLink">#0000ff</item>
</style>
<style name="TextAppearanceMedium">
<item name="android:textSize">@dimen/text_font_size_medium</item>
<item name="android:textColorLink">#0000ff</item>
</style>
<style name="TextAppearanceNormal">
<item name="android:textSize">@dimen/text_font_size_normal</item>
<item name="android:textColorLink">#0000ff</item>
@ -49,7 +53,7 @@
</style>
<style name="HighlightTextAppearancePrimary">
<item name="android:textSize">@dimen/text_font_size_normal</item>
<item name="android:textSize">@dimen/text_font_size_normal</item>
<item name="android:textColor">@color/primary_text_dark</item>
</style>

@ -15,13 +15,10 @@
limitations under the License.
-->
<searchable
xmlns:android="http://schemas.android.com/apk/res/android"
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/search_label"
android:hint="@string/search_hint"
android:searchMode="queryRewriteFromText"
android:searchSuggestAuthority="notes"
android:searchSuggestIntentAction="android.intent.action.VIEW"
android:searchMode="queryRewriteFromText"
android:searchSettingsDescription="@string/search_setting_description"
android:includeInGlobalSearch="true" />
android:searchSuggestAuthority="notes"
android:searchSuggestIntentAction="android.intent.action.VIEW" />

@ -1,5 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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.
-->
<appwidget-provider
xmlns:android="http://schemas.android.com/apk/res/android"

Loading…
Cancel
Save