Compare commits

...

3 Commits

Author SHA1 Message Date
liuyx fec99da20f 修改页面样式
2 years ago
liuyx 3462e13579 调整目录结构
2 years ago
liuyx 2694cb14cf 添加UML类图
2 years ago

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Binary file not shown.

@ -1 +0,0 @@
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":3,"versionName":"1.3","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

@ -8,13 +8,13 @@
<application
android:theme="@style/DayTheme"
android:allowBackup="true"
android:icon="@mipmap/piggy_launcher"
android:icon="@mipmap/ic_app"
android:label="@string/app_name"
android:roundIcon="@mipmap/piggy_launcher_round"
android:roundIcon="@mipmap/ic_app_round"
android:supportsRtl="true"
>
<activity android:name="cc.liuyx.note.MainActivity"
<activity android:name="cc.liuyx.note.activity.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@ -24,11 +24,11 @@
</activity>
<activity android:name="cc.liuyx.note.EditActivity">
<activity android:name="cc.liuyx.note.activity.EditActivity">
</activity>
<activity android:name="cc.liuyx.note.FabColorActivity" />
<activity android:name="cc.liuyx.note.UserSettingsActivity" />
<activity android:name="cc.liuyx.note.activity.FabColorActivity" />
<activity android:name="cc.liuyx.note.activity.UserSettingsActivity" />
<activity android:name="cc.liuyx.note.alarm.EditAlarmActivity" />
<receiver android:name="cc.liuyx.note.alarm.AlarmReceiver" />

@ -1,4 +1,4 @@
package cc.liuyx.note;
package cc.liuyx.note.activity;
import android.app.Activity;
import android.content.BroadcastReceiver;

@ -1,4 +1,4 @@
package cc.liuyx.note;
package cc.liuyx.note.activity;
import android.annotation.SuppressLint;
import android.content.Context;

@ -1,4 +1,4 @@
package cc.liuyx.note;
package cc.liuyx.note.activity;
import android.annotation.SuppressLint;
import android.content.Intent;

@ -1,4 +1,4 @@
package cc.liuyx.note;
package cc.liuyx.note.activity;
import android.annotation.SuppressLint;
import android.app.AlarmManager;

@ -1,4 +1,4 @@
package cc.liuyx.note;
package cc.liuyx.note.activity;
import android.content.Intent;
import android.content.SharedPreferences;

@ -0,0 +1,63 @@
@startuml
title __ADAPTER's Class Diagram__\n
namespace cc.liuyx.note {
namespace adapter {
class cc.liuyx.note.adapter.NoteAdapter {
- backList : List<Note>
- mContext : Context
- noteList : List<Note>
+ NoteAdapter()
+ getCount()
+ getFilter()
+ getItem()
+ getItemId()
+ getView()
}
}
}
namespace cc.liuyx.note {
namespace adapter {
class cc.liuyx.note.adapter.NoteAdapter.MyFilter {
# performFiltering()
# publishResults()
}
}
}
namespace cc.liuyx.note {
namespace adapter {
class cc.liuyx.note.adapter.TagAdapter {
- context : Context
- numList : List<Integer>
- tagList : List<String>
+ TagAdapter()
+ getCount()
+ getItem()
+ getItemId()
+ getView()
}
}
}
cc.liuyx.note.adapter.NoteAdapter .up.|> android.widget.Filterable
cc.liuyx.note.adapter.NoteAdapter -up-|> android.widget.BaseAdapter
cc.liuyx.note.adapter.NoteAdapter o-- cc.liuyx.note.adapter.NoteAdapter.MyFilter : mFilter
cc.liuyx.note.adapter.NoteAdapter +-down- cc.liuyx.note.adapter.NoteAdapter.MyFilter
cc.liuyx.note.adapter.NoteAdapter.MyFilter -up-|> android.widget.Filter
cc.liuyx.note.adapter.TagAdapter -up-|> android.widget.BaseAdapter
right footer
PlantUML diagram generated by SketchIt! (https://bitbucket.org/pmesmeur/sketch.it)
For more information about this tool, please contact philippe.mesmeur@gmail.com
endfooter
@enduml

@ -10,7 +10,7 @@ import android.content.Intent;
import android.os.Build;
import android.support.v4.app.NotificationCompat;
import cc.liuyx.note.MainActivity;
import cc.liuyx.note.activity.MainActivity;
import com.example.atry.R;
public class AlarmReceiver extends BroadcastReceiver {

@ -20,7 +20,7 @@ import android.widget.TextView;
import android.widget.TimePicker;
import android.widget.Toast;
import cc.liuyx.note.BaseActivity;
import cc.liuyx.note.activity.BaseActivity;
import com.example.atry.R;

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -8,7 +8,7 @@
android:layout_margin="0dp"
android:background="?attr/lvBackground"
android:orientation="vertical"
tools:context="cc.liuyx.note.MainActivity">
tools:context="cc.liuyx.note.activity.MainActivity">
<View
android:layout_width="match_parent"
@ -81,7 +81,6 @@
android:id="@+id/lv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/my_toolbar"
android:layout_marginLeft="10dp"
android:layout_marginTop="8dp"
android:layout_marginRight="10dp"
@ -101,7 +100,6 @@
android:id="@+id/lv_plan"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/my_toolbar"
android:layout_marginLeft="10dp"
android:layout_marginTop="8dp"
android:layout_marginRight="10dp"
@ -118,7 +116,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="快去写下你的想法吧!"
android:text="@string/empty_content"
android:textSize="20sp"
android:visibility="gone" />

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="?attr/lvBackground"
>
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/my_toolbar"
@ -14,84 +13,95 @@
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
app:titleTextColor="?attr/titleColor"
app:title="新建计划"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
</android.support.v7.widget.Toolbar>
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:title="新建计划"
app:titleTextColor="?attr/titleColor"></android.support.v7.widget.Toolbar>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="5dp"
android:paddingRight="5dp">
<EditText
android:id="@+id/et_title"
android:layout_width="match_parent"
android:layout_height="60dp"
android:maxLines="1"
android:autofillHints=""
android:hint="@string/plan_title"
android:inputType="text"
android:maxLength="20"
android:textSize="28dp"
android:maxLines="1"
android:textColor="?attr/tvMainColor"
android:hint="Title (20 chars max)"
android:textSize="25sp" />
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal">
android:orientation="horizontal"
android:baselineAligned="false">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_weight="1.2">
android:layout_weight="1.2"
android:orientation="horizontal">
<TextView
style="@style/centerTV"
android:id="@+id/date"
style="@style/centerTV"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="18dp"
android:textColor="?attr/tvMainColor"/>
android:textColor="?attr/tvMainColor"
android:textSize="18sp"
tools:ignore="NestedWeights" />
<Button
android:id="@+id/set_date"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Set Date"
/>
android:text="@string/set_date" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_weight="1">
android:layout_weight="1"
android:orientation="horizontal">
<TextView
style="@style/centerTV"
android:id="@+id/time"
style="@style/centerTV"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="18dp"
android:textColor="?attr/tvMainColor"/>
android:textColor="?attr/tvMainColor"
android:textSize="18sp"
tools:ignore="NestedWeights" />
<Button
android:id="@+id/set_time"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Set Time"
/>
android:text="@string/set_time" />
</LinearLayout>
</LinearLayout>
<EditText
android:id="@+id/et"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:layout_margin="8dp"
android:textColor="?attr/tvMainColor"
android:textSize="24dp"
android:autofillHints=""
android:background="@null"
android:gravity="top"
android:hint="Content ( Optional )"
/>
android:hint="@string/plan_content"
android:inputType="text"
android:textColor="?attr/tvMainColor"
android:textSize="22sp" />
</LinearLayout>
</LinearLayout>

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/my_toolbar"
@ -14,111 +15,128 @@
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:title="Color of ADD button"
app:titleTextColor="?attr/titleColor"
/>
app:titleTextColor="?attr/titleColor" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp">
android:layout_marginRight="20dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:layout_weight="1">
tools:ignore="UseCompoundDrawables">
<TextView
style="@style/TVsetting"
android:text="Current:"
/>
android:text="@string/color_now" />
<ImageView
android:id="@+id/curFab"
style="@style/IVsetting"
android:background="@color/q"
/>
android:background="@color/q" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical"
android:layout_weight="1">
tools:ignore="UseCompoundDrawables">
<TextView
style="@style/TVsetting"
android:text="Default:"
/>
android:text="@string/color_default" />
<ImageView
android:id="@+id/defFab"
style="@style/IVsetting"
android:background="@color/fabColor1"
/>
android:background="@color/fabColor1" />
</LinearLayout>
</LinearLayout>
<TextView
style="@style/TVsetting"
android:text="Recommendation:"
/>
android:text="@string/color_recommendation" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/q"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_margin="10dp"
android:background="@color/q"
android:layout_weight="1"/>
android:layout_weight="1"
android:background="@color/q" />
<ImageView
android:id="@+id/w"
android:background="@color/w"
style="@style/IVsetting"/>
style="@style/IVsetting"
android:background="@color/w" />
<ImageView
android:id="@+id/e"
style="@style/IVsetting"
android:background="@color/e" />
<ImageView
android:id="@+id/r"
android:background="@color/r"
style="@style/IVsetting"/>
style="@style/IVsetting"
android:background="@color/r" />
<ImageView
android:id="@+id/t"
android:background="@color/t"
style="@style/IVsetting"/>
style="@style/IVsetting"
android:background="@color/t" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="80dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/y"
android:background="@color/y"
style="@style/IVsetting"/>
style="@style/IVsetting"
android:background="@color/y" />
<ImageView
android:id="@+id/u"
android:background="@color/u"
style="@style/IVsetting"/>
style="@style/IVsetting"
android:background="@color/u" />
<ImageView
android:id="@+id/i"
android:background="@color/i"
style="@style/IVsetting"/>
style="@style/IVsetting"
android:background="@color/i" />
<ImageView
android:id="@+id/o"
android:background="@color/o"
style="@style/IVsetting"/>
style="@style/IVsetting"
android:background="@color/o" />
<ImageView
android:id="@+id/p"
android:background="@color/p"
style="@style/IVsetting"/>
style="@style/IVsetting"
android:background="@color/p" />
</LinearLayout>
</LinearLayout>
</ScrollView>

@ -1,12 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:focusable="true"
android:background="?attr/lvBackground"
android:clickable="true"
android:background="?attr/lvBackground">
android:focusable="true"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/my_toolbar"
android:layout_width="match_parent"
@ -14,80 +16,117 @@
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:navigationIcon="@mipmap/ic_app"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:title="简言"
app:titleTextColor="?attr/titleColor"/>
app:titleTextColor="?attr/titleColor" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
tools:ignore="MissingConstraints,UseCompoundDrawables">
<ImageView
android:id="@+id/setting_settings_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="10dp"
android:src="@drawable/ic_setting" />
<TextView
android:id="@+id/setting_settings_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:text="@string/setting"
android:textColor="?attr/tvMainColor"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:clickable="true"
android:focusable="true"
android:orientation="horizontal"
tools:ignore="MissingConstraints,UseCompoundDrawables">
<ImageView
android:id="@+id/setting_about_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="10dp"
android:src="@drawable/ic_more" />
<TextView
android:id="@+id/setting_about_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:text="@string/about"
android:textColor="?attr/tvMainColor"
android:textSize="18sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:clickable="true"
android:orientation="vertical"
>
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal"
android:focusable="true"
android:clickable="true"
>
<ImageView
android:id="@+id/setting_settings_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:src="?attr/settingIcon"
android:layout_gravity="center"
/>
<TextView
android:id="@+id/setting_settings_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="设置"
android:textColor="?attr/tvMainColor"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:layout_gravity="center"
android:textSize="18sp"/>
</LinearLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/black"
android:alpha="0.2"/>
<ListView
android:id="@+id/lv_tag"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:alpha="0.2"
android:background="@color/black" />
</ListView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal"
android:background="?attr/tvBackground">
android:orientation="horizontal">
<ImageView
android:layout_width="44dp"
android:layout_height="match_parent"
android:src="?attr/addTag"/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="10dp"
android:src="@drawable/ic_edit" />
<TextView
android:id="@+id/add_tag"
android:clickable="true"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:text="Add New Tag"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:text="@string/add_tag"
android:textColor="?attr/tvMainColor"
android:textSize="20sp"
android:layout_marginStart="12dp"
android:focusable="true" />
android:textSize="20sp" />
</LinearLayout>
<ListView
android:id="@+id/lv_tag"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>

@ -1,23 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="48dp"
>
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
android:orientation="horizontal">
<TextView
android:id="@+id/blank_tag"
android:layout_width="44dp"
android:textSize="22dp"
android:textColor="?attr/tvMainColor"
android:gravity="center"
android:layout_height="match_parent"
android:layout_gravity="center"
/>
android:gravity="center"
android:textColor="?attr/tvMainColor"
android:textSize="20sp" />
<TextView
android:id="@+id/text_tag"
@ -27,18 +26,17 @@
android:layout_weight="1"
android:gravity="center_vertical"
android:textColor="?attr/tvMainColor"
android:textSize="24dp" />
android:textSize="20sp" />
</LinearLayout>
<ImageView
android:id="@+id/delete_tag"
android:layout_width="44dp"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:visibility="invisible"
android:src="?attr/removeTag"
android:background="?attr/tvBackground"
android:clickable="true"
/>
android:focusable="true"
android:src="?attr/removeTag"
android:visibility="invisible" />
</LinearLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

@ -1,12 +1,23 @@
<resources>
<string name="app_name">Piggy Note</string>
<string name="pref_night_summary">Turn on / off night mode</string>
<string name="pref_reversesort_summary">Reverse the time order of current items</string>
<string name="pref_reversesort">Reverse Time Order</string>
<string name="pref_fabcolor_summary">Choose the color of ADD NOTE button</string>
<string name="pref_fabcolor">Customize ADD NOTE button</string>
<string name="pref_fabplancolor_summary">Choose the color of ADD PLAN button</string>
<string name="pref_fabplancolor">Customize ADD PLAN button</string>
<string name="pref_notetitle">Note Title Style</string>
<string name="pref_notetitle_summary">Set the first line of note as its title</string>
<string name="app_name">简言</string>
<string name="pref_night_summary">开启 or 关闭黑夜模式</string>
<string name="pref_reversesort_summary">按照相反的时间排序</string>
<string name="pref_reversesort">逆时间顺序</string>
<string name="pref_fabcolor_summary">为该按钮选择一种颜色</string>
<string name="pref_fabcolor">自定义“添加笔记”按钮</string>
<string name="pref_fabplancolor_summary">为该按钮选择一种颜色</string>
<string name="pref_fabplancolor">自定义“添加计划”按钮</string>
<string name="pref_notetitle">笔记标题样式</string>
<string name="pref_notetitle_summary">将笔记的第一行设置为标题</string>
<string name="empty_content">快去写下你的想法吧!</string>
<string name="set_date">设置日期</string>
<string name="set_time">设置时间</string>
<string name="plan_content">计划内容(可选)</string>
<string name="plan_title">标题最多20字</string>
<string name="color_now">当前</string>
<string name="color_default">默认</string>
<string name="color_recommendation">推荐:</string>
<string name="setting">设置</string>
<string name="about">关于我</string>
<string name="add_tag">添加标签</string>
</resources>

@ -0,0 +1,337 @@
@startuml
class cc.liuyx.note.alarm.PlanDatabase {
+ {static} String TABLE_NAME
+ {static} String TITLE
+ {static} String CONTENT
+ {static} String ID
+ {static} String TIME
+ {static} String MODE
+ void onCreate(SQLiteDatabase)
+ void onUpgrade(SQLiteDatabase,int,int)
}
abstract class cc.liuyx.note.BaseActivity {
+ String TAG
+ String ACTION
# BroadcastReceiver receiver
# IntentFilter filter
# void onCreate(Bundle)
+ boolean isNightMode()
+ void setNightMode()
# {abstract}void needRefresh()
+ void onDestroy()
+ long calStrToSec(String)
}
class cc.liuyx.note.entity.Note {
- long id
- String content
- String time
- int tag
+ long getId()
+ String getContent()
+ String getTime()
+ void setId(long)
+ void setContent(String)
+ void setTime(String)
+ String toString()
+ int getTag()
+ void setTag(int)
}
class cc.liuyx.note.alarm.PlanAdapter {
- Context mContext
- List<Plan> backList
- List<Plan> planList
~ PlanAdapter.MyFilter mFilter
+ int getCount()
+ Object getItem(int)
+ long getItemId(int)
+ View getView(int,View,ViewGroup)
+ Filter getFilter()
}
class cc.liuyx.note.alarm.PlanAdapter$MyFilter {
# FilterResults performFiltering(CharSequence)
# void publishResults(CharSequence,FilterResults)
}
class cc.liuyx.note.db.CRUD {
~ SQLiteOpenHelper dbHandler
~ SQLiteDatabase db
- {static} String[] columns
+ void open()
+ void close()
+ void addNote(Note)
+ Note getNote(long)
+ List<Note> getAllNotes()
+ void updateNote(Note)
+ void removeNote(Note)
}
class cc.liuyx.note.adapter.NoteAdapter {
- Context mContext
- List<Note> backList
- List<Note> noteList
- MyFilter mFilter
+ int getCount()
+ Object getItem(int)
+ long getItemId(int)
+ View getView(int,View,ViewGroup)
+ Filter getFilter()
}
class cc.liuyx.note.adapter.NoteAdapter$MyFilter {
# FilterResults performFiltering(CharSequence)
# void publishResults(CharSequence,FilterResults)
}
class cc.liuyx.note.FabColorActivity {
- Toolbar myToolbar
- int openMode
- SharedPreferences sharedPreferences
- ImageView q
# void onCreate(Bundle)
- void initImageView()
- void chooseCurFabColor(int)
- void setClick()
+ void onClick(View)
+ boolean onKeyDown(int,KeyEvent)
}
class com.example.atry.ExampleInstrumentedTest {
+ void useAppContext()
}
class cc.liuyx.note.alarm.AlarmReceiver {
- String channelId
- String name
+ void onReceive(Context,Intent)
}
class cc.liuyx.note.UserSettingsActivity {
- Switch nightMode
- Switch reverseSort
- LinearLayout fabColor
- LinearLayout fabPlanColor
- Switch noteTitle
- SharedPreferences sharedPreferences
- {static} boolean night_change
# void onCreate(Bundle)
# void needRefresh()
- void initView()
# void onActivityResult(int,int,Intent)
- void setSelfNightMode()
- void setNightModePref(boolean)
+ boolean onKeyDown(int,KeyEvent)
}
class cc.liuyx.note.alarm.Plan {
- long id
- String title
- String content
- Calendar planTime
+ int getYear()
+ int getMonth()
+ int getDay()
+ int getHour()
+ int getMinute()
+ long getId()
+ void setId(long)
+ String getTitle()
+ void setTitle(String)
+ String getContent()
+ void setContent(String)
+ Calendar getPlanTime()
+ String getTime()
+ void setTime(String)
}
class cc.liuyx.note.adapter.TagAdapter {
- Context context
- List<String> tagList
- List<Integer> numList
+ int getCount()
+ Object getItem(int)
+ long getItemId(int)
+ View getView(int,View,ViewGroup)
}
class cc.liuyx.note.alarm.CRUD {
~ SQLiteOpenHelper dbHandler
~ SQLiteDatabase db
- {static} String[] columns
+ void open()
+ void close()
+ Plan addPlan(Plan)
+ Plan getPlan(long)
+ List<Plan> getAllPlans()
+ int updatePlan(Plan)
+ void removePlan(Plan)
}
class cc.liuyx.note.alarm.EditAlarmActivity {
- DatePickerDialog.OnDateSetListener dateSetListener
- TimePickerDialog.OnTimeSetListener timeSetListener
- EditText et_title
- EditText et
- Button set_date
- Button set_time
- TextView date
- TextView time
- Plan plan
- int[] dateArray
- int[] timeArray
- int openMode
- String old_title
- String old_content
- String old_time
- long id
- boolean timeChange
# void onCreate(Bundle)
+ boolean onKeyDown(int,KeyEvent)
+ boolean onCreateOptionsMenu(Menu)
+ boolean onOptionsItemSelected(MenuItem)
# void needRefresh()
- void init()
- void setDateTV(int,int,int)
- void setTimeTV(int,int)
+ void onClick(View)
- void isTimeChange()
- boolean canBeSet()
}
class cc.liuyx.note.MainActivity {
- NoteDatabase dbHelper
- PlanDatabase planDbHelper
- FloatingActionButton fab
- FloatingActionButton fab_alarm
- ListView lv
- ListView lv_plan
- LinearLayout lv_layout
- LinearLayout lv_plan_layout
- Context context
- NoteAdapter adapter
- PlanAdapter planAdapter
- List<Note> noteList
- List<Plan> planList
- TextView mEmptyView
- Toolbar myToolbar
- PopupWindow popupWindow
- PopupWindow popupCover
- LayoutInflater layoutInflater
- RelativeLayout main
- ViewGroup customView
- ViewGroup coverView
- WindowManager wm
- DisplayMetrics metrics
- TagAdapter tagAdapter
- TextView setting_text
- ImageView setting_image
- ListView lv_tag
- TextView add_tag
- BroadcastReceiver myReceiver
- Achievement achievement
- SharedPreferences sharedPreferences
- Switch content_switch
- AlarmManager alarmManager
~ String[] list_String
# void onCreate(Bundle)
- void showPopUpWindow()
- void refreshTagList()
- void resetTagsX(AdapterView<?>)
# void needRefresh()
+ void initView()
- void refreshLvVisibility()
+ void initPopupView()
- void initPrefs()
+ boolean onCreateOptionsMenu(Menu)
+ boolean onOptionsItemSelected(MenuItem)
+ void refreshListView()
- void chooseFabColor(int)
- void chooseFabPlanColor(int)
+ void onItemClick(AdapterView<?>,View,int,long)
# void onActivityResult(int,int,Intent)
+ boolean onItemLongClick(AdapterView<?>,View,int,long)
+ void sortNotes(List<Note>,int)
+ void sortPlans(List<Plan>,int)
+ long dateStrToSec(String)
+ List<Integer> numOfTagNotes(List<String>)
+ int npLong(Long)
+ void onDestroy()
- void startAlarm(Plan)
- void startAlarms(List<Plan>)
- void cancelAlarm(Plan)
- void cancelAlarms(List<Plan>)
+ void onResume()
}
class cc.liuyx.note.MainActivity$Achievement {
- SharedPreferences sharedPreferences
- int noteNumber
- int wordNumber
- int noteLevel
- int wordLevel
- void getPref()
- void initPref()
- void addCurrent(List<Note>)
+ void addNote(String)
+ void deleteNote()
+ void editNote(String,String)
+ void noteNumberAchievement(int)
+ void wordNumberAchievement(int)
+ void announcement(String,int,int)
+ String annoucementTitle(int,int)
+ void setState(int)
+ void listen()
+ void resetAll()
}
class cc.liuyx.note.EditActivity {
- NoteDatabase dbHelper
- Context context
- EditText et
- String old_content
- String old_time
- int old_Tag
- long id
- int openMode
- int tag
- boolean tagChange
# void onCreate(Bundle)
# void needRefresh()
+ boolean onCreateOptionsMenu(Menu)
+ boolean onKeyDown(int,KeyEvent)
+ boolean onOptionsItemSelected(MenuItem)
+ String dateToStr()
- void deleteNote(Intent)
}
class cc.liuyx.note.entity.SpinnerItem {
- String tagName
- int tagId
+ String getTagName()
+ void setTagName(String)
+ int getTagId()
+ void setTagId(int)
}
class cc.liuyx.note.db.NoteDatabase {
+ {static} String TABLE_NAME
+ {static} String CONTENT
+ {static} String ID
+ {static} String TIME
+ {static} String MODE
+ void onCreate(SQLiteDatabase)
+ void onUpgrade(SQLiteDatabase,int,int)
- void updateMode(SQLiteDatabase)
}
class com.example.atry.ExampleUnitTest {
+ void addition_isCorrect()
}
android.database.sqlite.SQLiteOpenHelper <|-- cc.liuyx.note.alarm.PlanDatabase
android.support.v7.app.AppCompatActivity <|-- cc.liuyx.note.BaseActivity
android.widget.Filterable <|.. cc.liuyx.note.alarm.PlanAdapter
android.widget.BaseAdapter <|-- cc.liuyx.note.alarm.PlanAdapter
cc.liuyx.note.alarm.PlanAdapter +.. cc.liuyx.note.alarm.PlanAdapter$MyFilter
cc.liuyx.note.alarm.Filter <|-- cc.liuyx.note.alarm.PlanAdapter$MyFilter
android.widget.Filterable <|.. cc.liuyx.note.adapter.NoteAdapter
android.widget.BaseAdapter <|-- cc.liuyx.note.adapter.NoteAdapter
cc.liuyx.note.adapter.NoteAdapter +.. cc.liuyx.note.adapter.NoteAdapter$MyFilter
cc.liuyx.note.adapter.Filter <|-- cc.liuyx.note.adapter.NoteAdapter$MyFilter
cc.liuyx.note.OnClickListener <|.. cc.liuyx.note.FabColorActivity
android.support.v7.app.AppCompatActivity <|-- cc.liuyx.note.FabColorActivity
android.content.BroadcastReceiver <|-- cc.liuyx.note.alarm.AlarmReceiver
cc.liuyx.note.BaseActivity <|-- cc.liuyx.note.UserSettingsActivity
android.widget.BaseAdapter <|-- cc.liuyx.note.adapter.TagAdapter
cc.liuyx.note.alarm.OnClickListener <|.. cc.liuyx.note.alarm.EditAlarmActivity
cc.liuyx.note.BaseActivity <|-- cc.liuyx.note.alarm.EditAlarmActivity
android.widget.AdapterView.OnItemClickListener <|.. cc.liuyx.note.MainActivity
android.widget.AdapterView.OnItemLongClickListener <|.. cc.liuyx.note.MainActivity
cc.liuyx.note.BaseActivity <|-- cc.liuyx.note.MainActivity
cc.liuyx.note.MainActivity +.. cc.liuyx.note.MainActivity$Achievement
cc.liuyx.note.BaseActivity <|-- cc.liuyx.note.EditActivity
android.database.sqlite.SQLiteOpenHelper <|-- cc.liuyx.note.db.NoteDatabase
@enduml

@ -0,0 +1,156 @@
@startuml
class cc.liuyx.note.UserSettingsActivity {
- Switch nightMode
- Switch reverseSort
- LinearLayout fabColor
- LinearLayout fabPlanColor
- Switch noteTitle
- SharedPreferences sharedPreferences
- {static} boolean night_change
# void onCreate(Bundle)
# void needRefresh()
- void initView()
# void onActivityResult(int,int,Intent)
- void setSelfNightMode()
- void setNightModePref(boolean)
+ boolean onKeyDown(int,KeyEvent)
}
class cc.liuyx.note.FabColorActivity {
- Toolbar myToolbar
- int openMode
- SharedPreferences sharedPreferences
- ImageView q
# void onCreate(Bundle)
- void initImageView()
- void chooseCurFabColor(int)
- void setClick()
+ void onClick(View)
+ boolean onKeyDown(int,KeyEvent)
}
class cc.liuyx.note.EditActivity {
- NoteDatabase dbHelper
- Context context
- EditText et
- String old_content
- String old_time
- int old_Tag
- long id
- int openMode
- int tag
- boolean tagChange
# void onCreate(Bundle)
# void needRefresh()
+ boolean onCreateOptionsMenu(Menu)
+ boolean onKeyDown(int,KeyEvent)
+ boolean onOptionsItemSelected(MenuItem)
+ String dateToStr()
- void deleteNote(Intent)
}
class cc.liuyx.note.MainActivity {
- NoteDatabase dbHelper
- PlanDatabase planDbHelper
- FloatingActionButton fab
- FloatingActionButton fab_alarm
- ListView lv
- ListView lv_plan
- LinearLayout lv_layout
- LinearLayout lv_plan_layout
- Context context
- NoteAdapter adapter
- PlanAdapter planAdapter
- List<Note> noteList
- List<Plan> planList
- TextView mEmptyView
- Toolbar myToolbar
- PopupWindow popupWindow
- PopupWindow popupCover
- LayoutInflater layoutInflater
- RelativeLayout main
- ViewGroup customView
- ViewGroup coverView
- WindowManager wm
- DisplayMetrics metrics
- TagAdapter tagAdapter
- TextView setting_text
- ImageView setting_image
- ListView lv_tag
- TextView add_tag
- BroadcastReceiver myReceiver
- Achievement achievement
- SharedPreferences sharedPreferences
- Switch content_switch
- AlarmManager alarmManager
~ String[] list_String
# void onCreate(Bundle)
- void showPopUpWindow()
- void refreshTagList()
- void resetTagsX(AdapterView<?>)
# void needRefresh()
+ void initView()
- void refreshLvVisibility()
+ void initPopupView()
- void initPrefs()
+ boolean onCreateOptionsMenu(Menu)
+ boolean onOptionsItemSelected(MenuItem)
+ void refreshListView()
- void chooseFabColor(int)
- void chooseFabPlanColor(int)
+ void onItemClick(AdapterView<?>,View,int,long)
# void onActivityResult(int,int,Intent)
+ boolean onItemLongClick(AdapterView<?>,View,int,long)
+ void sortNotes(List<Note>,int)
+ void sortPlans(List<Plan>,int)
+ long dateStrToSec(String)
+ List<Integer> numOfTagNotes(List<String>)
+ int npLong(Long)
+ void onDestroy()
- void startAlarm(Plan)
- void startAlarms(List<Plan>)
- void cancelAlarm(Plan)
- void cancelAlarms(List<Plan>)
+ void onResume()
}
class cc.liuyx.note.MainActivity$Achievement {
- SharedPreferences sharedPreferences
- int noteNumber
- int wordNumber
- int noteLevel
- int wordLevel
- void getPref()
- void initPref()
- void addCurrent(List<Note>)
+ void addNote(String)
+ void deleteNote()
+ void editNote(String,String)
+ void noteNumberAchievement(int)
+ void wordNumberAchievement(int)
+ void announcement(String,int,int)
+ String annoucementTitle(int,int)
+ void setState(int)
+ void listen()
+ void resetAll()
}
abstract class cc.liuyx.note.BaseActivity {
+ String TAG
+ String ACTION
# BroadcastReceiver receiver
# IntentFilter filter
# void onCreate(Bundle)
+ boolean isNightMode()
+ void setNightMode()
# {abstract}void needRefresh()
+ void onDestroy()
+ long calStrToSec(String)
}
cc.liuyx.note.BaseActivity <|-- cc.liuyx.note.UserSettingsActivity
cc.liuyx.note.OnClickListener <|.. cc.liuyx.note.FabColorActivity
android.support.v7.app.AppCompatActivity <|-- cc.liuyx.note.FabColorActivity
cc.liuyx.note.BaseActivity <|-- cc.liuyx.note.EditActivity
android.widget.AdapterView.OnItemClickListener <|.. cc.liuyx.note.MainActivity
android.widget.AdapterView.OnItemLongClickListener <|.. cc.liuyx.note.MainActivity
cc.liuyx.note.BaseActivity <|-- cc.liuyx.note.MainActivity
cc.liuyx.note.MainActivity +.. cc.liuyx.note.MainActivity$Achievement
android.support.v7.app.AppCompatActivity <|-- cc.liuyx.note.BaseActivity
@enduml

@ -0,0 +1,33 @@
@startuml
class cc.liuyx.note.adapter.TagAdapter {
- Context context
- List<String> tagList
- List<Integer> numList
+ int getCount()
+ Object getItem(int)
+ long getItemId(int)
+ View getView(int,View,ViewGroup)
}
class cc.liuyx.note.adapter.NoteAdapter {
- Context mContext
- List<Note> backList
- List<Note> noteList
- MyFilter mFilter
+ int getCount()
+ Object getItem(int)
+ long getItemId(int)
+ View getView(int,View,ViewGroup)
+ Filter getFilter()
}
class cc.liuyx.note.adapter.NoteAdapter$MyFilter {
# FilterResults performFiltering(CharSequence)
# void publishResults(CharSequence,FilterResults)
}
android.widget.BaseAdapter <|-- cc.liuyx.note.adapter.TagAdapter
android.widget.Filterable <|.. cc.liuyx.note.adapter.NoteAdapter
android.widget.BaseAdapter <|-- cc.liuyx.note.adapter.NoteAdapter
cc.liuyx.note.adapter.NoteAdapter +.. cc.liuyx.note.adapter.NoteAdapter$MyFilter
cc.liuyx.note.adapter.Filter <|-- cc.liuyx.note.adapter.NoteAdapter$MyFilter
@enduml

@ -0,0 +1,104 @@
@startuml
class cc.liuyx.note.alarm.PlanDatabase {
+ {static} String TABLE_NAME
+ {static} String TITLE
+ {static} String CONTENT
+ {static} String ID
+ {static} String TIME
+ {static} String MODE
+ void onCreate(SQLiteDatabase)
+ void onUpgrade(SQLiteDatabase,int,int)
}
class cc.liuyx.note.alarm.Plan {
- long id
- String title
- String content
- Calendar planTime
+ int getYear()
+ int getMonth()
+ int getDay()
+ int getHour()
+ int getMinute()
+ long getId()
+ void setId(long)
+ String getTitle()
+ void setTitle(String)
+ String getContent()
+ void setContent(String)
+ Calendar getPlanTime()
+ String getTime()
+ void setTime(String)
}
class cc.liuyx.note.alarm.PlanAdapter {
- Context mContext
- List<Plan> backList
- List<Plan> planList
~ PlanAdapter.MyFilter mFilter
+ int getCount()
+ Object getItem(int)
+ long getItemId(int)
+ View getView(int,View,ViewGroup)
+ Filter getFilter()
}
class cc.liuyx.note.alarm.PlanAdapter$MyFilter {
# FilterResults performFiltering(CharSequence)
# void publishResults(CharSequence,FilterResults)
}
class cc.liuyx.note.alarm.CRUD {
~ SQLiteOpenHelper dbHandler
~ SQLiteDatabase db
- {static} String[] columns
+ void open()
+ void close()
+ Plan addPlan(Plan)
+ Plan getPlan(long)
+ List<Plan> getAllPlans()
+ int updatePlan(Plan)
+ void removePlan(Plan)
}
class cc.liuyx.note.alarm.EditAlarmActivity {
- DatePickerDialog.OnDateSetListener dateSetListener
- TimePickerDialog.OnTimeSetListener timeSetListener
- EditText et_title
- EditText et
- Button set_date
- Button set_time
- TextView date
- TextView time
- Plan plan
- int[] dateArray
- int[] timeArray
- int openMode
- String old_title
- String old_content
- String old_time
- long id
- boolean timeChange
# void onCreate(Bundle)
+ boolean onKeyDown(int,KeyEvent)
+ boolean onCreateOptionsMenu(Menu)
+ boolean onOptionsItemSelected(MenuItem)
# void needRefresh()
- void init()
- void setDateTV(int,int,int)
- void setTimeTV(int,int)
+ void onClick(View)
- void isTimeChange()
- boolean canBeSet()
}
class cc.liuyx.note.alarm.AlarmReceiver {
- String channelId
- String name
+ void onReceive(Context,Intent)
}
android.database.sqlite.SQLiteOpenHelper <|-- cc.liuyx.note.alarm.PlanDatabase
android.widget.Filterable <|.. cc.liuyx.note.alarm.PlanAdapter
android.widget.BaseAdapter <|-- cc.liuyx.note.alarm.PlanAdapter
cc.liuyx.note.alarm.PlanAdapter +.. cc.liuyx.note.alarm.PlanAdapter$MyFilter
cc.liuyx.note.alarm.Filter <|-- cc.liuyx.note.alarm.PlanAdapter$MyFilter
cc.liuyx.note.alarm.OnClickListener <|.. cc.liuyx.note.alarm.EditAlarmActivity
cc.liuyx.note.BaseActivity <|-- cc.liuyx.note.alarm.EditAlarmActivity
android.content.BroadcastReceiver <|-- cc.liuyx.note.alarm.AlarmReceiver
@enduml

@ -0,0 +1,27 @@
@startuml
class cc.liuyx.note.db.CRUD {
~ SQLiteOpenHelper dbHandler
~ SQLiteDatabase db
- {static} String[] columns
+ void open()
+ void close()
+ void addNote(Note)
+ Note getNote(long)
+ List<Note> getAllNotes()
+ void updateNote(Note)
+ void removeNote(Note)
}
class cc.liuyx.note.db.NoteDatabase {
+ {static} String TABLE_NAME
+ {static} String CONTENT
+ {static} String ID
+ {static} String TIME
+ {static} String MODE
+ void onCreate(SQLiteDatabase)
+ void onUpgrade(SQLiteDatabase,int,int)
- void updateMode(SQLiteDatabase)
}
android.database.sqlite.SQLiteOpenHelper <|-- cc.liuyx.note.db.NoteDatabase
@enduml
Loading…
Cancel
Save