diff --git a/.project b/.project
new file mode 100644
index 0000000..f646a9d
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+
+
+ EnglishHelper
+ Project EnglishHelper created by Buildship.
+
+
+
+
+ org.eclipse.buildship.core.gradleprojectbuilder
+
+
+
+
+
+ org.eclipse.buildship.core.gradleprojectnature
+
+
diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs
new file mode 100644
index 0000000..e889521
--- /dev/null
+++ b/.settings/org.eclipse.buildship.core.prefs
@@ -0,0 +1,2 @@
+connection.project.dir=
+eclipse.preferences.version=1
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100755
index 0000000..a2d3404
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,27 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 23
+ buildToolsVersion "23.0.2"
+
+ defaultConfig {
+ applicationId "com.example.leeyuanair.englishhelper"
+ minSdkVersion 16
+ targetSdkVersion 23
+ versionCode 1
+ versionName "1.0"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ compile fileTree(include: ['*.jar'], dir: 'libs')
+ testCompile 'junit:junit:4.12'
+ compile 'com.android.support:appcompat-v7:23.1.1'
+ compile files('libs/apache-commons-net.jar')
+}
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100755
index 0000000..1ab18bb
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,17 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in C:\Android\sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/app/src/androidTest/java/com/example/leeyuanair/englishhelper/ApplicationTest.java b/app/src/androidTest/java/com/example/leeyuanair/englishhelper/ApplicationTest.java
new file mode 100755
index 0000000..3a159b0
--- /dev/null
+++ b/app/src/androidTest/java/com/example/leeyuanair/englishhelper/ApplicationTest.java
@@ -0,0 +1,13 @@
+package com.example.leeyuanair.englishhelper;
+
+import android.app.Application;
+import android.test.ApplicationTestCase;
+
+/**
+ * Testing Fundamentals
+ */
+public class ApplicationTest extends ApplicationTestCase {
+ public ApplicationTest() {
+ super(Application.class);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100755
index 0000000..21f69e8
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:screenOrientation="portrait"
+
+
+
+
diff --git a/app/src/main/appicon-web.png b/app/src/main/appicon-web.png
new file mode 100755
index 0000000..e1fd0e0
Binary files /dev/null and b/app/src/main/appicon-web.png differ
diff --git a/app/src/main/assets/Test.txt b/app/src/main/assets/Test.txt
new file mode 100755
index 0000000..d800886
--- /dev/null
+++ b/app/src/main/assets/Test.txt
@@ -0,0 +1 @@
+123
\ No newline at end of file
diff --git a/app/src/main/assets/Words.txt b/app/src/main/assets/Words.txt
new file mode 100755
index 0000000..542d2eb
--- /dev/null
+++ b/app/src/main/assets/Words.txt
@@ -0,0 +1,2826 @@
+2825
+abandon v 遺棄
+abbreviation n 縮語
+abide v 遵守
+ability n 能力
+able a 有能力的
+abnormal a 反常的
+aboard adv 在(船、飛機、車)上 prep 在(船、飛機、車)上
+abolish v 廢除
+abolition n 廢除
+aboriginal a 原住民的
+aborigine n 原住民
+abortion n 墮胎
+about adv 大約 prep 關於;大約
+above n 上文 a 上文的 adv 在上面地 prep 超過
+abroad adv 在(到)國外
+abrupt a 突然的;魯莽的
+absence n 缺席;缺少
+absent a 缺席的
+absolute a 全然的;絕對的
+absorb v 吸收;理解
+absorbing a 有趣的
+abstract n 摘要 a 抽象的
+abstraction n 心不在焉(抽象概念)
+absurd a 荒唐的
+abundance n 豐富
+abuse n 濫用;虐待 v 濫用;虐待
+academic a 學院的;學術的
+acceleration n 加速
+accept v 接受
+acceptable a 令人滿意的;可忍受的
+acceptance n 接受;贊同
+access n 進入;通道;接近......的機會 v 接近;取得
+accessible a 易接近的
+accessory n 附件
+accident n 意外;意外事故
+accidental a 意外的
+acclaim n 歡呼;歡呼聲 v 歡呼;歡呼聲
+accommodation n 住所
+accompany v 陪同;伴隨
+accomplish v 完成;實現
+accomplished a 有才藝的
+accomplishment n 成就;完成;才藝
+accord v 符合
+accordingly adv 因此
+account v 說明;解釋
+accountable a 應負責任的
+accountant n 會計師
+accounting n 會計學;會計
+accumulate v 累積
+accumulation n 累積
+accuracy n 正確(性)
+accurate a 精確的
+accusation n 控訴
+accuse v 控告
+accustom v 習慣
+ace n (撲克牌)一點;(網球)發球得分;能手
+ache n 疼痛 v 疼痛
+achieve v 達成
+acid n 酸味 a 酸的
+acoustic a 聽覺的
+acquaintance n 熟人
+acquire v 取得
+acquisition n 取得;獲得物
+acre n 英畝
+acreage n 英畝數
+across adv 橫越 prep 橫越
+act n 行為;行動 v 扮演;表演
+action n 行為;行動
+active a 活躍的;積極的
+activity n 活動
+actor n 演員
+actress n 女演員
+actual a 實際的
+actually adv 事實上;實際上
+acute a 敏銳的
+adapt v 使適應
+adaptation n 適應;改編(本)
+add v 增加
+addict n 對......上癮的人 v 沉溺
+addiction n 沉溺
+addition n 增加;增加物
+additional a 附加的
+address n 地址;演說 v 寫上名子、地址;演講
+adequately adv 充分地
+adjoin v 毗連
+adjust v 調整
+administrative a 行政的
+administrator n 行政官員
+admirable a 令人欽佩的
+admiral n 海軍將官
+admiration n 欽佩
+admire v 欽佩;讚賞
+admission n 加入許可;承認
+admit v 承認;允許進入
+adolescence n 青春期
+adolescent n 青春期;青少年 a 青春期的;青少年的
+adopt v 採取;收養
+adult n 成年人 a 成年的
+advance n 前進;提升 v 前進;提升
+advanced a 先進的;高等的
+advancement n 前進;擢升
+advantage n 優勢;利益
+adventure n 冒險
+adverse a 反對的
+advert v 提及
+advertise v 廣告
+advertisement n 廣告
+advertising n 廣告業
+advice n 建議;忠告
+advise v 勸告;建議
+adviser n 顧問
+advisory a 顧問的;勸告的
+advocate n 提倡者 v 擁護
+aerospace n 航空太空(大氣層內外)
+aesthetic a 美感的
+affair n 事情;事件
+affect v 影響
+affection n 影響;愛
+affiliated a 相關聯的
+afford v 負擔得起;買得起
+afraid a 害怕的
+after a 以後的 adv 以後;之後 prep 在...以後
+aftermath n 後果;餘波
+afternoon n 下午
+afterward adv 以後
+again adv 再次
+against prep 反對;對著
+age n 年齡 v 使變老
+agency n 代理店;經銷處
+agenda n 議程
+agent n 代理人;仲介人
+aggregate n 總數
+aggression n 侵略
+aggressive a 侵略的;好鬥的
+aging n 變老
+ago adv 在...以前
+agony n 痛苦
+agree v 同意
+agreement n 同意;協議
+agriculture n 農業
+ahead adv 在...前面;領先
+aid n 幫助 v 幫助
+aide n 助理
+AIDS n 愛滋病
+aim v 瞄準;意欲
+air n 空氣
+aircraft n 航空器;飛機
+airforce n 空軍
+airline n 航線;航空公司
+airmail n 航空郵件
+airplane n 飛機
+airport n 機場;航空站
+air-tight a 密封的
+airway n 風道;航線
+aisle n 通道
+akin a 類似的
+alarm n 警報;驚恐 v 向...報警
+alarming a 令人憂心的
+alas prep 哎呀(表悲傷或恐懼)
+albeit adv 儘管
+album n 相簿;專輯
+alcohol n 酒精
+alcoholic n 酒精飲料 a 含酒精的
+alert n 警戒 a 警覺的 v 警戒
+algebra n 代數
+alien n 外國人;外星人 a 外國的
+alienate v 使不和;使離間
+alienation n 離間;疏遠
+alike a 相同的 adv 相同地
+alive a 活的;有活力的
+all a 全部的 adv 全部地
+allegation n 宣稱
+allege v 聲稱
+allergic a 過敏的
+allergy n 過敏症
+alley n 小巷;小徑
+alliance n 聯盟
+allied a 同盟的
+allocate v 撥給
+allocation n 配給
+allot v 分配
+allow v 允許
+almost adv 幾乎
+alone a 單獨的 adv 單獨地
+along adv 向前 prep 沿著;順著
+alongside adv 在旁邊;沿著 prep 在...旁邊
+aloud adv 大聲地
+alphabet n 字母表;字母系統
+already adv 已經;先前
+also adv 也;同樣地
+alteration a 更動
+alternate a 交替的;輪流的 v 使交替;使輪流
+alternative n 替代物 a 替代的
+alternatively adv 二擇一地
+although prep 雖然;然而
+altitude n 高度
+altogether adv 完全;總而言之
+aluminum n 鋁
+always adv 總是;永遠
+amateur n 業餘者 a 業餘的
+amaze v 使驚愕
+amazing a 令人驚奇的
+ambassador n 大使;使節
+ambiguity n 意義含糊
+ambiguous a 含糊的
+ambition n 抱負;志向
+ambitious a 野心勃勃的
+ambulance n 救護車
+ambush v 埋伏;伏擊
+amend v 修改
+amenna n 觸鬚;天線
+amid prep 在...當中
+ammunition n 彈藥
+amnesty n 大赦;特赦
+among prep 在...之中
+amount n 總量;數量 v 合計
+amuse v 娛樂
+analects n 文選;論集
+analogy n 相似
+analysis n 分析
+analyst n 分析師;分析者
+analyze v 分析
+ancestor n 祖先
+ancestral a 祖先的
+anchor n 錨;賴以支撐的人(或物)
+ancient a 古老的;古代的
+anecdote n 軼事
+angel n 天使
+anger n 生氣
+angle n 角度;立場
+angler n 釣魚者
+angry a 生氣的
+angular a 有角的
+animal n 動物
+ankle n 足踝
+anniversary n 週年(紀念)
+announce v 宣布;通知
+annoy v 使惱怒
+annual a 年度的
+anonymous a 匿名的;不具名的
+another a 另一個
+answer n 答案;答覆 v 答案;答覆
+ant n 螞蟻
+anthem n 聖歌
+antibiotic n 抗生素
+antibody n 抗體
+anticipation n 期盼
+antique a 年代久遠的
+anxiety n 焦慮;不安
+anxious a 焦慮的
+any a 任何的 adv 少許
+anyhow adv 無論如何
+anymore adv 再也(不)
+anyway adv 無論如何
+apart a 分開的 adv 分開地
+apartment n 公寓大樓
+ape n 大猩猩
+apologize v 道歉
+apology n 道歉
+appal v 使驚駭
+appalling a 令人恐懼的
+apparent a 明顯的
+apparently a 明顯地;似乎
+appeal v 吸引
+appealing a 迷人的
+appear v 似乎;出現
+appearance n 外貌;顯露
+appetite n 胃口;食慾
+appetizer n 開胃食物
+applaud v 鼓掌
+applause n 掌聲;喝采
+apple n 蘋果
+appliance n 器具;裝置
+applicable a 適用的
+applicant n 申請人
+application n 應用;申請書
+apply v 應用;申請
+appoint v 任命;指派
+appointment n 任命;預約
+appraisal n 評價
+appreciate v 欣賞;感激
+appreciation n 欣賞;感謝
+apprehension n 憂慮
+apprentice n 學徒
+approach n 方法 v 接近
+appropriate a 適當的
+approval n 同意;認可
+approve v 贊成;同意
+April n 四月
+apron n 圍裙;工作裙
+apt a 有...傾向的
+aptitude n 資質
+aquarium n 水族館
+arch n 拱門;拱形
+archaeology n 考古學
+architect n 建築師;設計師
+architecture n 建築學;建築
+archive n 檔案
+area n 區域;範圍
+arena n 比賽場;競技場
+argue v 爭論
+arise v 升起;復活
+arithmetic n 算術;計算 a 算術的
+arm n 手臂
+armchair n 扶手椅
+armed a 武裝的
+armor n 盔甲;裝甲 v 為......穿盔甲
+army n 軍隊;團體
+around adv 各處;大約 prep 大約
+arouse v 喚起
+arrange v 安排
+array n 陣列;一系列
+arrest n 逮捕;拘留 v 逮捕;拘留
+arrival n 到達;到達者
+arrive v 到達;抵達
+arrogant a 傲慢的
+arrow n 箭
+art n 藝術
+article n 文章;物品
+articulate v 清楚的表達
+artificial a 人造的
+artillery n 大砲
+artist n 藝術家
+artistic a 藝術的
+as adv 如同;當…時 prep 雖然
+ascertain v 查明
+ascribe v 把...歸因於
+ash n 灰燼;骨灰
+ashamed a 感到羞恥的
+aside adv 在旁邊;除...之外
+ask v 詢問;要求
+asleep a 睡著的
+aspect n 方面;觀點
+aspiration n 願望
+aspirin n 阿斯匹靈
+aspiring a 有抱負的
+ass n 驢子;笨蛋
+assassinate v 行刺
+assault n 攻擊
+assemble v 集合
+assembly n 集合;集會
+assertion n 紙張
+assertive a 武斷的
+assertively adv 武斷地
+asset n 資產
+assign v 分配;指定
+assist v 協助
+assistance n 協助
+assistant n 助理
+associate v 聯想;與......交往
+association n 協會;聯想;合作
+assume v 假定;假裝
+assurance n 保證
+assure v 保證
+astonish v 使驚訝
+astronaut n 太空人
+astronomy n 天文學
+asylum n 庇護(所)
+athlete n 運動員
+athletic a 運動的
+atmosphere n 大氣;氣氛
+atom n 原子;微量
+attach v 裝上;附加
+attack n 攻擊 v 攻擊
+attainment n 達到
+attempt n 嘗試;企圖 v 嘗試;企圖
+attend v 參加;上(學);照顧
+attendant n 服務員
+attention n 注意;立正
+attic n 閣樓
+attitude n 態度
+attract v 吸引
+attraction n 吸引力;吸引物;景點
+attractive a 有吸引力的
+auction n 拍賣
+audience n 觀眾;聽眾
+audio n 音響裝置;音頻 a 聽覺的;聲音的
+audio-visual a 視聽的
+auditorium n 禮堂
+August n 八月
+aunt n 姑媽;阿姨
+Australia n 澳洲
+author n 作者
+authority n 權力;當局
+autobiography n 自傳
+automatic a 自動的
+automatically adv 自動地
+automobile n 汽車
+autonomy n 自治(權)
+autumn n 秋
+availability n 有效
+available a 可獲得的;可用的;(某人)有空的
+avenge v 報...之仇
+avenue n 大道
+average n 平均 a 平均的;普通的
+aviation n 航空(學)
+avoid v 避免
+await v 等候;期待
+awake a 清醒的 v 喚醒
+awaken v 意識到;使覺醒
+awaking a 使人覺醒的
+award n 獎品 v 授予;給予
+away adv 離開;不在
+awful a 可怕的;極糟的
+awkward a 笨拙的;棘手的
+awkwardly adv 笨拙地
+ax n 斧頭
+baby n 嬰兒;寶貝
+babysitter n 臨時褓母
+bachelor n 單身漢;學士
+back n 背脊;背部;後部 a 後面的;過去的 v 使倒退;支持 adv 後退地
+backache n 背痛;腰痛
+background n 背景
+backward adv 反向地
+bacon n 燻豬肉;培根肉
+bacteria n 細菌(複數)
+bad a 不好的;有害的
+badminton n 羽毛球
+bag n 袋子
+baggage n 行李;裝備
+bail n 保釋(金)
+bait n 餌;引誘物 v 引誘;置餌於
+bake v 烘;烤
+bakery n 麵包店
+balance n 平衡 v 平衡
+balanced a 均衡的
+balcony n 陽臺;樓座
+bald a 禿的
+ball n 球;球狀體
+ballad n 民謠
+ballet n 芭蕾舞
+balloon n 氣球
+ballot n 選票;無記名投票
+ballroom n 舞廳
+bam n 穀倉;牲口棚
+bamboo n 竹子
+ban v 禁止
+banana n 香蕉
+band n 帶子;樂團
+bandage n 繃帶
+bank n 銀行 v 堆積
+banker n 銀行家
+bankrupt n 破產者 a 破產的 v 使破產
+banquet n 宴會
+baptism n 洗禮
+bar n 酒吧;條狀物;沙洲
+barbarian n 野蠻人
+barbecue n 烤肉 v 烤肉
+barber n 理髮師
+bare a 裸的;不加掩飾的
+barely adv 勉強地;露骨地
+bargain n 協議;廉價物 v 討價還價
+bargaining n 議價
+bark n 吠聲 v 吠叫;咆哮
+barkeeper n 酒吧店主;酒保
+barrel n 大桶
+barrier n 障礙物;棚欄
+bartender n 酒保
+base n 基礎 v 基於...
+baseball n 棒球
+based a 以…為基礎的
+basement n 地下室
+basic a 基本的
+basin n 臉盆;洗滌槽
+basket n 籃子;簍子
+basketball n 籃球
+bass n 男低音;低音部
+bastard n 私生子;討厭鬼
+bat n 球棒 v 用球棒打;揮打
+bath n 澡缸;沐浴
+bathe v 洗澡;給...洗澡;弄濕
+bathroom n 浴室
+bathtub n 浴缸
+batter v 毀損
+battery n 電池
+battle n 戰役 v 搏鬥;作戰
+battlefield n 戰場
+bay n 海灣
+BBC n 英國廣播公司
+beach n 海灘
+beam n 樑;光束
+bean n 豆子
+bear n 熊 v 承受;忍受;生(小孩)
+beard n (下巴上的)鬍鬚
+beast n 野獸
+beat n 敲打;搏動 v 拍打;打敗
+beautiful a 美麗的
+beautify v 美化
+beauty n 美;美人;美的事物
+because prep 因為
+beckon v 召喚
+become v 變成
+bed n 床
+bedroom n 臥室
+bee n 蜜蜂
+beef n 牛肉
+beer n 啤酒
+before adv 較早;以前 prep 在...之前
+beg v 乞求;乞討
+beggar n 乞丐
+begin v 開始
+beginner n 初學者
+behalf n 為了...的利益;代表
+behave v 表現;行為舉止
+behavior n 行為
+behind adv 在背後;向背後 prep 在...後面;落後
+behold v 見到
+Beijing n 北京
+being n 存在;生物
+belief n 信仰;信任
+believe v 相信
+bell n 鐘(聲);鈴(聲)
+belly n 腹部;胃
+belong v 屬於
+belongings n 所有物
+beloved n 所愛的人
+below adv 在下面;在下級 prep 在...下方
+belt n 腰帶;帶狀物
+bench n 長板凳
+bend n 彎;彎腰 v 使彎曲;折彎
+beneath prep 在...下面
+beneficial a 有益的
+benefit n 好處;利益 v 有益於
+berry n 果
+beside prep 在旁邊
+besides adv 此外 prep 除...之外
+besiege v 包圍
+best a 最好的;最適當的 adv 最好地;最適當地
+bestseller n 暢銷品
+bet v 打賭
+better a 較佳的;更適當的 adv 更好地
+between adv 在中間;介兩者間 prep 介於...之間
+beverage n 飲料
+beware v 當心
+bewilder v 使混亂
+beyond adv 在更遠處;此外 prep 在遠處
+bias n 成見
+Biblical a 聖經的
+bicycle n 腳踏車
+bid v 出價;吩咐
+big a 大的
+bikini n 泳裝
+bill n 帳單;單據
+billion n 十億;大量
+billionaire n 億萬富翁
+bind v 捆;綁
+bingo n 賓果
+binomial a (數學)二項式
+biochemistry n 生物化學
+biography n 傳記
+biological a 生物(學)的
+biology n 生物
+BIOS n 基本輸入輸出系統
+bird n 鳥
+birth n 出生;分娩
+biscuit n 小麵包;餅乾
+bishop n 主教
+bite n 咬 v 咬;叮
+bitter a 有苦味的;痛苦的
+bitterly adv 酷寒的
+bitterness n 苦;悲傷
+bizarre a 古怪的
+black n 黑色 a 黑的
+blackboard n 黑板
+blame n 責備 v 責備
+blameworthy a 應受責備的
+bland a 溫和的
+blank n 空白;空白處 a 空白的
+blanket n 毛毯;毯子
+blast n 一陣疾風
+blaze n 烈火;光輝
+bleak a 陰冷(鬱)的
+bleed v 流血
+blend v 使混合
+bless n 祝福 v 為...祝福
+blessing n 賜福;同意
+blind a 瞎的 v 使看不見
+blink v 眨眼;漠視
+bloc n 政治集團
+block n 塊;障礙物 v 擋住;堵住
+blonde n 金髮白種人
+blood n 血
+bloody a 血腥的
+bloom n 花 v 開花
+blossom n 開花;興盛 v 開花;興盛
+blow n 吹 v 吹氣;打擊
+blue n 藍色 a 藍色的
+blueprint n 藍圖
+blues n 藍調音樂;沮喪
+bluff n 虛張聲勢
+blunder n 大錯;愚蠢的錯誤 v 犯大錯
+blur v 使模糊
+blush n 臉紅 v 臉紅
+board n 木板 v 登上(船、車、飛機等)
+boast v 自吹自擂;誇耀
+boat n 小船 v 划船
+bodily a 身體的
+body n 身體;主要部分
+bodyguard n 侍衛
+boil v 沸騰;煮沸
+bold a 英勇的;大膽的
+boldly adv 大膽地
+bolt n 螺栓;閃電
+bomb n 炸彈 v 轟炸
+bond n 聯結;契約;債券
+bone n 骨頭;骨質
+bonus n 紅利
+book n 書籍 v 預訂;登記
+bookcase n 書架;書櫥
+bookstore n 書店
+boom n 隆隆聲;景氣
+boost v 提升
+boot n (長筒)靴
+booth n 售貨棚
+border n 國界;邊界
+bore n 令人討厭的人 v 使厭煩
+bored a 厭倦的
+boring a 令人厭煩的
+born a 出生的
+borrow v 借入
+boss n 老闆
+botany n 植物學
+both a 兩個...(都) adv 兩者皆
+bother n 煩惱 v 打擾
+bottle n 瓶子 v 把...裝瓶
+boulevard n 林蔭大道
+bounce n 跳,彈力 v 彈起;跳;躍
+bound a 很有可能的;準備前往...的
+bow n 弓;虹;蝴蝶結 v 拉彎;彎曲;鞠躬
+bowl n 碗
+bowling n 保齡球
+box n 箱;盒 v 把...裝箱
+boxing n 拳擊
+boy n 男孩;少年
+boycott v 抵制
+brace n 支撐物
+brain n 腦袋;智力
+brake n 煞車 v 煞車
+branch n 樹枝 v 分支
+brand n 商標;烙印
+brave a 勇敢的
+bravery n 勇敢;勇氣
+breach v 違犯
+bread n 麵包
+break n 休息 v 打破;弄壞
+breakdown n 故障
+breakfast n 早餐 v 吃早餐
+breakthrough n 突破
+break-up n 打碎;瓦解
+breast n 乳房;胸部
+breath n 呼吸
+breathe v 呼吸
+breathtaking a 驚人的;使人興奮的
+breed n 繁衍 v 滋生
+breeder n 繁殖者
+breeze n 微風;和風 v 吹著微風
+brew v 沖泡;醞釀
+brick n 磚
+bride n 新娘子
+bridegroom n 新郎
+bridge n 橋樑;艦橋 v 架橋於
+brief n 概要;訴書 a 簡短的 v 作...的提要
+briefcase n 公事包
+briefmg n 簡報
+brigade n 旅;隊
+bright a 明亮的;聰明的
+brighten v 照亮
+brilliant a 光輝的;傑出的
+bring v 帶來;引起
+brisk a 輕快的
+Briton n 英國人
+broad a 廣泛的;寬廣的
+broadcast n 廣播 v 播放
+broaden v 加寬
+brochure n 小冊子
+broke a 破產的
+broker n 經紀人
+brood n 一窩的雛雞(或雛鳥)
+brook n 小河
+brother n 兄弟
+brown n 棕色 a 棕色的
+browse v 噹食;瀏覽
+brush n 刷子 v 刷
+brutal a 殘忍的
+brutality n 野蠻
+bubble n 氣泡;泡
+bucket n 水桶;桶狀物
+bud n 芽 v 發芽
+Buddha n 佛陀
+Buddhism n 佛教
+budget n 預算 v 預算
+buffalo n 水牛
+buffet n 自助餐;快餐 v 打擊
+bug n 蟲子
+build v 建造
+building n 建築物
+bulb n 球莖(根)
+bulk n 大量
+bull n 公牛
+bullet n 子彈
+bulletin n 公報;新聞快報
+bully n 恃強凌弱者
+bump n 碰 v 重擊
+bun n 小圓麵包;髮髻
+bunch n 一束;一群
+bundle n 捆;包裹
+bunk n 臥鋪
+bunker n 煤倉;(高爾夫)沙坑
+burden n 負擔 v 負擔
+bureau n 局;處;署
+bureaucracy n 官僚
+burglar n 竊賊
+burn n 燒傷 v 燃燒
+burst n 爆炸;破裂 v 爆炸破裂
+bury v 埋
+bus n 巴士
+bush n 灌木叢
+business n 商業;交易
+businesslike a 效率高的;講究實際的
+busy a 忙碌的 v 使忙於
+butcher n 肉販;屠夫
+butter n 奶油 v 塗奶油於
+butterfly n 蝴蝶
+button n 鈕扣;按鈕 v 扣上;扣住
+buy v 買
+cab n 計程車
+cabbage n 甘藍菜
+cabin n 客艙
+cabinet n 櫥櫃;密室
+cable n 電纜;有線電視 v 發電報
+cafe n 咖啡店;咖啡
+cafeteria n 自助餐館
+cage n 籠子;監牢 v 把...關進籠子;把...囚禁起來
+cake n 蛋糕
+calculate v 計算;估計
+calculation n 計算
+calculator n 計算機
+calendar n 日曆;行事曆
+calf n 小牛
+call n 呼叫 v 打電話
+calm n 寧靜;鎮定 a 平靜的 v 使平靜
+calorie n 卡路里
+camel n 駱駝
+camera n 照相機
+camp n 營地 v 紮營
+campaign n 活動;戰役 v 參加競選
+campus n (大學的)校園
+can n 罐頭;金屬容器 v 把(食品等)裝罐
+canal n 運河
+cancel v 取消
+cancer n 癌
+candidate n 候選人
+candle n 蠟燭
+candor n 坦白;直率
+candy n 糖果
+cane n 藤條;甘蔗
+canvas n 帆布
+canyon n 峽谷
+cap n 帽子 v 覆蓋
+capable a 有能力的
+capacity n 容量;能力
+cape n 披肩;海角
+capital n 首都;資本 a 致命的;大寫字母的;主要的
+capitalism n 資本主義(制度)
+capitalist n 資本家
+Capitol n 美國國會大廈
+captain n 隊長;船(艦)長
+caption n 說明文字
+captive a 被俘虜的
+captivity n 囚禁
+capture v 捕獲;獲得(獎賞);吸引(注意)
+carbon n 碳
+card n 卡片;紙牌遊戲
+cardinal n 紅衣主教
+cardiopathy n 心臟病
+care n 照料 v 關心
+career n 事業;生涯
+carefree a 無憂無慮的
+careful a 仔細的
+careless a 粗心大意的
+caress v 愛撫
+cargo n 貨物
+carnival n 嘉年華會
+carp n 鯉魚
+carpenter n 木匠
+carpet n 地毯
+carriage n 四輪馬車;運輸
+carrier n 運送人;航空母艦
+carrot n 胡蘿蔔
+carry v 運送;攜帶
+cart n 貨車 v 載運
+cartoon n 卡通;連環漫畫
+carve v 雕刻;開拓
+case n 箱;盒;事實;實例 v 把...裝入箱(或容器)中
+cash n 現金 v 把...兌現
+cashier n 出納員
+casino n 賭場
+cassette n 卡式磁帶
+cast n 投;擲;演員陣容 v 投;擲
+caste n 種姓(制度)
+castle n 城堡
+casual a 非正式的
+casually adv 偶然地;漫不經心的
+casualty n 傷亡者
+catalogue n 目錄
+catastrophe n 災難
+catch n 捕獲 v 抓住
+catcher n 捕捉者
+cater v 承包伙食
+caterpillar n 毛蟲
+cattle n 牛;牲口
+causal a 有因果關係的
+cause n 原因 v 造成;導致
+caution n 謹慎
+cautious a 小心的
+cautiously adv 小心地;謹慎地
+cavalry n 騎兵(隊)
+cave n 洞穴
+CD n 光碟
+cease v 停止
+ceasefire n 停火協定
+ceiling n 天花板
+celebrate v 慶祝
+celebration n 慶祝
+celebrity n 名人;名聲
+cell n 小囚房;細胞
+cellar n 地窖
+cemetery n 墓地
+census n 調查
+cent n 一分錢
+center n 核心 v 使集中
+centigrade n 攝氏 a 攝氏的
+central a 中央的;主要的
+century n 世紀
+ceramic a 陶器(藝)的
+cereal n 玉蜀黍薄片
+ceremonious a 儀式的;正式的;講究禮節的
+ceremony n 典禮;儀式
+certain a 確定的
+certificate n 證書
+chain n 鏈條 v 束縛
+chair n 椅子
+chairwoman n 女主席
+chalk n 白堊;粉筆
+challenge n 挑戰 v 挑戰
+challenging a 富有挑戰性的
+chamber n 房間;室
+champagne n 香檳
+champion n 冠軍
+championship n 冠軍地位;冠軍賽
+chance n 機會
+Chancellor n 司法官
+changeable a 易變的
+channel n 海峽;溝渠;頻道 v 在...開水道;輸送
+chaos n 混亂;無秩序
+chapter n 章;回
+character n 角色;性格
+characteristic n 特性 a 特有的
+charge n 費用;照顧;責任 v 索價;充電;控告
+charitable a 仁慈的
+charity n 慈善;慈善團體
+charm n 魅力 v 使陶醉
+charming a 迷人的
+chart n 圖表
+chase n 追逐;追捕 v 追逐;追捕
+chat n 聊天 v 聊天
+chatterbox n 喋喋不休的人
+cheap a 便宜的
+cheat n 騙子;欺詐 v 欺騙
+check n 檢查;支票 v 檢查
+checkbook n 支票簿
+check-in n 登記手續
+check-out n 檢查;付款退租
+checkup n 檢查
+cheek n 臉頰
+cheer n 歡呼 v 歡呼;使振作
+cheerful a 興高采烈的
+cheerleader n 啦啦隊隊長
+cheers v 乾杯
+cheese n 乳酪;乾酪
+chef n 主廚
+chemical n 化學藥品 a 化學的
+chemist n 化學家
+chemistry n 化學
+cherish v 珍惜
+cherry n 櫻桃
+chess n 西洋棋
+chessboard n 西洋棋棋盤
+chest n 胸膛;箱子
+chew n 咀嚼;深思 v 咀嚼;嚼碎;深思
+chick n 小雞;少婦
+chicken n 雞肉
+chief n 首長;領袖 a 主要的;等級最高的
+child n 小孩子
+childbirth n 分娩
+childcare n 照料小孩;兒童保育
+childhood n 童年時期
+childish a 孩子氣的
+childlike a 天真的;孩子般的
+children n 小孩子
+chill a 寒冷的 v 使變冷
+chilly a 冷颼颼的
+chimney n 煙囪
+chimpanzee n 黑猩猩
+chin n 下巴
+china n 瓷器
+chip n 晶片 v 削
+chlorine n 氯
+chocolate n 巧克力
+choice n 選擇
+choir n 合唱隊
+choke n 窒息;噎住 v 阻塞;使窒息
+cholesterol n 膽固醇
+choose v 選擇
+chop n 肋排肉 v 劈
+chopstick n 筷子
+chorus n 合唱隊
+Christianity n 基督教
+chronic a 慢性的
+chunk n 厚塊
+church n 教堂
+churchyard n 教堂的庭院(墓地)
+cigar n 雪茄
+cigarette n 香煙;煙捲
+circle n 循環 v 畫圓圈
+circulate v 循環;流通
+circulation n 循環;流通;貨幣
+circumstance n 情況;情境
+circus n 馬戲團
+citizen n 公民
+citizenship n 公民身分(權利)
+city n 城市
+civics n 公民;市政學
+civil a 市民的;禮貌的
+civilian n 平民;民法專家
+civilization n 文明
+civilize v 使開化
+claim n 要求 v 聲稱
+clarify v 澄清
+clash n 碰撞聲;衝突 v 抵觸;發出鏗鏘聲
+class n 階級;班級 v 把...分類
+classic n 名著 a 經典的
+classical a 古典的
+classification n 分類
+classify v 分類
+classmate n 同班同學
+classroom n 教室
+clause n 子句;條款
+claw n 爪子;鉗;贅
+clay n 黏土;泥土
+clean a 乾淨的 v 把...弄乾淨;清除 adv 完全地;乾淨地
+cleaner n 清潔工(劑)
+cleaning n 掃除
+cleanse v 使清潔
+clear a 清楚的;晴朗的 v 使乾淨;清除
+clergyman n 神職人員;牧師
+clerk n 店員
+clever a 伶俐的;機敏的
+click n 喀嚓聲 v 使發出聲
+client n 客戶
+cliff n 懸崖
+climate n 氣候;風氣
+climax n 高潮
+climb v 攀爬
+clinic n 診所
+clip v 修剪;夾住
+clock n 時鐘
+clockwise a 順時針方向的
+clockwork n 發條裝置
+close a 接近的 v 關上;蓋上 adv 靠近地
+closet n 壁櫥;衣櫥
+closure n 關閉
+cloth n 布料;衣料
+clothe v 為...穿衣
+clothes n 衣服
+clothing n 衣服;覆蓋物
+cloud n 雲 v 遮蔽
+cloudy a 多雲的
+clown n 小丑
+club n 俱樂部 v 募集
+clue n 暗示;線索
+clumsy a 笨拙的
+cluster n (人、動物等的)群
+clutch n 離合器;緊握
+coach n 教練;公車 v 訓練;指導
+coal n 煤礦;煤
+coalition n 聯合
+coarse a 粗糙的
+coast n 海岸;沿海地區
+coastguard n 海岸巡邏隊
+coastline n 海岸線
+coat n 外套 v 覆蓋
+cocaine n 古柯鹼
+cock n 公雞
+cockpit n 駕駛艙;鬥雞場
+cockroach n 蟑蚣卜;油蟲
+cocktail n 雞尾酒
+coconut n 椰子
+code n 密碼;法典 v 編碼
+coed a 男女合校的
+coeducation n 男女同校
+coexist v 同時共存
+coffee n 咖啡
+coffin n 棺材
+coin n 硬幣;錢幣 v 鑄造(貨幣)
+coincidence n 巧合
+coke n 可口可樂
+cola n 可樂類飲料
+cold n 感冒;寒冷 a 寒冷的;冷淡的;冰冷的
+collaborate v 合作
+collapse n 倒塌;崩潰 v 使倒塌;使崩潰
+collar n 衣領;項圈
+colleague n 同事
+collect v 蒐集;募捐;聚集
+collection n 蒐集;募捐;聚集
+collector n 收藏者
+college n 大學;學院
+collision n 衝突
+colonial a 殖民地的
+colony n 殖民地
+color n 顏色;彩色 v 著色;渲染
+color-blind a 色盲的
+colorful a 多采多姿的
+column n 欄;圓柱
+columnist n 專欄作家
+comb n 梳子 v 梳理
+combination n 聯合(體)
+combine v 結合;合併
+come v 來到;甦醒
+comedian n 丑角式人物
+comedy n 喜劇
+comer n 角落
+comet n 彗星
+comfortably adv 舒適地
+comforting a 舒適的
+comic n 漫畫;喜劇演員 a 喜劇的;滑稽的
+coming n 臨近 a 即將到來的
+command n 命令;控制 v 命令;控制
+commander n 指揮者
+commemorate v 為慶祝
+commend v 稱讚
+comment n 評論 v 評論
+commentary n 評述
+commentator n 評論家
+commerce n 商業;交易
+commercial n 商業廣告 a 商業的;營利的
+commission n 佣金 v 委託
+commit v 犯(罪);把...託交給...
+commitment n 承諾
+committee n 委員會
+commodity n 商品
+common n 一般 a 一般的
+commonplace a 平凡的
+communal a 公共的
+communicate v 溝通;傳達
+communication n 溝通;訊息
+communicative a 愛說話的
+communist n 共產主義者 a 共產主義的
+community n 社區;團體
+commute v 通勤
+commuter n 通勤者
+compact a 緊密的
+companion n 夥伴;伴侶
+companionship n 交誼
+company v 同伴;公司
+comparative a 相比而言的
+comparatively adv 比較地
+compare v 比較
+comparison n 比較;對照
+compartment n 分隔間
+compass n 指南針;圓規
+compassionate a 有同情心的
+compatible a 相容的
+compatibly adv 和諧地
+compensate v 賠償
+compensation n 補償
+compete v 競爭
+competence n 能力
+competition n 競賽;競爭
+competitive a 競爭的
+competitor n 競爭者
+compile v 編纂
+complain v 抱怨;訴苦
+complaint n 抱怨
+complement n 補足物
+complete a 完全的;徹底的;完整的 v 完成
+complex n 複合體;綜合體 a 複雜的
+complexion n 氣色
+complexity n 複雜(性);錯綜複雜的事物
+complicate v 使複雜
+complicated a 複雜的
+complication n 糾葛
+compliment n 讚美 v 祝賀
+comply v 依從
+component n 零件;成分
+compose v 作曲;包含;包括
+composer n 作曲家;調停者
+composite a 混合成的
+composition n 作文;曲子;合成物
+comprehend v 理解
+comprehensible a 可理解的
+comprehension n 理解(力)
+comprehensive a 廣泛的
+compress v 壓縮
+compromise v 妥協(方案)
+compulsively adv 強制性地
+compute v 估算;推算
+computer n 電腦
+computerize v 使電腦化
+comrade n 同伴
+conceal v 隱藏
+concede v 讓步;承認
+conceited a 自大的
+conceitedly adv 自負地
+conceive v 認為;構想
+concentrate v 專注於;集中於
+concentration n 專心;集中
+concept n 概念;見解
+concern n 關懷 v 關心;有關
+concert n 演奏會;音樂會
+concession n 讓步
+concise a 簡潔的
+conclude v 下結論
+conclusion n 結論;推論
+concrete n 混凝土 a 具體的
+condense v 使凝結(濃縮)
+condition n 情況;條件
+condom n 保險套
+conduct n 行為 v 指導;指揮;執行
+conductor n 領導者;指揮
+confederation n 同盟
+confer v 商議;授予
+conference n 會議
+confess v 坦承
+confession n 承認
+confide v 吐露
+confidence n 信心
+confident a 有自信的
+confidential a 機密的
+confidently adv 確信地
+confine v 限制;使侷限
+confirm v 確認
+conflict n 衝突 v 衝突
+conform v 遵從
+conformity n 遵從
+confront v 面臨;對抗
+confrontation n 對質;對抗
+Confucius n 孔子
+confuse v 使困惑
+confused a 困惑的
+confusion n 混亂;困惑
+congratulate v 恭喜
+congratulation n 祝賀;恭喜
+congress n 正式大會;立法機關
+congressional a 國會的
+conjunction n 結合
+connect v 連接
+connection n 連結;連線
+conquer v 戰勝
+conquest n 征服
+conscientious a 盡責的
+conscious a 查覺到的;有意識的
+consciously adv 有意地
+consciousness n 意識;察覺
+consecutive a 連續的
+consensus n 輿論;多數人的意見
+consent n 同意 v 同意
+consequence n 後果;結果
+consequent a 因...的結果而起的
+conservation n 保護
+conservative a 保守的
+conserve v 保存;維護
+consider v 認為;考慮
+considerable a 值得考慮的
+considerate a 設想周到的
+consideration n 考慮;動機
+consist v 包括;在於
+consistent a 一致的
+consolation n 慰藉
+console v 安慰
+consolidate v 鞏固
+conspiracy n 陰謀
+constable n 警察
+constant a 固定的
+constantly adv 經常地;不斷地
+constitute v 構成;制定
+constitution n 憲法;法規
+constitutional a 憲法的
+constraint n 限制
+construct v 建造
+construction n 建造;建築
+constructive a 建設性的
+consult v 與...商量
+consultant n 顧問;諮詢者
+consultation n 協商會
+consume v 消耗;攝取;消費
+consumer n 消費者
+consumption n 消費
+contact n 接觸;聯繫 v 接觸;聯繫
+contagious a 傳染性的
+contain v 包括;控制
+container n 容器
+contaminate v 污染物
+contemplate v 深思
+contempt v 輕視
+contemptible a 卑劣的
+contend v 競爭;鬥爭
+content n 內容 a 滿足的
+contented a 滿足的
+context n 上下文
+continent n 大陸;大洲
+continental a 洲的;大陸的
+contingent a 因情況而變的
+continual a 不間斷的
+continuation n 繼績
+continue v 持續
+continuous a 連續的
+contract n 合約;契約 v 訂合約;收縮
+contractor n 立約人
+contradict v 否認
+contradiction n 矛盾
+contrary n 相反;相反的事物 a 相反的
+contrast n 對比;差異 v 使成對比
+contribute v 貢獻;促成
+contribution n 貢獻;捐獻
+control n 控制 v 控制
+controller n 控制者
+controversial a 有爭議的
+convene v 召集
+convenience n 方便;便利設施
+convenient a 便利的
+convention n 慣例;會議
+conventional a 慣例的;協定上的
+conversation n 對話;談話
+converse v 交談;對談
+convert v 轉變;改變
+convertible a 可轉換的
+convey v 傳達;表達;運送
+convict v 證明有罪
+convince v 說服
+convincing a 令人信服的
+convoy n 護送(車隊)
+cook n 廚師 v 烹煮
+cooker n 炊具
+cookie n 餅乾
+cool a 涼爽的 v 使冷卻
+cooperate v 合作
+cooperation n 合作
+cooperative a 合作的
+coordination n 協調
+cop n 警察
+cope v 競爭;妥善處理
+copilot n 飛機副駕駛
+copy n 副本 v 複製
+copyright n 版權
+cord n 細繩;粗線
+corn n 玉米;穀物
+corporation n 公司
+correct a 正確的 v 更正
+correlation n 關聯
+correspond v 符合;通信
+correspondent n 通訊(記)者 a 一致的
+corrupt a 腐敗的 v 敗壞
+corruption n 腐化;貪汙
+cosmetic n 化妝品 a 美容的
+cosmic a 宇宙的
+cosmopolitan a 世界性的
+cosmos n 宇宙
+cost n 費用;成本 v 付出;花費
+costly a 貴重的;代價高的
+costume n 服裝;戲服
+cosy a 溫暖舒適的
+cottage n 農舍;小屋
+cotton n 棉
+couch n 長沙發;睡椅
+cough v 咳嗽
+council n 會議
+councilman n 議員
+counsel n 忠告
+counseling n 勸告
+counsellor n 顧問
+count v 數;計算
+countable a 可數的
+countenance n 表情;支持
+counter n 櫃台 a 相反的
+counteract v 抵消;對抗
+counterattack n 反擊 v 反擊
+counterpart n 互相對應的人(物)
+countless a 數不清的
+country n 國家;鄉下
+countryside n 鄉村
+county n 郡;縣
+couple n 一對;夫婦
+coupon n 優待券
+courage n 勇氣
+courageous a 勇敢的
+course n 課程;路線;一道菜
+court n 法院;球場
+courteous a 有禮貌的
+courtesy n 禮貌
+courtyard n 庭院
+cousin n 表(兄弟姊妹)
+cover n 覆蓋物;封面 v 覆蓋
+coverage n 報導;某事所包含的範圍
+cow n 母牛
+coward n 懦夫 a 懦弱的
+cowardice n 膽小
+cowboy n 牛仔;牧牛人
+coworker n 同事
+crab n 蟹
+crack n 爆烈聲 v 裂開
+crackdown n 取締
+cradle n 搖籃 v 撫育
+craft n 手藝;工藝 v 製造
+cram v 填塞
+crane n 起重機;鶴
+crash n 墜毀 v 撞擊
+crawl v 爬行;蠕動
+crayon n 蠟筆
+crazy a 狂熱的;瘋狂的
+cream n 奶油;乳脂
+create v 創造
+creation n 創造(物)
+creative a 有創造力的;創新的
+creativity n 創造力
+creator n 創作者
+creature n 生物
+credibility n 可信性
+credible a 可信的
+credit n 信用;讚賞;學分
+creditable a 值得稱讚的
+creed n 信條
+creep v 躡手躡腳地走
+crew n 全體船員/機員
+cricket n 蟋蟀
+crime n 罪
+criminal n 罪犯 a 犯罪的;罪過的
+cripple n 肢體殘障者
+crisis n 危機
+critic n 評論家
+critical a 關鍵性的;批判的
+criticism n 批評;評論
+criticize v 批評
+crocodile n 鱷魚
+crop n 作物
+cross n 交叉 v 越過
+crossing n 交叉口
+crossroad n 十字路口
+crouch v 蹲伏
+crow n 烏鴉;雞啼聲
+crowd n 群眾;一堆 v 聚集;擠滿
+crowded a 擁擠的
+crown n 王冠 v 為...加冕
+crude a 未加工製造的
+cruel a 殘酷的
+cruise n 乘船遊覽
+crumble v (使)碎成細屑
+crush n 壓碎;毀壞 v 弄碎;壓碎
+cry n 叫喊;呼叫 v 哭;叫喊
+crystal n 水晶 a 水晶的
+cub n 幼獸
+cube n 立方體
+cubic a 立方的
+cucumber n 黃瓜
+cue n 反芻的食物
+culminate v 達到頂點
+cult n 狂熱的崇拜
+cultivate v 耕作;培養
+cultural a 文化的;教養的
+culture n 文化
+cumulative a 累積的
+cunning a 狡猾的;奸詐的
+cup n 杯子
+cupboard n 碗櫃
+curable a 可治癒的
+curb n 抑制
+cure n 治療 v 治療
+curfew n 宵禁
+curiosity n 好奇心
+curious a 好奇的
+currency n 貨幣;流通
+current n 潮流 a 目前的
+currently adv 現在;當前
+curriculum n 課程
+curry n 咖哩食品
+curtain n 簾 v 給...裝上簾子
+curve n 曲線 v 使彎曲
+cushion n 墊子
+custody n 監管
+custom n 習俗;海關
+customary a 習慣上的
+customer n 顧客
+cut v 切
+cute a 可愛的
+cycle n 循環;週期 v 輪轉;循環
+cylinder n 氣缸
+daddy n 爹地
+daily a 每日的
+dairy n 酪農場 a 牛奶(製)的
+daisy n 菊
+dam n 水壩 v 築壩於...
+damage n 損失 v 損害;毀壞
+damages n 損害賠償
+dame n 貴夫人
+damp a 潮溼的
+dance n 舞蹈 v 舞蹈
+dancer n 舞者
+danger n 危險
+dangerous a 危險的
+dare v 敢於…;膽敢
+daresay v 我想…;也許…
+dark a 黑暗的
+darken v 使變黑
+darkroom n 暗房
+darling n 心愛的人 a 親愛的
+dart n 鏢;急衝
+dash v 猛衝
+data n 資料
+date n 棗;棗椰樹 v 約會
+daughter n 女兒
+dawn n 黎明 v 破曉
+day n 白天
+daybreak n 黎明
+daydream n 白日夢
+daylight n 日光
+dazzle v 使目眩
+dead a 死去的;無效的
+deadline n 截止期限
+deaf a 聾的
+deafen v 使聽不見
+deal n 交易 v 交易
+dean n 學院院長;主任牧師
+dear n 親愛的人 a 親愛的 adv 疼愛地
+dearly adv 深切地
+death n 死亡
+debate n 辯論;討論 v 辯論;討論
+debt n 債
+debut n 初次登臺
+decease n 死亡
+deceive v 欺騙
+December n 十二月
+decency n 莊重
+decent a 得體的
+deception n 欺騙
+deceptive a 虛偽的
+decide v 決定
+decision n 決定
+decisive a 果斷的
+deck n 甲板
+declaration n 宣布;聲明
+declare v 宣告;聲明
+decline n 下降 v 下降;減少
+decorate v 裝飾
+decoration n 裝飾(品);裝潢
+decrease n 減少 v 減少
+decree n 法令 v 頒布;命令
+dedicate v 奉獻
+deduction n 推斷
+deed n 行為;功績
+deem v 視為
+deep a 深的 adv 深地
+deepen v 加深
+deer n 鹿
+defeat n 挫敗 v 擊敗;打敗
+defect n 缺點
+defend v 防守;防衛
+defense n 防衛
+defensive a 防護的;保衛的
+deficiency n 短缺
+deficit n 赤字
+define v 解釋;給...下定義
+definite a 明確的;肯定的
+definitely prep 必定地
+defy v 違抗
+degree n 度數;等級;學位
+dejected a 沮喪的;氣餒的
+delay n 延遲;延期 v 延遲;延期
+delegate v 委派;派...為代表
+delegation n 委任
+deliberately adv 故意地
+deliberation n 深思
+delicacy n 精緻
+delicate a 易碎的;精美的;美味的
+delicious a 美味可口的
+delight n 欣喜;樂趣 v 使高興
+delighted a 高興的;快樂的
+delightful a 令人愉快的
+delinquent a 不法行為
+deliver v 傳遞;發表
+delivery n 投遞;交貨
+demand n 要求;需要 v 要求;需要
+demanding a 苛責的
+demo n 遊行示威
+democracy n 民主(國家、精神)
+democrat n 民主主義者
+democratic a 民主的
+demon n 惡鬼
+demonstrate v 證明;展示;遊行
+demonstration n 驗證;示威運動
+denial n 否認
+denomination n 教派
+denote v 意味著
+denounce v 指責
+dense a 密集的;稠密的
+dental n 齒音 a 牙齒的
+dentist n 牙科醫師
+deny v 否認
+depart v 分離;啟程
+department n 部門;系
+departure n 分離;啟程
+depend v 依賴
+dependent a 依賴性強的
+depict v 描繪
+deplete v 使枯竭
+deploy n 布署 v 布署
+deport v 驅逐出境
+deposit n 保險金;存款 v 儲存
+depreciate v 跌價
+depress v 使沮喪
+depressed a 沮喪的;消沉的;蕭條的
+depression n 沮喪
+deprive v 剝奪
+depth n 深度
+dermatosis n 皮膚病
+descendant n 後代
+descent n 下降
+describe v 形容;描述
+description n 描寫;說明
+desert n 沙漠 v 拋棄
+deserve a 應得;值得
+design n 計劃;設計 v 計劃;設計
+designate v 指定;任命
+designer n 設計師
+desire n 願望 v 渴望
+desk n 書桌
+desolate a 荒蕪的;淒涼的
+despairing a 自暴自棄的
+desperate a 絕望的
+despise v 藐視
+despite prep 儘管
+despondent a 沮喪的
+dessert n 甜點
+destination n 目的地
+destroy v 毀滅;破壞
+destruction n 破壞
+destructive a 毀滅性的
+detach v 分開
+detail n 細節 v 詳述
+detailed a 詳細的
+detain v 拘留;耽擱
+detect v 偵測到
+deter v 制止
+detergent n 洗潔劑
+deteriorate v 惡化
+determination n 決心
+determine v 決定;下決心
+devalue v 貶值
+devastating a 毀滅性的
+develop v 發展;培養;沖洗
+deviation n 偏離
+device n 裝置
+devil n 魔鬼
+devise v 策劃
+devote v 將...奉獻給
+devoted a 專心致志的
+devotion n 奉獻
+diabetes n 糖尿病
+diagnose v 診斷
+diagnosis n 診斷
+diagram n 圖表(解)
+dial n 刻度盤 v 撥號
+dialect n 方言
+dialogue n 對話
+diamond n 鑽石
+diaper n 菱形花紋(布);尿布
+diary n 日記
+dictate v 使聽寫;命令
+dictation n 聽寫;命令
+dictator n 獨裁者
+dictionary n 字典
+die v 死亡
+diehard n 頑固分子
+diet n 飲食
+differ v 不同於...
+difference n 差異
+different a 不同的
+differential n 差別
+differentiate v 區分
+difficult a 困難的;難以相處的
+difficulty n 困難
+diffusion n 擴散
+dig v 挖;掘
+digest v 消化
+digestion n 消化;領悟
+digital a 數位的
+dignify v 使有尊嚴
+dignitary n 權貴
+dignity n 尊嚴
+dilemma n 困境
+diligence n 勤勉
+diligent a 勤勉的
+dilute a 稀釋的 v 稀釋
+dim a 朦朧的
+dime n 一角硬幣
+dimension n 尺寸;範圍
+diminish v 減少
+dine v 用餐
+dinner n 晚餐
+dinosaur n 恐龍
+dip v 浸;泡
+diploma n 學位證書
+diplomacy n 外交
+diplomat n 外交官
+direct a 直接的 v 指導;指揮
+direction n 指示;方向
+directly adv 直接地
+director n 主管;導演
+directory n 工商人名錄
+dirt n 污物;泥土
+dirty a 污穢的
+disability n 無能
+disable a 使傷殘
+disadvantage n 不利之條件
+disagree v 不同意
+disappear v 消失
+disappoint v 使失望
+disappointed a 感到失望的
+disapproval n 反對
+disapprove v 不贊成
+disaster n 災難;災害
+disastrous a 多災多難的
+disbelieve v 懷疑
+disc n 圓盤;唱片
+discard v 摒棄
+disciple n 門徒
+disciplinary a 紀律上的
+discipline n 紀律
+disclose v 露出
+disclosure n 揭露
+disco n 迪斯可舞廳/音樂
+discomfort n 不舒適
+disconnect v 使分離
+discontent n 不滿
+discount n 折扣 v 折扣
+discourage v 使氣餒;阻止
+discouraging a 令人洩氣的
+discover v 發現
+discovery n 發現
+discreet a 考慮周到的
+discrepancy n 不一致
+discretion n 謹慎
+discriminate v 辨別
+discrimination n 歧視;區別
+discuss v 討論
+discussion n 討論
+disease n 疾病
+disguise n 偽裝 v 偽裝
+disgust n 嫌惡 v 使厭惡
+disgusting a 令人厭惡的
+dish n 碟;菜餚
+disheartened a 沮喪的;灰心的
+dishonest a 不誠實的
+dishwasher n 洗碗機
+disinterested a 公正的
+dislike v 不喜歡
+dismantle v 拆卸
+dismay v 使驚慌
+dismiss v 解散
+disorder n 騷亂 v 使混亂
+disorganized a 雜亂無章的
+dispatch v 派遣;發送
+dispel v 驅散
+dispensable a 可有可無的
+disperse v 使散開
+dispirited a 沮喪的
+displace v 移開;取代
+displacement n 移位;取代
+display n 展覽 v 展出
+displease v 使不快
+disposable a 可丟棄的
+disposal n 處理;配置
+dispose v 處理;配置
+disposition n 配置
+dispute n 爭論 v 爭論
+disqualify v 取消資格
+disregard n 不理會;不尊重 v 不理會;不尊重
+disrupt v 中斷;擾亂
+dissatisfaction n 不滿
+dissatisfy v 使不快
+dissident n 持異議的人 a 持異議的
+dissuade v 勸阻
+distance n 距離
+distant a 遙遠的
+distinct a 不同的;明顯的
+distinction n 區別
+distinctively adv 有特色地
+distinguish v 分辨
+distinguished a 卓越的
+distort a 歪曲
+distract v 使分心
+distress n 苦惱;悲痛;危難
+distribute v 分送
+distribution n 分配;配給物
+district n 區域
+distrust v 不信任
+disturb v 打擾;使焦慮
+disturbing a 紛亂的
+ditch n 水道;渠道
+dive n 潛水;跳水 v 潛水;跳水
+diverse a 各種各樣的
+diversify v 使多樣化
+diversion n 轉向;轉移
+diversity n 多樣性
+divide v 分開;除
+dividend n 股息
+divine a 神的;神聖的
+diving n 潛水
+division n 分開;部門
+divorce n 離婚 v 離婚
+divorcee n 離了婚的女人
+dizzy a 昏眩的
+dock n 碼頭;港區 v 靠碼頭
+doctor n 醫生;博士
+document n 文件
+documentary n 記錄片
+dodge v 避開
+dog n 狗
+dogmatic a 固執己見的
+dole n 救濟金 v 分發
+doll n 洋娃娃
+dollar n (美)元
+dolphin n 海豚
+domain n 領域
+domestic a 家庭的;國內的
+dominant a 支配的
+dominate v 支配
+donate v 捐贈
+donation n 捐贈;捐贈物
+done a 完成的
+donkey n 驢
+donor n 捐贈者
+doom n 厄運 v 注定
+door n 門
+dormitory n 學生宿舍
+dosage n 劑量;服用量
+dose n (藥物等的)一劑
+dot n 點 v 打點於
+double n 兩倍(數或量);加倍 a 兩倍的;雙人的;兩面的 v 使加倍
+doubt n 懷疑 v 懷疑
+doubtful a 令人懷疑的
+doubtless adv 無疑地
+dough n 生麵團
+doughnut n 甜甜圈
+dove n 鴿
+down n 倒霉事;失敗 a 向下的;情緒低落 v 擊倒;打敗 adv 向樓下;在下面 prep 往...下方
+downcast a 垂頭喪氣的
+downstairs n 樓下 a 樓下的 adv 在樓下
+downtown n 鬧區 a 城市商業區的 adv 在(或往)城市的商業區
+downwards adv 向下的
+doze v 打瞌睡
+dozen n 一打;十二個
+draft n 草稿 v 草稿
+drag v 拖曳
+dragon n 龍
+dragonfly n 蜻蜓
+drain n 排水 v 排水
+drainage n 排水系統
+drama n 戲劇;戲劇性
+dramatic a 戲劇性的
+drape v 覆蓋
+drastic a 激烈的
+draught n 草圖 v 草擬
+draw v 畫;拖拉
+drawback n 障礙;缺點
+drawer n 抽屜;拖曳者
+drawing n 素描;製圖
+dread n 害怕 v 害怕
+dreadful a 可怕的
+dream n 夢 v 做夢
+dress n 洋裝;衣服 v 穿衣
+dressing n 穿衣;敷藥;沙拉醬
+drift n 漂浮物 v 漂流
+drill n 鑽頭;鑽床
+drink n 飲料 v 喝
+drive n 車程 v 駕駛
+driveway n 私用車道
+drop n (一)滴 v 下降
+dropout n 輟學者
+drought n 乾旱
+drown v 溺水;淹沒
+drowsy a 昏昏欲睡的
+drug n 藥品;毒品 v 使服毒品
+drugstore n 雜貨店
+drum n 鼓 v 打鼓
+drunk n 醉漢 a 喝酒醉的
+drunkard n 酒鬼
+dry a 乾燥的 v 使變乾
+dryer n 吹風機
+dual a 兩的;雙的
+dubious a 覺得可疑的
+duck n 鴨子
+due a 到期的;應付(款)的;適當的
+duke n 公爵
+dull a 無聊乏味的;遲鈍的
+dumb a 啞的;愚笨的
+dump v 傾倒
+durable a 持久的
+duration n 持續
+durian n 榴槤
+during prep 在...期間
+dust n 灰塵 v 打掃
+dutiful a 守本分的
+duty n 職責
+dwarf n 侏儒 a 矮小的
+dwell v 居住
+dweller n 居民
+dye n 染料 v 染色
+dynamic a 動力的;動態的
+dynamite n 甘油炸藥
+dynasty n 朝代
+each a 各個;每個 adv 各個地;各自地;每一個
+eager a 渴望的;急切的
+eagerly adv 渴望地;急切地
+eagle n 鷹
+ear n 耳朵;聽力
+early a 早的;提早的 adv 早;提早地
+earn v 賺取;贏得
+earnest a 認真的
+earnings n 收入;工資
+earplug n 耳塞
+earth n 陸地;地球
+earthquake n 地震
+earthworm n 蚯蚓
+ease n 容易 v 減輕
+east n 東方 a 東方的 adv 向東方;在東方
+Easter n 復活節
+eastwards adv 向束
+easy a 容易的 adv 不費力地;從容地
+easygoing a 隨和的
+eat v 吃;喝
+eccentric n 古怪的人 a 古怪的
+echo n 回聲;回響
+eclipse n (日、月)蝕
+ecology n 生態學
+economic a 經濟的
+economical a 經濟的;節儉的
+economically adv 節約的
+economics n 經濟學
+economist n 經濟學者
+economy n 節約;經濟
+edge n 邊緣 v 使鋒利
+edible a 可食的;食用的
+edit v 編輯
+edition n 發行數;版本
+editorial n 社論
+educate v 教育;教導
+educated a 受過教育的
+education n 教育
+educational a 教育的;有教育意義的
+educator n 教師;教育工作者
+eel n 鰻
+effect n 效果;結果;影響
+effective a 有效的
+effectively adv 有效地
+efficiency n 效率
+efficient a 有效率的
+effort n 努力
+egg n 蛋;卵細胞
+ego n 自我
+eight n 八
+eighteen n 十八
+eighty n 八十
+either a (兩者之中)任一的 adv (否定句中)也
+elaborate a 精巧的;複雜的
+elastic a 有彈性的
+elbow n 肘部;扶手
+elder n 年齡較大者;長者 a 年齡較大的
+elderly a 年長的
+elect v 選舉
+election n 選舉
+elective a 由選舉產生的
+electric a 電的
+electrical a 電的
+electrician n 電工;電氣技師
+electricity n 電;電流
+electronic a 電子的
+electronics n 電子學
+elegant a 優雅的
+element n 元素;成分
+elemental a 自然力的
+elementary a 基本的;初級的
+elephant n 象
+elevate v 使提高
+elevator n 電梯;升降機
+eleven n 十一
+eligible n 合格者;合適的人 a 有資格的
+eliminate v 消滅;排除
+elite n 精英
+eloquent a 雄辯的
+else adv 其他;另外
+elsewhere adv 在別處
+e-mail n 電子郵件
+embargo n 禁運;禁止買賣 v 禁止(船隻)出入港口
+embark v 裝船;從事
+embarrass v 使尷尬
+embarrassed a 尷尬的;不好意思的
+embassy n 大使館
+embody v 包括
+embryo n 胚胎 a 未成熟的
+emerge v 浮現;顯露
+emergency n 緊急
+emigrant n 移民
+emission n 散發
+emotion n 情感;激動
+emotional a 感情上的
+emperor n 統治者;皇帝
+emphasis n 強調
+emphasize v 強調
+empire n 帝國;王權
+empirical a 憑經驗的
+employ v 雇用
+employee n 員工
+employer n 雇主
+empty a 空的 v 變空
+enable v 使能夠
+enchant v 使入迷
+enclose v 圍住;把(公文等)封入
+encounter n 衝突 v 遭遇
+encourage v 鼓勵
+encouraging a 鼓勵的;激勵的
+encyclopedia n 百科全書
+end n 結尾;末端 v 結束;終止
+endanger v 危及;使遭到危險
+endless a 無盡的
+endorse v 贊同
+endowment n 天資
+endurance n 耐力
+endure v 忍受
+enemy n 敵人
+energetic a 充滿活力的
+energy n 能源;動力;活力
+enforce v 實施;強迫
+engage v 吸引;聘雇;訂婚
+engine n 發動機;引擎
+engineer n 工程師
+engineering n 工程
+enhance v 增加
+enjoy v 享受
+enjoyable a 有樂趣的
+enlarge v 擴大
+enlighten v 啟發;教導
+enlist v 入伍
+enormous a 巨大的
+enough n 足夠;充分 a 足夠的 adv 足夠地;充分地
+enrich v 使富裕
+enroll v 使加入;註冊
+ensue v 接著發生
+ensure v 確保
+entail v 使成為必要
+enter v 進入;參加
+entertain v 娛樂;招待
+enthusiasm n 熱忱
+enthusiastic a 有熱忱的
+entire a 全部的
+entirely adv 完全地
+entrance n 入口;進入
+entry n 進入
+envelope n 信封
+envious a 妒嫉的
+environment n 環境
+environmental a 環境的
+environmentalist n 環保人士
+environmentally adv 有關環境地
+envisage v 預見
+envy v 嫉妒;羨慕
+enzyme n 酵素
+epic n 史詩 a 史詩般的
+epigram n 雋語
+equal n 相等 a 相等的 v 等於;比得上
+equality n 相等;平等;均等
+equation n 方程式;等式;平衡
+equator n 赤道
+equip v 裝備
+equivalent n 相同 a 相同的
+era n 年代
+erase v 擦掉;抹去
+eraser n 擦除器(如橡皮擦)
+erode v 侵蝕
+erosion n 侵蝕
+err v 犯錯
+errand n 差事;任務
+error n 錯誤
+escalator n 電扶梯
+escape n 逃離;逃避;避免 v 逃離;逃避;避免
+escort n 護衛者 v 護衛
+especially adv 特別地;尤其
+essay n 散文;論說文
+essence n 本質;精華
+essential a 必要的;精華的
+essentially adv 基本上
+establish v 建立
+esteem n 尊敬 v 尊敬
+estimate n 估計;估價 v 估計;估價
+etemity n 永恆
+ethic n 倫理
+ethics n 倫理(學)
+ethnic a 種族的
+etiquette n 禮節
+evaluate v 評估
+evaluation n 估算
+evaporate v 蒸發
+eve n 前夕
+even a 平坦的 v 使平坦 adv 甚至;連
+evening n 晚上
+event n 事件;(比賽)項目
+eventual a 結果的
+eventually adv 終於;終究
+ever adv 永遠
+evergreen n 萬年青;常青樹 a 常青的;常綠的
+every a 每個
+evidence n 證據
+evident a 明顯的
+evil a 邪惡的
+evoke v 喚起
+evolution n 演化(論)
+evolve v 演化;發展
+exact a 正確的;精確的
+exaggerate v 誇大
+exaggeration n 誇張
+exam n 考試
+examine v 檢查;考試
+examinee n 應試者
+examiner n 主考人;審查員
+example n 例子
+exceedingly adv 極其
+excel v 擅長
+excellence n 傑出;優點
+excellent a 優秀的
+except prep 除...之外
+exception n 例外
+exceptional a 例外的;特殊的
+exchange n 交換 v 交換
+excite v 使興奮
+excited a 興奮的;激動的
+exclaim v 驚叫
+exclusively adv 專門地
+excuse n 藉口 v 原諒
+executive a 執行的
+exempt n 被免除(義務、責任)者;免稅者 a 豁免的 v 免除;豁免
+exercise n 運動 v 鍛鍊;運動
+exhaust n 廢氣 v 使疲憊;用盡
+exhausted a 精疲力竭的;耗盡的
+exhibit n 展覽 v 展覽
+exhibition n 展示會
+exile n 放逐;流亡者 v 放逐;流放
+exist v 存在;生存
+existence n 存在
+exit n 出口 v 離開
+exotic a 異國風情的
+expand v 擴張
+expansion n 擴展;膨脹
+expect v 期望
+expectation n 期望
+expedition n 探險(隊)
+expel v 驅逐;開除
+expend v 花費
+expensive a 昂貴的
+experience n 經驗 v 經歷
+experiment n 實驗 v 實驗
+experimental a 實驗性質的
+experimentation n 實驗
+expert n 專家 a 熟練的
+expertise n 專業知識
+expire v 期滿
+explain v 解釋
+explanation n 解釋
+explicit a 清楚的
+explode v 爆炸;爆發
+exploration n 研究
+explore v 探險
+explosion n 爆炸;劇變
+explosive n 爆炸物;炸藥 a 爆炸性的
+exponent n (學說等的)闡述者;倡導者;(數學)指數
+export n 出口 v 輸出
+expose v 暴露;揭穿
+exposure n 暴露;陳列
+express n 快車;快遞 v 表達;快遞
+expression n 表情;表示
+extend v 延伸
+extension n 伸長;延期
+extensive a 廣泛的;大量的
+exterior a 外部的
+extinct a 絕種的
+extra n 附加費用 a 額外的 adv 額外地
+extract v 拔出;摘錄
+extracurricular a 課外的
+extraordinary a 異常的
+extravagance n 浪費
+extreme n 極限 a 盡頭的
+extremely adv 非常;極度地
+eye n 眼睛 v 看
+eyesight n 視力
+eyewitness n 目擊者
+factor n 因素;要素
+fantastic a 奇幻的;極好的
+fascinated a 著迷的
+fashion n 流行;時尚
+fat n 脂肪;油脂 a 肥胖的;厚的
+fault n 缺陷;錯誤
+favor n 幫忙;偏愛 v 贊成;偏愛;有利
+favorite n 最愛 a 最愛的
+feature n 特徵;面貌 v 以......為特色
+feed n 飼料 v 餵食
+fever n 發燒;狂熱
+fight n 吵架;爭吵 v 吵架;爭吵
+figure n 體型;數字 v 計算
+fill v 充滿
+film n 電影
+final n 期末考;決賽 a 最後的
+finally adv 最後;終於
+financial a 財務上的
+fingerprint n 指紋
+firm n 公司 a 穩固的;牢固的
+fish n 魚;魚肉 v 捕魚;釣魚
+flash n 閃光(燈) v 閃光;閃現
+flat n 一間公寓(英式英語) a 平坦的;乏味的
+flawless a 完美無瑕的
+flight n 班機;飛行
+flu n 流行性感冒
+folk n 人們;平民 a 民間的
+force n 力(量);威力 v 強迫
+forecast n 預測;預報 v 預測;預報
+foreign a 外國的
+foreigner n 外國人
+forge n 熔爐;鐵工廠 v 鍛造;鍛鐵
+form n 類型;表格;型態 v 形成;構成
+formal a 正式的
+former a 從前的;前者的
+forward v 轉交;轉寄 adv 向前地;提前地
+fraction n 小部分;片段;些微;分數
+frequency n 頻率;頻繁
+frequently adv 時常地;頻繁地
+friction n 摩擦;摩擦力;爭執
+frustrate v 使沮喪;使灰心
+frustrated a 失意的
+fuel n 燃料
+function n 功能 v 運作;起作用
+furious a 狂怒的;猛烈的
+furnace n 火爐;熔爐
+furniture n 家具
+fuse n 保險絲;熔線 v 使(電器等)保險絲燒壞
+fuzzy a 絨毛的;模糊不清的
+gain n 獲利 v 獲得
+galaxy n 星系
+gamble n 賭博;冒險 v 賭博;冒險
+gather v 聚集
+gear n 齒輪;(汽車)排檔;設備
+gem n 寶石;珍寶 v 用寶石點綴
+gender n 性別
+generally adv 通常
+generation n 世代
+generous n 慷慨的
+genetic a 基因的;遺傳(學)的
+geographical a 地理的
+glad a 高興的;樂意的
+global a 全球的;全世界的
+gloomy a 陰暗的;陰沉的
+glorious a 光榮的;壯觀的
+glossy a 光滑的;有光澤的;浮誇的
+goal n 目標;球門
+golden a 金色的
+gossip n 八卦;閒話 v 閒聊
+government n 政府
+gradually adv 漸漸地
+graduate n 畢業生 v 畢業
+gram n 公克
+grape n 葡萄
+grapefruit n 葡萄柚
+gravity n 重力;地心引力
+greed n 貪婪;貪心
+greedy a 貪心的;渴望的
+grieved a 傷心的;悲痛的
+guava n 芭樂
+guide n 指導;導遊 v 引導;帶路
+hall n 大廳;走廊
+handicapped a 殘障的
+handle n 手把 v 處理;操作
+happen v 發生
+happy a 快樂的;開心的
+harmful a 有害的
+headache n 頭痛
+health n 健康
+heat n 熱度 v 加熱
+height n 高度
+helmet n 安全帽
+hesitate v 猶豫
+hesitation n 猶豫;遲疑
+hide v 隱藏;躲藏
+high a 高的;高級的
+hint n 暗示 v 暗示
+hire v 雇用
+hit v 碰撞;打擊;侵襲
+hollow a 中空的;凹陷的;虛偽的
+honest a 誠實的;正直的
+honeydew-melon n 蜜瓜
+honor n 榮譽;尊敬 v 尊敬
+horn n 角;喇叭
+horrible a 可怕的
+hospitality n 殷勤;好客;款待
+host n 主人;主持人 v 主持;招待
+human n 人類
+humble a 謙虛的;卑微的
+humid a 潮濕的
+humor n 幽默;情緒
+hurry n 急忙 v 趕緊
+hurt n 疼痛 v 使疼痛;使受傷
+ignore v 忽略
+ill a 生病的
+illness n 生病
+image n 形象
+imaginable a 可想像的
+imaginary a 想像的;虛構的
+imagination n 想像力
+imaginative a 富想像力的
+imagine v 想像
+immediate a 立刻的;即刻的
+immediately adv 立即;馬上
+impact n 衝擊;影響
+imply v 暗示
+impossibility n 不可能
+impression n 印象
+improve v 改善
+improvement n 改進;改善
+include v 包含
+income n 收入;所得
+increase n 增加 v 增加
+incurable a 無法治癒的
+indicate v 指示;指出;象徵
+indignant a 憤怒的;憤慨的
+individual n 個人 a 個別的
+industrial a 工業的
+ineffective a 無效的
+infant n 嬰兒
+infection n 感染
+infer v 推論
+infinity n 無限;無窮
+influence n 影響
+injure v 受傷
+insist v 堅持
+insistence n 堅持
+inspire v 鼓舞;賦予靈感
+instead adv 代替
+institution n 機構;體制
+instruction n 教導;說明書
+insurance n 保險;保險金
+intelligent a 聰明的
+intend v 打算;預定
+interaction n 互動
+interest n 興趣;利息 v 使感興趣
+interested a 感興趣的
+interesting a 有趣的
+international a 國際的
+interview n 面試;採訪 v 面試;採訪
+introduce v 介紹
+invaluable a 無價的;非常珍貴的
+invasion n 侵略
+invention n 發明
+invest v 投入;投資
+irate a 生氣的;發怒的
+island n 島嶼
+isolate v 孤立;隔離
+issue n 議題 v 發行
+item n 項目;條款
+jam n 果醬;塞車 v 塞緊;擠滿
+jealous a 忌妒的
+join v 加入(活動);連結
+journey n 旅程
+joyful a 喜悅的;高興的
+kiwi n 奇異果
+label n 標籤 v 貼標籤
+lack n 缺乏 v 缺乏
+landscape n 風景;景色
+language n 語言
+last a 最後的 v 持續
+latest a 最新的;最近的
+launch v 下水;發射;創辦
+legal a 合法的
+leisure n 空間
+lemon n 檸檬
+limit n 限度 v 限制
+limitation n 限制;限度
+limited a 有限的
+link n 關聯 v 連接;連結
+liquid n 液體 a 液體的
+literature n 文學
+lobby n 大廳
+local n 本地人 a 當地的;局部的
+locate v 座落於
+logarithm n (數學)對數
+loneliness n 寂寞
+lose v 失去
+loss n 損失
+lottery n 獎券;樂透
+love n 愛;愛情;戀愛 v 愛;愛好;喜愛
+lovely a 可愛的
+lower a 較低的;下等的 v 降下;降低
+lung n 肺
+luxury n 奢侈(品)
+lychee n 荔枝
+machine n 機器
+mad n 狂怒;發怒 a 著迷的;發瘋的;生氣的
+madness n 瘋狂;精神錯亂
+magic n 魔法;魔術 a 神奇的
+mainly adv 主要地
+maintain v 維持;維護;供給
+major n 主修 a 主要的;大部分的 v 主修
+makeup n 化妝品;組成
+manage v 經營;管理;設法做
+manager n 經理;負責人
+mango n 芒果
+manufacture n 製造 v 製造
+margin n 邊緣;空白
+marriage n 婚姻
+massive a 巨大的
+master n 主人;大師 v 精通
+match n 比賽;對手 v 和......相配
+material n 物質;材料 a 物質的
+mathematics n 數學
+matter n 問題 v 重要
+meal n 一餐
+mean a 小氣的;卑鄙的 v 意旨;用意
+means n 手段;方法
+measure n 措施 v 測量
+medal n 獎牌;獎章
+medical a 醫療的
+medium n 手段;中間 a 中間的;五分熟
+memory n 記憶
+mental a 心理的;精神的
+mention v 提及
+merchant n 商人
+mercy n 慈悲
+merry a 歡樂的;愉快的
+mess n 混亂 a 弄亂
+message n 訊息
+meteor n (天文)流星;隕星
+meteorite n 隕石
+meter n 公尺;計量器
+method n 方法
+microwave n 微波;微波爐
+mineral n 礦物;礦物質
+minus n (數學)負號;負數 a (數學)負的;略低一點的 prep 減;減去
+miscellaneous a 多方面的;各種各樣的
+misery n 痛苦;不幸
+mission n 任務
+moderate a 適中的;溫和的 v 緩和;減輕
+modest a 謙虛的;適度的
+moisture n 溼氣;水分
+moon n 月亮
+moral a 道德的
+motor n 馬達;發動機 a 馬達的;機動的;汽車的
+mournful a 憂傷的;悲觀的
+multiply v 乘;使相乘
+murder n 殺害;謀殺 v 殺害;謀殺
+muscle n 肌肉
+music n 音樂;樂曲
+muskmelon n 香瓜
+natural a 自然的
+naturally adv 自然地;天生地
+nature n 天性;自然
+nebula n 星雲
+necessary a 必須的
+negative a 負面的;消極的;否定的
+neglect v 忽略
+neighbor n 鄰居
+neighborhood n 鄰近地區
+neutron n 中子
+normal a 正常的
+notable a 著名的
+note n 筆記;便條 v 注意;記下
+notice n 通知;注意 v 留意
+notion n 概念;看法
+nuclear a 核子的
+number n 數字;號碼;數量 v 編號;給...號碼
+numerous a 很多的
+nutrition n 營養
+obey v 遵守
+object n 物體;目標;受詞 v 反對
+observe v 觀察;遵守
+obstacle n 障礙;阻礙
+obtain v 獲得
+obvious a 明顯的
+obviously adv 顯然地
+occur v 想起;發生
+ocean n 海洋
+offend v 觸怒;冒犯
+olive n 橄欖
+omit v 省略;遺漏
+operation n 操作;手術
+opinion n 意見;看法
+opportunity n 機會
+oppose v 反對
+option n 選擇
+orange n 柳橙
+order n 順序;訂購 v 訂購;點餐;命令
+ordinary a 平凡的;普通的
+ore n 礦石
+organization n 組織
+origin n 起源
+outstanding a 傑出的
+overcome v 克服;戰勝
+oxygen n 氧
+pain n 疼痛;痛苦
+painkiller n 止痛劑
+paint n 油漆;顏料 v 油漆;繪畫
+painting n 畫
+pale a 蒼白的
+palm n 手掌;棕梠樹
+papaya n 木瓜
+particular a 特別的;挑剔的
+passage n 段落;通道
+passenger n 旅客;乘客
+patient n 病人 a 耐心的
+pattern n 圖案;形式
+pause n 暫停;停頓 v 暫停;停頓
+peaceful a 和平的;平靜的
+peach n 桃子
+pear n 梨子
+percent n 百分比 a 百分之 adv 百分之
+perfect a 完美的;理想的 v 使完美
+perform v 表演;執行
+performance n 表現;表演;執行
+perhaps adv 可能
+period n 時期;句點;(一堂)課
+permit v 允許
+persimmon n 柿子
+personal a 個人的;私人的
+personality n 個性;人格
+personally adv 個人地;親自地
+persuade v 說服;勸服
+philosophy n 哲學
+phrase n 片語 v 用語言表示;以......措辭表達
+physical a 身體的;物質的
+physicion n 內科醫生
+physics n 物理;物理學
+pick n 挑選;採摘 v 挑選;採摘
+picky a 挑剔的
+pill n 藥丸
+pilot n 飛行員 v 駕駛;引導
+pineapple n 鳳梨
+plain n 平原 a 樸素的;平凡的
+plaintive a 悲傷的;憂鬱的
+plan n 計畫;方案 v 計畫;打算
+planet n 行星
+plant n 植物;工廠 v 種植
+plastic n 塑膠 a 塑膠的
+platform n 月台;講台
+pleasant a 令人愉快的
+pleased a 高興的
+pleasure n 快樂;娛樂
+plum n 李子
+plus n (數學)正號 a (數學)正的 prep 加;加上
+polish v 擦亮
+pollution n 汙染
+ponkan n 碰柑
+popular a 受歡迎的;流行的
+population n 人口
+portrait n 肖像;描繪
+position n 位置;地位;立場;職位
+positive a 正面的;肯定的;積極的
+possess v 佔有
+possibility n 可能性
+possible a 潛在的;可能的
+possibly adv 可能地
+potential n 潛力;可能性 a 潛在的;可能的
+power n 權力;權限;力;動力
+practical a 實用的;實際的
+practically adv 實際上;幾乎
+practice n 練習;實踐;慣例 v 練習;執行
+praise n 讚揚;表揚 v 讚揚;表揚
+precious a 珍貴的
+predict v 預測
+prefer v 較喜歡;寧願
+preference n 偏愛
+pregnant a 懷孕的
+prescribe v 開(藥方);規定
+preserve v 保存;維護
+president n 總統;總裁;(大學)校長
+presidential a 總統的
+press v 按、壓;逼迫
+pressure n 壓力;媒體
+prevent v 防止;阻止
+previous a 先前的
+primary a 主要的;初步的
+principal n 校長 a 主要的
+principle n 原則;準則
+priority n 優先;優先權
+prison n 監獄
+privacy n 隱私
+process n 過程;程序 v 處理;加工
+producer n 生產者;製作人
+product n 產品;結果
+professional n 專業;職業選手 a 職業的
+progress n 進步
+project n 專案 v 投射;射出;計畫
+promise n 承諾;答應 v 承諾;答應
+promote v 促進;升遷
+pronounce v 發音
+proof n 證明;考驗 a 能耐......的;可防......的
+proper a 適當的
+property n 財產
+proportion n 比例;部分;調和 v 使成比例;使平衡
+protect v 保護
+protein n 蛋白質
+protest n 抗議 v 抗議
+proton n 質子
+proud a 驕傲的;自豪的;得意的
+prove v 證實;證明
+provide v 提供
+psychological a 心理(學)的
+public n 民眾 a 公用的;公眾的
+purchase n 購買 v 購買
+purpose n 目的;作用
+pursuit n 追逐;追求
+puzzle n 猜謎;困惑 v 困惑
+qualified a 有資格的
+quality n 品質;特質
+quantity n 數量
+quantum n 量子
+quarrel n 爭吵 v 爭吵
+quarter n 四分之一;三個月(一季)
+Quasar n (天文)類星體
+quotient n (數學)商數
+race n 競賽;種族 v 賽跑
+raise v 養育;舉起;提高;籌募
+rapid a 快速的
+rarity n 珍品;稀有
+rational a 合理的;講理的
+raw a 生的;未加工的
+react v 反應;反抗
+realize v 了解;實現
+reason n 理由;理性
+receive v 接收;收到
+recently adv 最近
+recession n (經濟)衰退
+recognition n 認出
+recognize v 承認;認出
+recommand v 推薦;建議
+recover v 恢復;復原;重新找到
+recycle v 回收
+reduce v 降低;減少
+refer v 提到;參考;提交;歸因於
+reflect v 反射;深思
+refresh v 使清新;使重新振作
+refund n 退款 v 退款
+regard n 關心;問候 v 認為;關心
+regards n 關心;問候
+region n 地區
+regular a 規律的;一般的
+relate v 有關聯
+relax v 放鬆;鬆懈
+relaxed a 悠閒的;放鬆的
+release n 發行;釋放;鬆開 v 發行;釋放;鬆開
+relieve v 減輕;使放心
+religion n 宗教
+reluctant a 不情願的
+rely v 依賴
+remain v 保持
+remainder n 剩餘物;其餘的人;(數學)餘數
+remind v 提醒
+reminder n 提醒者;提醒物
+remote a 遙遠的;偏僻的
+remove v 移除
+rent n 租金 v 出租
+repair n 修理;修復 v 修理;修復
+repeat n 重複 v 重複
+repeatedly adv 重複地
+replace v 取代
+reply n 回覆;回應 v 回覆;回應
+represent v 代表
+reputation n 名譽;信譽
+request n 要求 v 要求
+require v 要求;需要
+requirement n 必要條件;必需品
+rescue n 救援 v 拯救
+research n 研究 v 研究
+reservation n 保留;預約
+resident n 居民 a 居住(某地)的
+resist v 反抗;抵抗
+resistance n 抵抗;反抗;抗性;(電學)電阻器
+resource n 資源
+respect n 尊敬;敬重 v 尊敬;敬重
+respond v 回應;反應
+response n 回答;反應
+responsible a 負責的
+restriction n 限制
+result n 結果 v 產生;導致
+retailer n 零售商
+retire v 退休
+reunion n 團聚
+reveal v 揭露;顯露
+review n 複習;回顧 v 複習;回顧
+reward n 獎賞;報償 v 獎賞;報償
+rise v 上升;起床;上漲
+risk n 風險;冒險 v 風險;冒險
+robot n 機器人
+rough a 粗糙的;粗略的
+rural a 鄉村的;田園的
+sad a 悲哀的;傷心的
+sail n 航行 v 航行
+sample n 樣品 v 抽樣檢查;品嘗
+satellite n (天文)衛星;人造衛星;追隨者
+satisfaction n 滿意
+save v 節省;儲存
+scared a 恐懼的;嚇壞的;害怕的
+scene n 現場;場景
+schedule n 行程表 v 預定
+scientist n 科學家
+score n 分數 v 得分
+scream n 尖叫 v 尖叫
+sense n 判斷力;意識 v 意識到
+series n 連續;系列
+serious a 認真的;嚴重的
+serve v 服務;供應
+settle v 安頓;安置
+shaddock n 文旦
+shape n 形狀;體型 v 使成形
+share n 分攤;部分;一份 v 分享;分擔
+sharp a 尖銳的;敏銳的
+shine v 發亮;擦亮
+shock n 震驚 v 使震驚
+shocked a 驚愕的;受震驚的
+shocking a 令人震驚的;駭人聽聞的
+sign n 手勢;告示 v 簽名
+silky a 絲綢般的
+similar a 相似的
+similarity n 相似(性)
+similarly adv 相似地
+simply adv 僅僅;不過
+sincere a 真誠的
+site n 地點;位置
+situation n 情況;狀況
+skill n 技巧
+skillfully adv 有技巧地
+skip v 略過;跳過
+slave n 奴隸 v 做苦工
+slender a 苗條的
+slide n 滑落;幻燈片;溜滑梯 v 滑動;偷偷移動
+smooth a 平滑的;平順的
+snivel n 流鼻涕;啜泣 v 流鼻涕;哭訴
+soak v 吸收;浸泡
+social a 社會的;社交的
+society n 社會
+soften v 軟化;變溫和
+soil v 弄髒;沾汙
+solar a 太陽的
+solve v 解決
+sore a 疼痛的;惱怒的
+sorrowful a 悲傷的;傷心的
+sort n 種類 v 分類
+source n 來源
+spasm n 痙攣;抽搐
+special a 特別的
+species n 物種(單複數同形)
+spectacular a 壯觀的;壯麗的
+speed n 速度 v 加速
+spirit n 靈魂;精神;情緒
+spiritual a 精神的
+spoil v 破壞;寵壞
+sport n 運動;娛樂
+spot n 斑點;地點 v 看到;有斑點
+spread n 擴展;範圍 v 使延伸;散佈
+square n 廣場;正方形
+star n 星;恆星;明星
+stardust n 星團;星塵
+starfruit n 楊桃
+statement n 陳述;聲明
+statistics n 統計;統計學
+status n 地位
+stock n 股票;庫存 v 儲存;進貨
+stomach n 胃
+stomachache n 胃痛;腹痛
+strain n 拉緊;扭傷 v 拉緊;扭傷
+strategy n 策略
+strawberry n 草莓
+stream n 溪流
+strengthen v 加強
+stress n 緊張;壓力;強調 v 強調
+stretch n 伸展 v 伸展;延伸
+strictly adv 嚴格地
+strike n 打擊;罷工 v 打擊;罷工
+structure n 結構;建築物 v 組織
+struggle n 奮鬥;掙扎 v 奮鬥;掙扎
+subject n 主題;學科
+subtract v 減;減去
+succeed v 成功;繼承
+success n 成功
+successful a 成功的
+successfully adv 成功地
+suffer v 受苦;受害
+suggest v 建議;暗示
+suggestion n 建議
+suicide n 自殺
+suitable a 合適的
+sulky a 生氣的;繃著臉的
+sum n 總數;總和 v 共計;總和
+sun n 太陽
+superb a 宏偉的;華麗的;極好的
+supernova n (天文)超新星
+supply n 提供;供應 v 提供;供應
+support n 支持;扶養 v 支持;扶養
+surgery n 外科手術
+surprise n 驚訝 v 驚訝
+surprised a 驚訝的
+surprising a 令人驚訝的
+surprisingly adv 令人驚訝地
+surround v 圍繞
+survey n 調查;測量 v 調查;測量
+survival n 存活;生還
+survive v 存活
+survivor n 生還者;倖存者
+swallow n 燕子 v 吞嚥
+switch n 開關;轉換 v 開關;轉換
+symbol n 象徵
+symptom n 症狀
+system n 系統;制度;體制
+talent n 天分
+tangerine n 橘子
+taste n 味道 v 嚐起來
+technique n 技巧
+technology n 科技
+temperature n 溫度
+tend v 傾向於;易於
+tension n 緊張(關係、局勢)
+terrible a 可怕的;糟糕的
+terribly adv 非常地
+terrify v 嚇人;使......害怕
+terror n 驚恐
+therefore adv 因此
+throat n 喉嚨
+through prep 穿過
+throughout prep 遍及;遍布
+throw v 丟
+tide n 潮汐;潮水;潮流
+tie n 關係;聯繫
+tiny a 微小的
+tired a 疲倦的;厭倦的
+toast n 土司 v 烤烘;敬酒
+topic n 主題
+total n 總數 a 完全的;總計的
+tour n 旅遊
+tourist n 遊客
+towering a 高聳的;屹立的;高大的
+trade n 貿易;買賣 v 交易;交換
+traditional a 傳統的
+traffic n 交通
+transfer n 職務調動;轉乘 v 轉移;轉車
+transform v 轉變
+transparent a 透明的;清澈的;明晰的
+transport v 搬運;運輸
+transportation n 傳輸;運輸工具
+travel n 旅行 v 旅行
+treasure n 寶藏 v 珍惜
+treat v 對待;治療;款待
+tremble n 發抖;震動 v 發抖;震動
+tremendous a 巨大的;大量的;極好的
+trick n 把戲;惡作劇 v 欺騙
+trip n 旅遊
+tropical a 熱帶的
+truth n 真相;事實
+twist v 扭曲;扭傷
+unexpectedly adv 出乎意外地
+unfortunately adv 不幸地
+unhappy a 不快樂的
+unique a 獨一無二的
+unite v 聯合;團結
+united a 聯合的
+universe n 宇宙;天地萬物;全世界;全人類
+university n 大學
+unknown n 默默無聞的人;未知的事物 a 不知道的;未知的
+upgrade n 升級 v 升級
+upset a 難過的;煩惱的;失意的 v 使煩惱
+urgent a 緊急的;迫切的
+vague a 模糊的;朦朧的
+valuable a 有價值的
+value n 價值 v 重視;珍惜
+valueless a 無價值的
+vanish v 消失;滅絕
+various a 各式各樣的
+vehicle n 車輛;媒介
+vicious a 惡毒的;墮落的;惡意的
+victim n 受害者;受難者
+victimize v 使......受害
+view n 景觀;看法 v 觀看;查看;將......看成是
+violent a 猛烈的;凶暴的
+virus n 病毒
+visit n 拜訪;訪問 v 拜訪;訪問
+vitamin n 維他命
+vocabulary n 字彙
+vocation n 職業;行業
+volcanic a 火山的
+volunteer n 義工;志工 v 自願做......
+vortex n 旋渦;渦
+warn v 警告
+warning n 警告
+watermelon n 西瓜
+wax-apple n 蓮霧
+wealth n 財富;豐富
+website n 網站
+wedding n 婚禮
+weigh v 秤......的重量;有......重量
+weight n 重量
+weird a 奇怪的;怪異的
+welfare n 福利;幸福
+wide a 寬闊的;廣闊的
+wire n 電線;金屬絲 v 拍電報
+withdraw v 領回;退出
+wizard n 巫師;術士
+wonder n 奇觀;驚奇 v 想知道
+wonderful a 美好的;很棒的
+worldwide a 全世界的
+worried a 擔心的
+worry n 煩惱 v 擔心;煩惱
+worse a 更壞 adv 更壞
+worship n 崇拜;信奉 v 崇拜;信奉
+wound n 受傷 v 受傷
\ No newline at end of file
diff --git a/app/src/main/assets/word_packages.txt b/app/src/main/assets/word_packages.txt
new file mode 100755
index 0000000..0fa71e9
--- /dev/null
+++ b/app/src/main/assets/word_packages.txt
@@ -0,0 +1,15 @@
+7
+水果系列 介紹了30種形形色色的水果 n
+apple banana cherry coconut date durian grape grapefruit guava honeydew-melon kiwi lemon lychee mango muskmelon olive orange papaya peach pear persimmon pineapple plum ponkan shaddock starfruit strawberry tangerine watermelon wax-apple
+健康系列 有關於身心健康的相關單字都在這裡 n
+health spirit diet sport fat disease symptom cold dizzy cough snivel tired exhausted spasm stomachache headache backache flu cardiopathy dermatosis
+情緒系列 人的喜怒哀樂的情感表現單字都在這裡 adj
+happy unhappy depressed excited angry scared bored surprised embarrassed joyful glad cheerful carefree sulky irate indignant furious sad grieved sorrowful plaintive mournful worried disappointed disheartened despondent downcast dejected dispirited frustrated delighted pleased merry relaxed
+景物描述系列 有關景物描述方面的形容都在這裡 adj
+wide broad beautiful glorious superb wonderful high spectacular towering smooth glossy silky coarse rough gloomy desolate hollow vague fuzzy transparent
+數學統計系列 運算、統計與其他數學字詞會在這裡出現 n
+mathematics statistics number add subtract multiply divide sum average square cube equation exponent fraction function logarithm proportion quotient remainder plus minus percent infinity algebra arithmetic calculation
+物理科學系列 力學、電學與機械等等物理上的名詞 n
+physics energy force power pressure temperature motor chain gear battery cable wire fuse switch cycle frequency system electricity microwave resistance tide friction
+天文科學系列 囊括了天文、星象與天體的字詞 n
+universe earth moon sun planet star comet satellite meteorite meteor atmosphere dwarf solar nebula vortex stardust supernova eclipse galaxy Quasar
\ No newline at end of file
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/ActListOfWordPackage.java b/app/src/main/java/com/example/leeyuanair/englishhelper/ActListOfWordPackage.java
new file mode 100755
index 0000000..d1c8395
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/ActListOfWordPackage.java
@@ -0,0 +1,99 @@
+package com.example.leeyuanair.englishhelper;
+
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.example.leeyuanair.englishhelper.act_allwords.ActWordInfo;
+
+import java.util.ArrayList;
+
+public class ActListOfWordPackage extends AppCompatActivity implements ListView.OnItemClickListener {
+ //Global Variables
+ ArrayList information;
+ //TextView文字標籤元件
+ TextView lblWordPackageExplanation;
+ //ListView清單元件
+ ListView lstWordPackage;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_list_of_word_package);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ //連結文字標籤元件
+ lblWordPackageExplanation = (TextView) findViewById(R.id.lblWordPackageExplanation);
+ lstWordPackage = (ListView) findViewById(R.id.lstWordPackage);
+ lstWordPackage.setOnItemClickListener(this);
+ //讀取上一層的資料
+ int index = getIntent().getExtras().getInt("Index");
+ setTitle("單字包裹 - " + MainActivity.WORD_PACKAGES_NAMES.get(index));
+ //取得使用者所選的
+ information = MainActivity.WORD_PACKAGES.get(MainActivity.WORD_PACKAGES_NAMES.get(index));
+ ArrayAdapter wordsArrayAdapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1);
+ lblWordPackageExplanation.setText(information.get(0));
+ //逐次尋找該字資源並映到清單上
+ int power, point_power;
+ //設定詞性取得的優先權
+ switch (information.get(1)) {
+ case "n":
+ power = 0;
+ break;
+ case "a":
+ power = 1;
+ break;
+ case "v":
+ power = 2;
+ break;
+ case "adv":
+ power = 3;
+ break;
+ case "prep":
+ power = 4;
+ break;
+ default:
+ power = 0;
+ break;
+ }
+ //pOS = Part Of Speech,字串陣列,表示儲存某單字的所有詞性中文意思
+ String[] pOS;
+ //循序取得資訊並存路wordsArrayAdapter裡
+ for (int i = 2; i < information.size(); i++) {
+ pOS = MainActivity.ALL_WORDS.get(information.get(i));
+ point_power = power;
+ while (pOS[point_power] == null || pOS[point_power].equals(""))
+ point_power++;
+ wordsArrayAdapter.add(information.get(i) +" "+ Number2pOS(point_power) + " " + pOS[point_power]);
+ }
+ lstWordPackage.setAdapter(wordsArrayAdapter);
+ }
+ //函式 - 數值轉詞性縮寫
+ String Number2pOS(int number){
+ switch (number){
+ case 0: return "(n.)";
+ case 1: return "(adj.)";
+ case 2: return "(v.)";
+ case 3: return "(adv.)";
+ case 4: return "(prep.)";
+ default:return "(error)";
+ }
+ }
+
+ //當清單上的某項被按下時
+ @Override
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ Intent it = new Intent(this, ActWordInfo.class);
+ it.putExtra("isAddingMode", false);
+ it.putExtra("SelectedWord", information.get(position+2));
+ startActivity(it);
+ }
+
+ //當【返回】按鈕按下時
+ public void btnBack11_Click(View view) {finish();}
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/ActSearchWord.java b/app/src/main/java/com/example/leeyuanair/englishhelper/ActSearchWord.java
new file mode 100755
index 0000000..28146e8
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/ActSearchWord.java
@@ -0,0 +1,270 @@
+package com.example.leeyuanair.englishhelper;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.res.AssetManager;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.ListView;
+import android.widget.RadioButton;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.example.leeyuanair.englishhelper.access.WordInfo;
+import com.example.leeyuanair.englishhelper.act_allwords.ActWordInfo;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+
+public class ActSearchWord extends AppCompatActivity implements RadioButton.OnClickListener, AdapterView.OnItemClickListener {
+ //Valuables
+ WordInfo[] words; //所有的單字與其資訊
+ String selects; //表示使用者所選的篩選選項。"all"=全部, "n"=名詞, "adj"=形容詞, "v"=動詞, "adv"=副詞, "prep"=介係詞
+ ArrayList finds; //所選清單,表示搜尋時所找到的單字清單。
+ ArrayAdapter wordlist; //連結ArrayList與清單物件lstFinds之間的物件
+ boolean isAddingMode; //判斷是否為Group增加單字的模式
+ ArrayList Addition; //紀錄使用者所要增加的單字
+ //RadioButton
+ RadioButton rdoAll, rdoNoun, rdoAdjective, rdoVerb, rdoAdverb, rdoPreposition;
+ //Button
+ Button btnSearch;
+ //TextView
+ TextView txtSearch;
+ //ListView
+ ListView lstFinds;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_search_word);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("單字查詢");
+ //初始化變數
+ selects = "all";
+ finds = new ArrayList<>();
+ wordlist = new ArrayAdapter(this,android.R.layout.simple_list_item_1,finds);
+ //鏈結btnSearch元件
+ btnSearch = (Button) findViewById(R.id.btnSearch);
+ //鏈結txtSearch元件
+ txtSearch = (TextView) findViewById(R.id.txtSearch);
+ //鏈結lstFinds元件,並且與wordlist連結、登錄事件
+ lstFinds = (ListView) findViewById(R.id.lstFinds);
+ lstFinds.setAdapter(wordlist);
+ lstFinds.setOnItemClickListener(this);
+ //鏈結所有的RadioButton元件
+ rdoAll = (RadioButton) findViewById(R.id.rdoAll);
+ rdoNoun = (RadioButton) findViewById(R.id.rdoNoun);
+ rdoAdjective = (RadioButton) findViewById(R.id.rdoAdjective);
+ rdoVerb = (RadioButton) findViewById(R.id.rdoVerb);
+ rdoAdverb = (RadioButton) findViewById(R.id.rdoAdverb);
+ rdoPreposition = (RadioButton) findViewById(R.id.rdoPreposition);
+ //註冊RadioButton事件
+ rdoAll.setOnClickListener(this);
+ rdoNoun.setOnClickListener(this);
+ rdoAdjective.setOnClickListener(this);
+ rdoVerb.setOnClickListener(this);
+ rdoAdverb.setOnClickListener(this);
+ rdoPreposition.setOnClickListener(this);
+ //讀取所有單字
+ AssetManager am = getAssets();
+ try {
+ InputStream is = am.open("Words.txt");
+ byte[] data = new byte[is.available()];
+ is.read(data); is.close();
+ words = WordInfo.analyzeWordInfoString(new String(data));
+ }catch(Exception ex){
+ Toast.makeText(this,"資料讀取錯誤",Toast.LENGTH_SHORT).show();
+ }
+ //判別是否為增加單字模式
+ isAddingMode = (boolean) getIntent().getExtras().get("isAddingMode");
+ Addition = new ArrayList<>();
+ }
+
+ //返回上一層頁面
+ public void btnBack2_Click(View view) {
+ Intent theIntent = new Intent();
+ theIntent.putExtra("Addition", Addition);
+ setResult(0, theIntent);
+ finish();
+ }
+
+ //當【搜尋】按鈕按下時 - 執行查詢單字的功能
+ public void btnSearch_Click(View view) {
+ InputMethodManager inputMethodManager = (InputMethodManager) this.getSystemService(Activity.INPUT_METHOD_SERVICE); //取得輸入介面物件
+ inputMethodManager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), 0); //隱藏螢幕鍵盤
+ String target = txtSearch.getText().toString(); //取得使用者所輸入的文字
+ boolean isEnglish = checkEnglish(target.toCharArray()); //判斷使用者輸入的文字是否為英文
+ //讀取所有單字資料
+ try{
+ String[] spis;
+ finds.clear();
+ //依條件尋找單字
+ if(isEnglish){ //若使用者輸入的字串為英文時
+ //循序尋找有沒有(部分)符合的字串與詞性
+ for(WordInfo theWord : words){
+ if(theWord.word.contains(target)){ //若使用者所輸入的字與所選單字有部分符合時
+ if(checkPartofSpeech(theWord)){ //若該單字有使用者所指定的詞性時
+ finds.add(theWord.word);
+ }
+ }
+ }
+ }else{ //若使用者輸入的字串為非英文時
+ //循序尋找是否與使用者所選的詞性相符,且與使用者所輸入的文字有相關的單字
+ for(WordInfo theWord : words){
+ if(checkPartofMean(theWord, target)){
+ finds.add(theWord.word);
+ }
+ }
+ }
+ //將所找到的資料更新至lstFinds
+ if(finds.isEmpty())Toast.makeText(this,"未找到任何訊息相符的單字。",Toast.LENGTH_SHORT).show();
+ wordlist.notifyDataSetChanged();
+ }catch(Exception ex){
+ Toast.makeText(this,ex.toString(),Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ //檢測是否為純英文單字字串
+ boolean checkEnglish(char[] input){
+ boolean isEnglish = true;
+ for(int i=0;i90) && (input[i]<97 || input[i]>122)) {
+ isEnglish = false;
+ break;
+ }
+ }
+ return isEnglish;
+ }
+
+ //判斷該單字是否有某指定的詞性
+ boolean checkPartofSpeech(WordInfo theWord){
+ boolean returns = false;
+ if(selects.equals("all")){
+ returns = true;
+ }else{
+ switch (selects){
+ case "n" :
+ returns = theWord.noun!=null;
+ break;
+ case "a" :
+ returns = theWord.adjective!=null;
+ break;
+ case "v" :
+ returns = theWord.verb!=null;
+ break;
+ case "adv" :
+ returns = theWord.adverb!=null;
+ break;
+ case "prep" :
+ returns = theWord.preposition!=null;
+ break;
+ default :
+ }
+ }
+ return returns;
+ }
+
+ //判斷是否與使用者所選的詞性相符,且與使用者所輸入的文字有相關的單字
+ boolean checkPartofMean(WordInfo theWord,String target){
+ boolean returns = false;
+ if(selects.equals("all")){
+ returns = (theWord.noun!=null) && (theWord.noun.contains(target)) ||
+ (theWord.adjective!=null) && (theWord.adjective.contains(target)) ||
+ (theWord.verb!=null) && (theWord.verb.contains(target)) ||
+ (theWord.adverb!=null) && (theWord.adverb.contains(target)) ||
+ (theWord.preposition!=null) && (theWord.preposition.contains(target));
+ }else{
+ switch (selects){
+ case "n" :
+ returns = (theWord.noun!=null) && (theWord.noun.contains(target));
+ break;
+ case "a" :
+ returns = (theWord.adjective!=null) && (theWord.adjective.contains(target));
+ break;
+ case "v" :
+ returns = (theWord.verb!=null) && (theWord.verb.contains(target));
+ break;
+ case "adv" :
+ returns = (theWord.adverb!=null) && (theWord.adverb.contains(target));
+ break;
+ case "prep" :
+ returns = (theWord.preposition!=null) && (theWord.preposition.contains(target));
+ break;
+ default :
+ }
+ }
+ return returns;
+ }
+
+ //RadioButton事件 - 代表唯一選取的功能
+ @Override
+ public void onClick(View v) {
+ //判斷呼叫事件的物件類別是否為AppCompatRadioButton,也就是單選按鈕。
+ if(v.getClass().getSimpleName().equals("AppCompatRadioButton")){
+ uncheckAllRadioButton();
+ ((RadioButton) v).setChecked(true);
+ if(v==rdoAll)selects="all";
+ else if(v==rdoNoun)selects="n";
+ else if(v==rdoAdjective)selects="a";
+ else if(v==rdoVerb)selects="v";
+ else if(v==rdoAdverb)selects="adv";
+ else if(v==rdoPreposition)selects="prep";
+ }
+ }
+
+ //程序 - 解除所有RadioButton的選取
+ void uncheckAllRadioButton(){
+ rdoAll.setChecked(false);
+ rdoNoun.setChecked(false);
+ rdoAdjective.setChecked(false);
+ rdoVerb.setChecked(false);
+ rdoAdverb.setChecked(false);
+ rdoPreposition.setChecked(false);
+ }
+
+ //當使用者按下清單裡的某一項時,即顯示使用者選所的單字訊息。
+ //若模式為新增群組單字模式時,則傳遞新增單字的布林值true至下個頁面
+ @Override
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ try{
+ Object SelItem = parent.getItemAtPosition(position);
+ Intent theIntent = new Intent(this, ActWordInfo.class);
+ theIntent.putExtra("SelectedWord", SelItem.toString());
+ theIntent.putExtra("isAddingMode", isAddingMode);
+ startActivityForResult(theIntent, 0);
+ }catch(Exception ex){
+ Toast.makeText(this,ex.toString(),Toast.LENGTH_SHORT).show();
+ }
+ }
+ //當下一層的頁面關閉時
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ if(resultCode==0){
+ String theWord = data.getExtras().getString("isAdd");
+ //若使用者有選擇該單字且該單字之前沒有加入過群組的話則將單字加入
+ if(theWord!=null && !Addition.contains(theWord)){
+ Addition.add(theWord);
+ Collections.sort(Addition);
+ }
+ }
+ }
+
+ //攔截使用者所按下的按鍵 - 包含返回、家、視窗等等按鍵
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event){
+ if(keyCode == KeyEvent.KEYCODE_BACK){
+ Intent theIntent = new Intent();
+ theIntent.putExtra("Addition", Addition);
+ setResult(0, theIntent);
+ finish();
+ }
+ return super.onKeyDown(keyCode, event);
+ }
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/ActWordPackages.java b/app/src/main/java/com/example/leeyuanair/englishhelper/ActWordPackages.java
new file mode 100755
index 0000000..745f570
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/ActWordPackages.java
@@ -0,0 +1,44 @@
+package com.example.leeyuanair.englishhelper;
+
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class ActWordPackages extends AppCompatActivity implements ListView.OnItemClickListener {
+
+ //ListView清單元件
+ ListView lstAllWordPackages;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_word_packages);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("單字包裹");
+ //連結清單元件
+ lstAllWordPackages = (ListView) findViewById(R.id.lstAllWordPackages);
+ lstAllWordPackages.setOnItemClickListener(this);
+ ArrayAdapter wordPackageAdapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, MainActivity.WORD_PACKAGES_NAMES);
+ lstAllWordPackages.setAdapter(wordPackageAdapter);
+ }
+
+ //當清單元件裡的某項被按下時
+ @Override
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ Intent it = new Intent(this, ActListOfWordPackage.class);
+ it.putExtra("Index", position);
+ startActivity(it);
+ }
+
+ //當【返回】按鈕按下時
+ public void btnBack10_Click(View view) {
+ finish();
+ }
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/MainActivity.java b/app/src/main/java/com/example/leeyuanair/englishhelper/MainActivity.java
new file mode 100755
index 0000000..ee753b4
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/MainActivity.java
@@ -0,0 +1,242 @@
+package com.example.leeyuanair.englishhelper;
+
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.res.AssetManager;
+
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.example.leeyuanair.englishhelper.access.WordInfo;
+import com.example.leeyuanair.englishhelper.act_4selections.Act4Selection;
+import com.example.leeyuanair.englishhelper.act_allwords.ActAllVoca;
+import com.example.leeyuanair.englishhelper.act_allwords.ActWordInfo;
+import com.example.leeyuanair.englishhelper.act_memory.ActMemorySetting;
+import com.example.leeyuanair.englishhelper.act_spelling.ActSpellingSetting;
+
+import java.io.*;
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.Random;
+
+public class MainActivity extends AppCompatActivity {
+ //Global Static Variables 公有靜態變數
+ public static LinkedHashMap ALL_WORDS;
+ public static ArrayList WORDS;
+ public static LinkedHashMap> GROUPS;
+ public static ArrayList GROUP_NAMES;
+ public static int groupCount;
+ public static LinkedHashMap> WORD_PACKAGES;
+ public static ArrayList WORD_PACKAGES_NAMES;
+ //Buttn按鈕元件
+ Button btn4Select;
+ Button btnFillUp;
+ Button btnMemory;
+ Button btnSpelling;
+ Button btnAllVoca;
+ //TextView文字標籤元件
+ TextView lblVersion;
+ TextView lblWordMessage;
+ //其他變數
+ AssetManager am;
+ public WordInfo[] words;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("英文幫手");
+ //鏈結按鈕物件
+ btn4Select = (Button) findViewById(R.id.btn4Select);
+ btnMemory = (Button) findViewById(R.id.btnMemory);
+ btnSpelling = (Button) findViewById(R.id.btnSpelling);
+ btnAllVoca = (Button) findViewById(R.id.btnAllVoca);
+ //鏈結文字標籤物件
+ lblVersion = (TextView) findViewById(R.id.lblVersion);
+ lblWordMessage = (TextView) findViewById(R.id.lblWordMessage);
+ //其他設定
+ am = getAssets();
+ //####讀取單字資料####
+ try{
+ InputStream is = am.open("Words.txt");
+ int length = is.available();
+ byte[] data = new byte[length];
+ is.read(data); is.close();
+ ALL_WORDS = WordInfo.analyzeWordInfo(new String(data)); //將單字資料解析並將其結果放回ALL_WORDS裡
+ WORDS = new ArrayList<>(); //建立WORDS英文單字
+ WORDS.addAll(ALL_WORDS.keySet()); //將ALL_WORDS的鍵值加入到WORDS裡
+ }catch(Exception ex){
+ setTitle("Fail");
+ lblVersion.setText(ex.toString());
+ }
+ String[] item = new String[5];
+ //####是否初次使用此APP的確認函式,環境初始化函式####
+ firstInitialize();
+ //####讀取單字群組####
+ GROUPS = new LinkedHashMap<>();
+ GROUP_NAMES = new ArrayList<>();
+ try{
+ //讀取群組單字檔案
+ InputStream is = new FileInputStream(getFilesDir()+"/groups.txt");
+ byte[] data = new byte[is.available()];
+ is.read(data); is.close();
+ String info[] = ((new String(data)).replace("\r","")).split("\n"); //解析字串
+ groupCount = Integer.parseInt(info[0]); //群組數量
+ for(int i=1;i(Arrays.asList(info[i + 1].split(" "))));
+ }
+ }catch(Exception ex){
+ Toast.makeText(MainActivity.this, "群組單字資料讀取錯誤", Toast.LENGTH_SHORT).show();
+ }
+ //####讀取單字包裹檔案####
+ WORD_PACKAGES = new LinkedHashMap<>(); //建構WORD_PACKAGES
+ WORD_PACKAGES_NAMES = new ArrayList<>();
+ try{
+ InputStream is = am.open("word_packages.txt"); //開起在assets的檔案word_packages.txt
+ byte[] data = new byte[is.available()]; //建立data變數,並以該資料長度作為陣列的長度
+ is.read(data); is.close(); //以byte[]的形式將資料讀出。讀出後將資料流關閉
+ //解析字串
+ String[] infos = ((new String(data)).replace("\r","")).split("\n"); //以換行符號為單位拆成若干個字串陣列infos[]
+ String wordPackageName; ArrayList content; //建立wordPackageName與content來暫存包裹名稱及其內容
+ String[] spis1, spis2; //spis1與spis2表示infos[]內容的再細分,其中以空白符號作為單位
+ //##循序讀取##
+ for(int i=1;i();
+ spis1 = infos[i].split(" "); //解析
+ spis2 = infos[i+1].split(" "); //解析
+ wordPackageName = spis1[0];
+ WORD_PACKAGES_NAMES.add(wordPackageName);
+ content.add(spis1[1]); content.add(spis1[2]);
+ content.addAll(Arrays.asList(spis2)); //利用Arrays類別裡的靜態函數asList()來將陣列spis2轉為表準清單
+ WORD_PACKAGES.put(wordPackageName, content); //最後加入到WORD_PACKAGES裡
+ }
+ }catch(Exception ex){
+ Toast.makeText(MainActivity.this, "單字包裹資料讀取錯誤", Toast.LENGTH_SHORT).show();
+ }
+ //####判別「每日一字」是否需要更新,如果不需要則顯示紀錄的單字;如果需要則更新並顯示其單字
+ Calendar c = Calendar.getInstance();
+ int y=c.get(c.YEAR), m=c.get(c.MONTH), d=c.get(c.DAY_OF_MONTH);
+ String dayCheck = (String.valueOf(y)+ ((m+1)>9 ? String.valueOf(m+1) : "0"+String.valueOf(m+1))+ (d>9 ? String.valueOf(d) : "0"+String.valueOf(d)));
+ try{
+ InputStream is = new FileInputStream(getFilesDir()+"/daily.txt");
+ byte[] data = new byte[is.available()];
+ is.read(data); is.close();
+ String[] dailyInfo = ((new String(data)).replace("\r","")).split("\n");
+ //確認紀錄日期是否為今日
+ if(dailyInfo[0].equals(dayCheck)){
+ lblWordMessage.setText(dailyInfo[1]);
+ }else{ //若不是,則更新日期與單字
+ Random rnd = new Random(); rnd.setSeed(rnd.nextInt(100));
+ String newWord = WORDS.get(rnd.nextInt(WORDS.size()));
+ OutputStream os = new FileOutputStream(getFilesDir()+"/daily.txt", false);
+ os.write((dayCheck+"\r\n"+newWord).getBytes());
+ os.flush(); os.close();
+ lblWordMessage.setText(newWord);
+ }
+ }catch(Exception ex){
+ Toast.makeText(MainActivity.this, "每日一字讀取錯誤", Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ //當【字義選擇】按鈕按下時,開啟字義選擇頁面。
+ public void btn4Select_Click(View view) {
+ Intent it = new Intent(this, Act4Selection.class);
+ startActivity(it);
+ }
+
+ //當【記憶練習】按鈕按下時,開啟記憶練習設定頁面。
+ public void btnMemory_Click(View view) {
+ Intent it = new Intent(this, ActMemorySetting.class);
+ startActivity(it);
+ }
+
+ //當【拼字測驗】按鈕按下時,開啟拼字練習設定頁面
+ public void btnSpelling_Click(View view) {
+ Intent it = new Intent(this, ActSpellingSetting.class);
+ startActivity(it);
+ }
+
+ //當【文字包裹】按鈕按下時,開啟文字包裹頁面
+ public void btnWordPackage_Click(View view) {
+ Intent it = new Intent(this, ActWordPackages.class);
+ startActivity(it);
+ }
+
+ //當【單字列表】按鈕按下時,開啟單字列表頁面。
+ public void btnAllVoca_Click(View view) {
+ startActivity(new Intent(this, ActAllVoca.class));
+ }
+
+ //當lblWordMessage標籤物件按下時
+ public void lblWordMessage_Click(View view) {
+ Intent it = new Intent(this, ActWordInfo.class);
+ it.putExtra("isAddingMode", false);
+ it.putExtra("SelectedWord", lblWordMessage.getText().toString());
+ startActivity(it);
+ }
+
+ //環境初始化 - 當使用者為第一次使用此Application時,初始化所有相關的變數。
+ protected void firstInitialize(){
+ try{
+ //確認群組檔案是否存在,如果不存在就新增一個新的群組檔案
+ File groups = new File(getFilesDir()+"/groups.txt");
+ if(!groups.exists()){
+ groups.createNewFile();
+ OutputStream os = new FileOutputStream(getFilesDir()+"/groups.txt");
+ os.write(("0").getBytes());
+ os.flush(); os.close();
+ }else{
+ //groups.delete();
+ //Toast.makeText(this,"Deleted",Toast.LENGTH_SHORT).show();
+ }
+ //確認每日紀錄的檔案是否存在,如果不存在則新創一個
+ File daily = new File(getFilesDir()+"/daily.txt");
+ if(!daily.exists()){
+ daily.createNewFile();
+ OutputStream os = new FileOutputStream(getFilesDir()+"/daily.txt");
+ String word = WORDS.get((new Random()).nextInt(WORDS.size())); //隨機選取一個單字
+ Calendar c = Calendar.getInstance(); //取得當前時間
+ int y=c.get(c.YEAR), m=c.get(c.MONTH), d=c.get(c.DAY_OF_MONTH);
+ os.write((String.valueOf(y) +
+ ((m + 1) > 9 ? String.valueOf(m + 1) : "0" + String.valueOf(m + 1)) +
+ (d > 9 ? String.valueOf(d) : "0" + String.valueOf(d)) +
+ "\r\n" + word).getBytes());
+ os.flush(); os.close();
+ }
+ }catch(Exception ex){
+ lblVersion.setText(ex.toString());
+ }
+ }
+
+ //當版本訊息lblVersion按下時
+ public void lblVersion_Click(View view) {
+ AlertDialog.Builder msgBox = new AlertDialog.Builder(this)
+ .setTitle("關於英文幫手")
+ .setMessage("此應用程式由Nebula3122製作。\r\n若有錯誤的地方就麻煩通知我吧,\r\n我會進行修正的動作,謝謝!")
+ .setPositiveButton("OK", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {}})
+ .setNeutralButton("Email", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
+ emailIntent.setType("plain/text");
+ emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"alan159753@gmail.com"});
+ emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "英文幫手 - 回應");
+ emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "內文");
+ startActivity(Intent.createChooser(emailIntent, "Email回覆"));
+ }
+ });
+ msgBox.show();
+ }
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/access/FTPThread.java b/app/src/main/java/com/example/leeyuanair/englishhelper/access/FTPThread.java
new file mode 100755
index 0000000..ab27200
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/access/FTPThread.java
@@ -0,0 +1,25 @@
+package com.example.leeyuanair.englishhelper.access;
+
+import android.content.Context;
+import android.widget.Toast;
+
+import org.apache.commons.net.ftp.FTPClient;
+
+/**
+ * Created by Lee Yuan Air on 2016/2/22.
+ */
+public class FTPThread extends Thread {
+ FTPClient ftp;
+ public void setFtp(FTPClient ftp){
+ this.ftp = ftp;
+ }
+ @Override
+ public void run(){
+ try{
+ ftp.connect("192.168.1.216",21);
+ }catch(Exception ex){
+
+ }
+
+ }
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/access/TheManager.java b/app/src/main/java/com/example/leeyuanair/englishhelper/access/TheManager.java
new file mode 100755
index 0000000..b13e1ee
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/access/TheManager.java
@@ -0,0 +1,29 @@
+package com.example.leeyuanair.englishhelper.access;
+
+import android.app.Application;
+import android.util.Log;
+
+import com.example.leeyuanair.englishhelper.access.WordInfo;
+
+import java.io.FileInputStream;
+import java.io.InputStream;
+
+/**
+ * Created by Lee Yuan Air on 2016/4/10.
+ *
+ */
+public class TheManager extends Application{
+
+ public WordInfo[] all_word;
+
+ public TheManager(){
+ super();
+
+ }
+
+ public void start(){
+
+ }
+}
+
+
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/access/WordInfo.java b/app/src/main/java/com/example/leeyuanair/englishhelper/access/WordInfo.java
new file mode 100755
index 0000000..3c1e374
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/access/WordInfo.java
@@ -0,0 +1,108 @@
+package com.example.leeyuanair.englishhelper.access;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+
+/**
+ * Created by Lee Yuan Air on 2016/2/21.
+ *
+ */
+public class WordInfo {
+ public String word;
+ public String noun, adjective, verb, adverb, preposition;
+ public WordInfo(String word, String noun, String adjective, String verb, String adverb, String preposition){
+ this.word = word;
+ this.noun = noun;
+ this.adjective = adjective;
+ this.verb = verb;
+ this.adverb = adverb;
+ this.preposition = preposition;
+ }
+ public void setWord(String word){this.word = word;}
+ public void setNoun(String noun){this.noun = noun;}
+ public void setAdjective(String adjective){this.adjective = adjective;}
+ public void setVerb(String verb){this.verb = verb;}
+ public void getAdverb(String adverb){this.adverb = adverb;}
+ public void setPreposition(String preposition){this.preposition = preposition;};
+ public static void sort(WordInfo[] data){
+ WordInfo temp;
+ for(int i=1;i=i;q--){
+ if(data[q-1].word.compareTo(data[q].word)>0){
+ temp = data[q-1];
+ data[q-1] = data[q];
+ data[q] = temp;
+ }
+ }
+ }
+ }
+
+ //解析字串並轉入HashMap集合物件裡的資料,最後回傳之。
+ public static LinkedHashMap analyzeWordInfo(String inputs){
+ String[] info = (inputs.replace("\r","")).split("\n");
+ LinkedHashMap wordinfos = new LinkedHashMap<>();
+ String[] spis;
+ String word,n,a,v,adv,prep;
+ for(int i=1;i 0) ? num : 1));
+ }
+
+ //當按鈕物件btnChangeGroup1_Click按下時
+ public void btnChangeGroup1_Click(View view) {
+ final ArrayAdapter grouplist = new ArrayAdapter(this, android.R.layout.simple_list_item_1);
+ byte[] data;
+ grouplist.add("所有單字");
+ //讀取群組檔案
+ try{
+ InputStream is = new FileInputStream(getFilesDir()+"/groups.txt");
+ data = new byte[is.available()];
+ is.read(data); is.close();
+ final String[] info = ((new String(data)).replace("\r","")).split("\n");
+ for(int i=1;i=0){
+ //確認該選擇的群組內容不為空
+ if(!info[Selection*2+2].equals("0")){
+ int n=0, a=0, v=0, adv=0, prep=0; //紀錄個詞性在群組內的數量
+ String[] spis = info[Selection*2+2].split(" "); //分解群組內容(字串)
+ //若群組單字量大於4時,符合最低群組取用條件
+ if(spis.length>4){
+ //標示該群組可進行測驗
+ qualified = true;
+ //逐一地解析內容,並篩選、紀錄詞性總數
+ for(int i=0;i3; A = a>3; V = v>3; ADV = adv>3; PREP = prep>3;
+ extraMsg = ((N && A && V && ADV && PREP) ? "" : "由於此群組內的") +
+ (N ? "" : " 名詞") + (A ? "" : " 形容詞") + (V ? "" : " 動詞") + (ADV ? "" : " 副詞") + (PREP ? "" : " 介係詞") +
+ ((N && A && V && ADV && PREP) ? "" : "類的數量小於3個,因此系統若隨機選到該類詞性時,其選項會包括群組外的同詞性單字。");
+ //若【選項中僅出現群組裡的單字】的格子勾選時,顯示其訊息
+ lblExtraMsg1.setTextColor(Color.argb(255,160,160,160));
+ if(chkOnlyGroupItem1.isChecked()){
+ lblExtraMsg1.setText(extraMsg);
+ }
+ }else{ //若群組單字量小於等於4時,則告知使用者該群組不符合最低條件。
+ //標示該群組不能進行測驗
+ qualified = false;
+ lblExtraMsg1.setTextColor(Color.RED);
+ extraMsg = "群組內的單字量必須大於4個才能開始測驗!";
+ lblExtraMsg1.setText(extraMsg);
+ }
+ }else{ //若該群組為空時,也就是單字量為0時,告知使用者該群組不可用
+ //標示該群組不能進行測驗
+ qualified = false;
+ lblExtraMsg1.setTextColor(Color.RED);
+ extraMsg = "由於所選群組內無任何單字,因此無法開始測驗!";
+ lblExtraMsg1.setText(extraMsg);
+ }
+ }else{ //當使用者選擇「所有單字」選項時
+ //標示該群組可進行測驗
+ qualified = true;
+ lblExtraMsg1.setTextColor(Color.argb(255,160,160,160));
+ lblExtraMsg1.setText("");
+ extraMsg = "";
+ }
+ }
+ });
+ //顯示對話方塊
+ alert.show();
+ }catch(Exception ex){
+ Toast.makeText(Act4Selection.this, "群組檔案讀取錯誤。", Toast.LENGTH_SHORT).show();
+ }
+
+ }
+
+ //當【選項中僅出現群組裡的單字】勾選方塊按下時
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ if(qualified){
+ if(isChecked) {
+ lblExtraMsg1.setText(extraMsg);
+ } else {
+ lblExtraMsg1.setText("");
+ }
+ }
+ }
+
+ //當【返回】按鈕按下時
+ public void btnBack_Click(View view) {finish();}
+
+ //當【說明】按鈕按下時
+ public void btnExplanation1_Click(View view) {
+ final AlertDialog.Builder adExp1, adExp2, adExp3;
+ //設定對話方塊的內容
+ adExp3 = new AlertDialog.Builder(this)
+ .setTitle("說明")
+ .setMessage("在設定的部分,你可以選擇目前所定義的群組單字、設定題目數及設定每一題的回答時間。" +
+ "完成之後你就可以按下【開始測驗】來進行測驗了!")
+ .setPositiveButton("完成", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {}});
+ adExp2 = new AlertDialog.Builder(this)
+ .setTitle("說明")
+ .setMessage("若你選擇正確,增加一次回答正確的紀錄;若選擇錯誤,則會公布正確答案並增加一次回答錯誤的紀錄。")
+ .setPositiveButton("下一頁", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ adExp3.show();
+ }
+ });
+ adExp1 = new AlertDialog.Builder(this)
+ .setTitle("說明")
+ .setMessage("此測驗方法與四選一選擇題一樣,題目會秀出英文單字與其詞性," +
+ "而下方有四個寫著不同中文意義的按鈕,你只需要選出與題目相符的答案。")
+ .setPositiveButton("下一步", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ adExp2.show();
+ }
+ });
+ adExp1.show();
+ }
+
+ //當【開始測驗】按鈕按下時
+ public void btnStartTest1_Click(View view) {
+ //如果所選群組符合條件
+ if(qualified){
+ Intent it = new Intent(Act4Selection.this,ActMultipleChoice.class);
+ it.putExtra("Selection", Selection); //使用者所選的群組
+ it.putExtra("Amount", Integer.valueOf(txtQAmount1.getText().toString())); //測驗的題目總數
+ it.putExtra("SecPerQ", skbTimeSet1.getProgress()); //一題的限制秒數
+ //選項的單字是否僅出現群組中所有的單字
+ if(chkOnlyGroupItem1.isChecked()){
+ it.putExtra("cN", N); it.putExtra("cA", A); it.putExtra("cV", V);
+ it.putExtra("cADV", ADV); it.putExtra("cPREP", PREP);
+ }else{
+ it.putExtra("cN", false); it.putExtra("cA", false); it.putExtra("cV", false);
+ it.putExtra("cADV", false); it.putExtra("cPREP", false);
+ }
+ startActivity(it);
+ }
+ }
+
+ ////SeekBar滑桿物件的事件處理副程式
+ //當滑感滑動時
+ @Override
+ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+ if(progress==0){
+ lblTimePerQ1.setText("每題答題時間: 無限制");
+ }else{
+ lblTimePerQ1.setText("每題答題時間: "+progress+"秒");
+ }
+ }
+
+ @Override
+ public void onStartTrackingTouch(SeekBar seekBar) {}
+
+ @Override
+ public void onStopTrackingTouch(SeekBar seekBar) {}
+
+ ////#######################
+
+
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/act_4selections/Act4SelectionResult.java b/app/src/main/java/com/example/leeyuanair/englishhelper/act_4selections/Act4SelectionResult.java
new file mode 100755
index 0000000..0b4e6e0
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/act_4selections/Act4SelectionResult.java
@@ -0,0 +1,95 @@
+package com.example.leeyuanair.englishhelper.act_4selections;
+
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.pm.ActivityInfo;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.example.leeyuanair.englishhelper.R;
+
+import java.util.ArrayList;
+
+public class Act4SelectionResult extends AppCompatActivity implements ListView.OnItemClickListener {
+ //Global Variables
+ ArrayList QuestionList;
+ ArrayList AnswerList;
+ ArrayList UserAnswerList;
+ //TextView文字標籤物件
+ TextView lblQuestionAmount1;
+ TextView lblRights1;
+ TextView lblWrongs1;
+ //ListView清單物件
+ ListView lstAnswerLog1;
+ //ArrayAdapter清單陣列連結物件
+ ArrayAdapter answerLogAdapter;
+ //AlertDialog.Builder對話方塊建立物件
+ AlertDialog.Builder aswInfo;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act4_selection_result);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("字義選擇 - 測驗結果");
+ //連結文字標籤物件
+ lblQuestionAmount1 = (TextView) findViewById(R.id.lblQuestionAmount1);
+ lblRights1 = (TextView) findViewById(R.id.lblRights1);
+ lblWrongs1 = (TextView) findViewById(R.id.lblWrongs1);
+ //連結清單物件
+ lstAnswerLog1 = (ListView) findViewById(R.id.lstAnswerLog1);
+ //取得測驗後的資料
+ Bundle msg = getIntent().getExtras();
+ QuestionList = (ArrayList) msg.get("QuestionList");
+ AnswerList = (ArrayList) msg.get("AnswerList");
+ UserAnswerList = (ArrayList) msg.get("UserAnswerList");
+ lblQuestionAmount1.setText(String.valueOf(msg.getInt("maxQ")));
+ lblRights1.setText(String.valueOf(msg.getInt("rights")));
+ lblWrongs1.setText(String.valueOf(msg.getInt("maxQ")-msg.getInt("rights")));
+ //設定ArrayAdapter,並將其連結至lstAnswerLog1裡
+ answerLogAdapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1);
+ String[] itemSlot;
+ for(int i=0; i parent, View view, int position, long id) {
+ try {
+ if (AnswerList.get(position).equals(UserAnswerList.get(position))) {
+ aswInfo.setTitle("此題答對");
+ aswInfo.setMessage("答案: " + QuestionList.get(position)[AnswerList.get(position)]);
+ } else {
+ aswInfo.setTitle("此題答錯");
+ aswInfo.setMessage("正確答案: " + QuestionList.get(position)[AnswerList.get(position)] + "\r\n你的答案: " +
+ ((UserAnswerList.get(position).equals(-1)) ? "*超出時間" : QuestionList.get(position)[UserAnswerList.get(position)]));
+ }
+ aswInfo.show();
+ }catch(Exception ex){
+ Toast.makeText(Act4SelectionResult.this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ void keep(){
+
+ }
+
+ //當【返回至設定頁面】按鈕按下時
+ public void btnBack5_Click(View view) {
+ finish();
+ }
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/act_4selections/ActMultipleChoice.java b/app/src/main/java/com/example/leeyuanair/englishhelper/act_4selections/ActMultipleChoice.java
new file mode 100755
index 0000000..474a8c6
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/act_4selections/ActMultipleChoice.java
@@ -0,0 +1,356 @@
+package com.example.leeyuanair.englishhelper.act_4selections;
+
+import android.app.AlertDialog;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.Button;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.example.leeyuanair.englishhelper.MainActivity;
+import com.example.leeyuanair.englishhelper.R;
+
+import java.util.ArrayList;
+import java.util.Random;
+import java.util.Timer;
+import java.util.TimerTask;
+
+public class ActMultipleChoice extends AppCompatActivity {
+ //Global Variable
+ int maxQ, Q; //總題數, 目前答題
+ int timelimit, timecount; //時間倒數值, 計時值
+ int rights; //答對題數
+ boolean cN, cA, cV, cADV, cPREP; //該詞性是否只取用群組中的單字
+ boolean checks[];
+ public int delay; //延遲時間
+ public int mode; //表示目前計數的模式
+ int backUpTimeCount; //計算使用者按下返回鍵時再按下一次返回鍵間的間隔時間
+ //若在該時間之內則讓使用者退出測驗
+ //題目方面的變數
+ ArrayList QuestionList; //題目清單
+ ArrayList AnswerList; //答案清單
+ ArrayList UserAnswerList; //紀錄使用者的回答
+ //Timer計時器
+ Timer countdownTimer;
+ //TextView文字標籤物件
+ TextView lbl4SelStatus1, lbl4SelStatus2;
+ TextView lbl4SelQuestion;
+ //Button按鈕物件
+ Button btnSelection1, btnSelection2, btnSelection3, btnSelection4;
+ //ProgressBar進度顯示物件
+ ProgressBar pgbCountdown1;
+ //AlertDialog.Builder對話框建立物件
+ AlertDialog AnswerShows;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_multiple_choice);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("字義選擇");
+ Bundle msg = getIntent().getExtras();
+ mode = 1; delay=4;
+ //##連結文字標籤物件
+ lbl4SelStatus1 = (TextView) findViewById(R.id.lbl4SelStatus1);
+ lbl4SelStatus2 = (TextView) findViewById(R.id.lbl4SelStatus2);
+ lbl4SelQuestion = (TextView) findViewById(R.id.lbl4SelQuestion);
+ //##連結按鈕物件
+ btnSelection1 = (Button) findViewById(R.id.btnSelection1);
+ btnSelection2 = (Button) findViewById(R.id.btnSelection2);
+ btnSelection3 = (Button) findViewById(R.id.btnSelection3);
+ btnSelection4 = (Button) findViewById(R.id.btnSelection4);
+ //##連結進度表示物件 並 為其建立獨立的執行續以連結倒數的動作
+ pgbCountdown1 = (ProgressBar) findViewById(R.id.pgbCountdown1);
+ //##初始化對話框物件
+ AnswerShows = (new AlertDialog.Builder(this)).create();
+ AnswerShows.setTitle("答案");
+ AnswerShows.setCancelable(false);
+ //##取得資料
+ maxQ = msg.getInt("Amount");
+ timelimit = msg.getInt("SecPerQ") * 1000;
+ checks = new boolean[5];
+ checks[0] = msg.getBoolean("cN"); checks[1] = msg.getBoolean("cA"); checks[2] = msg.getBoolean("cV");
+ checks[3] = msg.getBoolean("cADV"); checks[4] = msg.getBoolean("cPREP");
+ //##初始化變數
+ timecount = 0; Q = 0;
+ rights = 0;
+ countdownTimer = new Timer();
+ countdownTimer.schedule(countdownTask, 0, 1);
+ //將進度顯示物件的最大直設為timelimit
+ pgbCountdown1.setMax(1000);
+ //##初始化介面
+ lbl4SelStatus1.setText("總題數: "+maxQ+" ,目前答題: 0");
+ //##初始化題目列表
+ InitQuestionList(msg.getInt("Selection"));
+ }
+
+ //TimerTask計時器工作物件 - 當Timer倒數計時至一定時間時所執行的動作,其中利用此物件作為Timer工作表。
+ public final TimerTask countdownTask = new TimerTask() {
+ @Override
+ public void run() {
+ //####透過runOnUiThread來取得合法控制使用者介面物件的權利####
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ //若backUpTimeCount大於0,則將其減1
+ if (backUpTimeCount > 0) backUpTimeCount--;
+ //####以下為測驗判斷程序####
+ //依照mode是否為真,將timecount+1或-1
+ timecount += mode;
+ //如果延遲時間計數delay大於0 - 為使用者剛進入時的緩衝時間
+ if (delay > 0) {
+ //每次做1秒的倒數,當倒數至1秒時,delay-1,時間計數timecount重設回0,此動作直到delay==0為止。
+ if (timecount == 1000) {
+ delay--;
+ timecount = 0;
+ //當delay計數完時,將進度顯示物件的最大值設為使用者所限制的時間timelimit
+ if (delay == 0) {
+ pgbCountdown1.setMax((timelimit>0) ? timelimit : 500);
+ if (timelimit == 0) {
+ mode = 0;
+ timecount=1;
+ }
+ lbl4SelQuestion.setText(QuestionList.get(Q)[0]);
+ btnSelection1.setText(QuestionList.get(Q)[1]);
+ btnSelection2.setText(QuestionList.get(Q)[2]);
+ btnSelection3.setText(QuestionList.get(Q)[3]);
+ btnSelection4.setText(QuestionList.get(Q)[4]);
+ } else {
+ //若delay沒有計數完,則顯示倒數數值delay
+ lbl4SelQuestion.setText(String.valueOf(delay));
+ }
+ }
+ } else { //如果delay==0時(即delay<0時),也就是使用者已經進入測驗狀態
+ if (mode == 1) {
+ //判別計數時間是否到達限制時間
+ if (timecount > timelimit) {
+ //如果以到達時間的話,將mode(測驗模式)設為false,表示目前暫停測驗
+ //並告知使用者的作答時間已經超過預設時間、顯示答案及更新答題狀態
+ //最後設定2秒短暫延遲時間讓使用者可以看得到答案
+ mode = -1;
+ UserAnswerList.add(-1);
+ AnswerShows.setTitle("超過時間!");
+ AnswerShows.setMessage("答案: " + QuestionList.get(Q)[AnswerList.get(Q)]);
+ AnswerShows.show();
+ pgbCountdown1.setProgress(2000);
+ pgbCountdown1.setMax(2000);
+ timecount = 2000;
+ }
+ } else {
+ //若顯示答案的時間完畢後
+ if (timecount == 0) {
+ //確認全部題目是否答完
+ if (Q == maxQ - 1) {
+ AnswerShows.dismiss(); //把AnswerShows對話方塊取消掉
+ countdownTimer.cancel();
+ countdownTimer.purge();
+ //開啟結果顯示頁面
+ Intent it = new Intent(ActMultipleChoice.this, Act4SelectionResult.class);
+ it.putExtra("QuestionList", QuestionList);
+ it.putExtra("AnswerList", AnswerList);
+ it.putExtra("UserAnswerList", UserAnswerList);
+ it.putExtra("maxQ", maxQ);
+ it.putExtra("rights", rights);
+ startActivityForResult(it, 0);
+ } else { //如果題目尚未全部答完的話,則目前題號+1,並更新題目內容
+ mode = (timelimit == 0) ? 0 : 1; //把mode轉為true,為答題模式
+ timecount = (timelimit == 0) ? 1 : 0; //若時限為無限制,則把timecount設為1,以免誤判
+ AnswerShows.dismiss(); //把AnswerShows對話方塊取消掉
+ //更新題目內容
+ Q++; //題號+1
+ //依照目前的題號,從題目清單裡提出題目與四個選項,並放入所設定的位置
+ lbl4SelQuestion.setText(QuestionList.get(Q)[0]);
+ btnSelection1.setText(QuestionList.get(Q)[1]);
+ btnSelection2.setText(QuestionList.get(Q)[2]);
+ btnSelection3.setText(QuestionList.get(Q)[3]);
+ btnSelection4.setText(QuestionList.get(Q)[4]);
+ //更新答題數狀態
+ lbl4SelStatus1.setText("總題數: " + maxQ + ", 目前答題: " + (Q + 1));
+ lbl4SelStatus2.setText("答對題數: " + String.valueOf(rights) + " ,答錯題數: " + String.valueOf(Q - rights));
+ pgbCountdown1.setMax((timelimit>0) ? timelimit : 500); //將進度顯示物件的最大值設為timelimit
+ }
+ }
+ }
+ }
+ //更新進度顯示物件的進度數值
+ pgbCountdown1.setProgress(timecount);
+ }
+ });
+ //############################################################
+ }
+ };
+
+ //程序 - 初始化題目列表
+ void InitQuestionList(int index){
+ ArrayList tarGroup = (index>=0) ? (MainActivity.GROUPS.get(MainActivity.GROUP_NAMES.get(index))) : (MainActivity.WORDS); //取得使用者所選的群組
+ Random rnd = new Random(); //亂數產生器
+ rnd.setSeed(rnd.nextInt(100));
+ QuestionList = new ArrayList<>(); //題目清單
+ AnswerList = new ArrayList<>(); //答案清單回答紀錄(清單)
+ UserAnswerList = new ArrayList<>(); //使用者
+ int type, ans; //type表示目前所視單字的某項詞性: 0為名詞、1為形容詞、2為動詞、3為副詞、4為介係詞; ans表示答案正確項
+ //判別使用者所選定的題數數量是否大於群組內所有單字的數量
+ ArrayList rndGroup = new ArrayList<>(); //初始化基本亂數題庫
+ //如果使用者所指定的題目數量超過所選單字群組內的單字數量的話,則亂數取得動作就做1次以上
+ //其次數依照maxQ使用者指定出題數 除以 所選群組內單字量後結果的+1次
+ for(int i=1;i<=(maxQ/tarGroup.size()+1);i++){
+ rndGroup.addAll(randomizeItems(tarGroup));
+ }
+ String[] itemPorts; //項目插槽 - 0為詞性, 1~4為答案選項
+ //##依次對每一個項目做整理的動作
+ for(int i=1;i<=maxQ;i++){
+ //##更新項目插槽
+ itemPorts = new String[5];
+ //##取得單字資訊
+ String[] wordinfo = MainActivity.ALL_WORDS.get(rndGroup.get(i));
+ type = rnd.nextInt(5); //隨機取得此字中的某一詞性
+ while(wordinfo[type]==null){ //判斷所選單字有沒有該詞性,如果無,則項次+1直到有為止
+ type++;
+ if(type==5) type=0;
+ }
+ ans = rnd.nextInt(4)+1; //從1~4中隨機選取一項(號)作為要放入答案的地方
+ AnswerList.add(ans); //將亂數所取的答案號放入答案清單中
+ itemPorts[ans] = wordinfo[type]; //將正確的中文詞性意思放入該項中
+ switch(type) { //依照所紀錄數值來決定要放入何種詞性(字串)
+ case 0:
+ itemPorts[0] = rndGroup.get(i) + " (n.)";
+ break;
+ case 1:
+ itemPorts[0] = rndGroup.get(i) + " (adj.)";
+ break;
+ case 2:
+ itemPorts[0] = rndGroup.get(i) + " (v.)";
+ break;
+ case 3:
+ itemPorts[0] = rndGroup.get(i) + " (adv.)";
+ break;
+ case 4:
+ itemPorts[0] = rndGroup.get(i) + " (prep.)";
+ break;
+ default:
+ break;
+ }
+ //##由項目插槽的標號1做到標號4
+ //設定初始亂數位置,當選擇到某一數值後,其後都會逐次往下,如: rndNum亂數取得到11,之後所要選的亂數都會是12,13,14...逐次下去的
+ int rndNum = checks[type] ? (tarGroup.size()) : (MainActivity.ALL_WORDS.size());
+ rndNum = rnd.nextInt(rndNum);
+ String selected; //表示由亂數所選到的英文單字
+ String[] selectedWordInfo; //表示所選到的英文單字的詞性內容
+ for(int q=1 ; q<=4 ; q++) {
+ /*
+ //此部分可以簡化//
+ */
+ //如果標號q內的內容為無值的話
+ if(itemPorts[q]==null){
+ //確認是否要在單字群組裡隨機選取
+ if (checks[type]) {
+ //##以rndNum選擇一個單字,直到符合為止
+ do{
+ if(rndNum < tarGroup.size()-1)
+ rndNum++;
+ else
+ rndNum=0;
+ //單字群組中從取得該單字
+ selected = tarGroup.get(rndNum);
+ //取得該單字的訊息
+ selectedWordInfo = MainActivity.ALL_WORDS.get(selected);
+ //最後確認所選的單字有沒有該詞性 *並且 確認所選單字並不與目標單字相符
+ }while(selectedWordInfo[type]==null || selectedWordInfo[type].equals(itemPorts[ans]));
+ itemPorts[q] = selectedWordInfo[type]; //將亂數所選到的英文單字的指定詞性的內容放入位於 q 號的項目插槽裡
+ } else { //從所有單字裡隨機選取
+ //##以rndNum選擇一個單字,直到符合為止
+ do{
+ rndNum++;
+ if(rndNum >= MainActivity.ALL_WORDS.size())
+ rndNum=0;
+ //單字群組中從取得該單字
+ selected = MainActivity.WORDS.get(rndNum);
+ //取得該單字的訊息
+ selectedWordInfo = MainActivity.ALL_WORDS.get(selected);
+ //最後確認所選的單字有沒有該詞性 *並且 確認所選單字並不與目標單字相符
+ }while(selectedWordInfo[type]==null || selectedWordInfo[type].equals(itemPorts[ans]));
+ itemPorts[q] = selectedWordInfo[type]; //將亂數所選到的英文單字的指定詞性的內容放入位於 q 號的項目插槽裡
+ }
+ }
+ }
+ //將處理好的項目插槽(題目及選項)放入問題清單中
+ QuestionList.add(itemPorts);
+ }
+ }
+ //InitQuestionList -> 函式 - 回傳內容不重覆的隨機單字清單
+ ArrayList randomizeItems(ArrayList group){
+ ArrayList rndGroup = (ArrayList) group.clone(); //複製群組單字至rndGroup裡
+ //建立亂數產生器物件
+ Random rnd = new Random();
+ rnd.setSeed(rnd.nextInt(100));
+ //num表示由亂數所取得的整數數值; temp表示兩變數間交換內容時的暫存處
+ int num; String temp;
+ //##開始隨機排列內容:
+ //作用範圍一次一次地從最大住標處做到至住標1
+ //將所取的亂數放入num後,依num從rndGroup裡取出該英文單字後放入temp裡
+ //然後再將rndGroup裡住標num處的英文單字覆蓋為目前範圍的最後一個英文單字(也就是在住標 i 處的英文單字)
+ //最後將temp覆蓋至rndGroup裡的住標 i 處,就可完成兩變數內容交換的動作了。
+ //##以上為不重複隨機排列集合內容的方法
+ for(int i = rndGroup.size()-1;i>0;i--) {
+ num = rnd.nextInt(i + 1);
+ temp = rndGroup.get(num);
+ rndGroup.set(num, rndGroup.get(i));
+ rndGroup.set(i, temp);
+ }
+ return rndGroup;
+ }
+
+ //當btnSelection1按鈕物件按下後
+ public void btnSelection1_Click(View view) {if(delay==0){answerResult(AnswerList.get(Q)==1); UserAnswerList.add(1);}}
+ //當btnSelection2按鈕物件按下後
+ public void btnSelection2_Click(View view) {if(delay==0){answerResult(AnswerList.get(Q)==2); UserAnswerList.add(2);}}
+ //當btnSelection3按鈕物件按下後
+ public void btnSelection3_Click(View view) {if(delay==0){answerResult(AnswerList.get(Q)==3); UserAnswerList.add(3);}}
+ //當btnSelection4按鈕物件按下後
+ public void btnSelection4_Click(View view) {if(delay==0){answerResult(AnswerList.get(Q)==4); UserAnswerList.add(4);}}
+
+ //程序 - 使用者答錯或答對時的系統反應
+ void answerResult(boolean isRight){
+ rights += isRight ? 1 : 0;
+ AnswerShows.setTitle(isRight ? "答對!" : "答錯!");
+ AnswerShows.setMessage("答案: " + QuestionList.get(Q)[AnswerList.get(Q)]);
+ AnswerShows.show();
+ mode = -1;
+ pgbCountdown1.setProgress(2000);
+ pgbCountdown1.setMax(2000);
+ timecount = 2000;
+ }
+
+ //當下層的頁面關閉時,也就是結果顯示頁面關閉時,回到此頁面後直接關閉
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ finish();
+ }
+
+ //攔截使用者所按下的按鍵 - 包含返回、家、視窗等等按鍵
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event){
+ if(keyCode == KeyEvent.KEYCODE_BACK){
+ if(backUpTimeCount==0){
+ backUpTimeCount=2000;
+ Toast.makeText(ActMultipleChoice.this, "再按一次即可離開測驗", Toast.LENGTH_SHORT).show();
+ }else{
+ finish();
+ }
+ return true;
+ }
+ return super.onKeyDown(keyCode, event);
+ }
+
+ //當此頁面要關閉的時候
+ @Override
+ public void onDestroy(){
+ countdownTimer.cancel();
+ countdownTimer.purge();
+ super.onDestroy();
+ }
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActAddingGroup.java b/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActAddingGroup.java
new file mode 100755
index 0000000..8ae4012
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActAddingGroup.java
@@ -0,0 +1,49 @@
+package com.example.leeyuanair.englishhelper.act_allwords;
+
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.EditText;
+
+import com.example.leeyuanair.englishhelper.R;
+
+public class ActAddingGroup extends AppCompatActivity {
+ //EditText
+ EditText txtNewGroupName;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_adding_group);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("建立新的群組");
+ //鏈結文字輸入方塊物件
+ txtNewGroupName = (EditText) findViewById(R.id.txtNewGroupName);
+ }
+
+ public void btnCancelNewGroup_Click(View view) {
+ Intent resent = new Intent();
+ resent.putExtra("NewGroupName", "$NONE");
+ setResult(0, resent);
+ finish();
+ }
+
+ public void btnAddNewGroupName_Click(View view) {
+ String groupName = txtNewGroupName.getText().toString();
+ if(groupName.length()==0 || groupName.equals("$NONE")){
+ AlertDialog.Builder ad = new AlertDialog.Builder(this);
+ ad.setTitle("無效的群組名稱");
+ ad.setMessage("群組名稱不可為空白或\"$NONE\"\n請重新輸入");
+ ad.setPositiveButton("OK", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {}});
+ ad.show();
+ }else{
+ Intent resent = new Intent();
+ resent.putExtra("NewGroupName", txtNewGroupName.getText().toString());
+ setResult(0, resent);
+ finish();
+ }
+ }
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActAllVoca.java b/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActAllVoca.java
new file mode 100755
index 0000000..5cba855
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActAllVoca.java
@@ -0,0 +1,55 @@
+package com.example.leeyuanair.englishhelper.act_allwords;
+
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.Button;
+import android.widget.ListView;
+
+import com.example.leeyuanair.englishhelper.ActSearchWord;
+import com.example.leeyuanair.englishhelper.R;
+
+public class ActAllVoca extends AppCompatActivity implements AdapterView.OnItemClickListener {
+ //Buttons
+ Button btnBackUp;
+ //ListView
+ ListView lstWords;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_all_voca);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("單字列表");
+ //從Intent中解析Bundle
+ Bundle msg = getIntent().getExtras();
+ //連結按鈕物件
+ btnBackUp = (Button) findViewById(R.id.btnBackUp);
+ //鏈結清單物件
+ lstWords = (ListView) findViewById(R.id.lstWords);
+ lstWords.setOnItemClickListener(this);
+ }
+ //返回上一層
+ public void btnBackUp_Click(View view) {finish();}
+
+ @Override
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ Object SelItem = parent.getItemAtPosition(position);
+ Intent theIntent = new Intent(this,ActPieceVoca.class);
+ theIntent.putExtra("SelectedItem",SelItem.toString());
+ startActivity(theIntent);
+ }
+
+ public void btnFinder_Click(View view) {
+ Intent theIntent = new Intent(this, ActSearchWord.class);
+ theIntent.putExtra("isAddingMode", false);
+ startActivity(theIntent);
+ }
+
+ public void btnGrouping_Click(View view) {
+ Intent theIntent = new Intent(this,ActGrouping.class);
+ startActivity(theIntent);
+ }
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActEditingGroup.java b/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActEditingGroup.java
new file mode 100755
index 0000000..f791789
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActEditingGroup.java
@@ -0,0 +1,124 @@
+package com.example.leeyuanair.englishhelper.act_allwords;
+
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+import android.widget.Toast;
+
+import com.example.leeyuanair.englishhelper.ActSearchWord;
+import com.example.leeyuanair.englishhelper.MainActivity;
+import com.example.leeyuanair.englishhelper.R;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+public class ActEditingGroup extends AppCompatActivity implements ListView.OnItemClickListener {
+ //Valuable
+ String groupName; //群組名稱
+ ArrayList groupArray; //指定群組中的所有單字
+ ArrayAdapter arrayAdapter;
+ ArrayList Selections;
+ //ListView清單物件
+ ListView lstGroupWords;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_editing_group);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ //鏈結清單物件
+ lstGroupWords = (ListView) findViewById(R.id.lstGroupWords);
+ lstGroupWords.setOnItemClickListener(this);
+ //初始化變數//
+ Selections = new ArrayList<>();
+ //讀取上一層所給的資料
+ groupName = getIntent().getExtras().getString("groupName");
+ setTitle("群組\"" + groupName + "\"內的所有單字");
+ groupArray = MainActivity.GROUPS.get(groupName);
+ if(groupArray.get(0).equals("0"))
+ groupArray.remove(0);
+ arrayAdapter = new ArrayAdapter(this, android.R.layout.simple_list_item_multiple_choice, groupArray);
+ //將arrayAdapter鏈結至lstGroupWords
+ lstGroupWords.setAdapter(arrayAdapter);
+ }
+
+ //當【返回】按鈕按下時
+ public void btnBack4_Click(View view) {
+ Intent newIntent = new Intent();
+ if(groupArray.size()==0)
+ groupArray.add("0");
+ setResult(1, newIntent);
+ finish();
+ }
+
+ //當【新增單字】按鈕按下時
+ public void btnAddWord_Click(View view) {
+ Intent theIntent = new Intent(this, ActSearchWord.class);
+ theIntent.putExtra("isAddingMode", true);
+ startActivityForResult(theIntent, 0);
+ }
+ //當【刪除單字】按鈕按下時
+ public void btnRemoveWord_Click(View view) {
+ if(!Selections.isEmpty()) {
+ try {
+ Collections.sort(Selections);
+ for (int i = 0; i < arrayAdapter.getCount(); i++)
+ lstGroupWords.setItemChecked(i, false);
+ for (int i = Selections.size() - 1; i >= 0; i--)
+ groupArray.remove((int) Selections.get(i));
+ Selections.clear();
+ arrayAdapter.notifyDataSetChanged();
+ } catch (Exception ex) {
+ Toast.makeText(ActEditingGroup.this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ }else{
+ Toast.makeText(ActEditingGroup.this, "請選擇欲刪除的單字", Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ //當下一層頁面關閉後
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ if(resultCode==0){
+ ArrayList Addition = (ArrayList) data.getExtras().get("Addition");
+ for(String item : Addition){
+ if(!groupArray.contains(item)){
+ groupArray.add(item);
+ }
+ }
+ Collections.sort(groupArray);
+ arrayAdapter.notifyDataSetChanged();
+ }
+ }
+
+ //當使用者按下清單裡某一項時
+ @Override
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ try{
+ if(Selections.contains(position))
+ Selections.remove(Selections.indexOf(position));
+ else
+ Selections.add(position);
+ }catch (Exception ex){
+ Toast.makeText(ActEditingGroup.this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ //攔截使用者所按下的按鍵 - 包含返回、家、視窗等等按鍵
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event){
+ if(keyCode == KeyEvent.KEYCODE_BACK){
+ Intent newIntent = new Intent();
+ if(groupArray.size()==0)
+ groupArray.add("0");
+ setResult(1, newIntent);
+ finish();
+ }
+ return super.onKeyDown(keyCode, event);
+ }
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActGrouping.java b/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActGrouping.java
new file mode 100755
index 0000000..bfbe32f
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActGrouping.java
@@ -0,0 +1,170 @@
+package com.example.leeyuanair.englishhelper.act_allwords;
+
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+import android.widget.Toast;
+
+import com.example.leeyuanair.englishhelper.MainActivity;
+import com.example.leeyuanair.englishhelper.R;
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Set;
+
+public class ActGrouping extends AppCompatActivity {
+ //變數
+ HashMap> groups;
+ //ArrayList groups; //紀錄所有Groups的名稱
+ ArrayAdapter arrayAdapter;
+ int grpCount;
+ int SelPosition;
+ //ListView
+ ListView lstGroups;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_grouping);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("單字群組");
+ //初始化變數
+ groups = new HashMap<>();
+ arrayAdapter = new ArrayAdapter(this, android.R.layout.simple_list_item_single_choice, MainActivity.GROUP_NAMES);
+ SelPosition = -1;
+ //鏈結清單元件
+ lstGroups = (ListView) findViewById(R.id.lstGroups);
+ lstGroups.setAdapter(arrayAdapter);
+ lstGroups.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
+ }
+
+ //當【返回】按鈕按下 - 返回上一層
+ public void btnBack3_Click(View view) {
+ try {
+ OutputStream os = new FileOutputStream(getFilesDir() + "/groups.txt", false); //false -> 複寫檔案
+ String saves = String.valueOf(MainActivity.groupCount);
+ //束整資料 - 將資料轉換成字串的形式並儲存
+ for(String key : MainActivity.GROUP_NAMES){
+ saves += "\r\n" + key + "\r\n" + WordsArrayList2String(MainActivity.GROUPS.get(key));
+ }
+ //將資料寫入
+ os.write(saves.getBytes());
+ os.close();
+ }catch(Exception ex){
+ Toast.makeText(this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ finish();
+ }
+ String WordsArrayList2String(ArrayList words){
+ String returns = words.get(0);
+ for(int i=1;i-1){
+ //生成一個對話方塊來再次確認是否刪除
+ AlertDialog.Builder ad = new AlertDialog.Builder(this);
+ //設定對話方塊的標題為"確認刪除"
+ ad.setTitle("確認刪除");
+ //設定對話方塊的內容為"確定要刪除群組"[群組名稱]"?"
+ ad.setMessage("確定要刪除群組\"" + lstGroups.getItemAtPosition(lstGroups.getCheckedItemPosition()) + "\"?");
+ //設定當使用者按下對話方塊的正回應按鍵,也就是按下"確定"按鈕時的事件。
+ //若使用者按下【確定】,以指定所選的項目,把groups裡的群組名稱與群組內容、arrayAdapter裡的群組名稱刪除。
+ ad.setPositiveButton("確定", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ try {
+ MainActivity.GROUPS.remove(groupName);
+ MainActivity.GROUP_NAMES.remove(index);
+ MainActivity.groupCount--;
+ arrayAdapter.notifyDataSetChanged();
+ lstGroups.setSelection(-1);
+ } catch (Exception ex) {
+ Toast.makeText(ActGrouping.this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ }
+ });
+ //設定當使用者按下對話方塊的負回應按鍵,也就是按下"取消"按鈕時的事件。
+ ad.setNegativeButton("取消", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {}});
+ //顯示對話方塊
+ ad.show();
+ }
+ }catch (Exception ex){
+ if(ex.getClass().getSimpleName().equals("NullPointerException"))
+ Toast.makeText(this, "請選擇欲刪除的群組", Toast.LENGTH_SHORT).show();
+ else
+ Toast.makeText(ActGrouping.this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ //當【編輯群組單字】按鈕按下
+ public void btnViewGroupWords_Click(View view) {
+ try{
+ String groupName = lstGroups.getItemAtPosition(lstGroups.getCheckedItemPosition()).toString();
+ Intent theIntent = new Intent(this, ActEditingGroup.class);
+ theIntent.putExtra("groupName", groupName);
+ startActivityForResult(theIntent, 1);
+ }catch(Exception ex){
+ if(ex.getClass().getSimpleName().equals("NullPointerException"))
+ Toast.makeText(this, "請選擇欲編輯的群組", Toast.LENGTH_SHORT).show();
+ else
+ Toast.makeText(ActGrouping.this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ //當下一層的版面關閉後
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ switch (resultCode){
+ case 0:
+ String theName = data.getStringExtra("NewGroupName");
+ if(!theName.equals("$NONE")){
+ try{
+ ArrayList newArrayList = new ArrayList<>(); newArrayList.add("0");
+ MainActivity.GROUPS.put(theName, newArrayList);
+ MainActivity.GROUP_NAMES.add(theName);
+ MainActivity.groupCount++;
+ arrayAdapter.notifyDataSetChanged();
+ }catch(Exception ex) {
+ Toast.makeText(this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ }
+ break;
+ case 1:
+ //ArrayList groupArray = (ArrayList) data.getExtras().get("groupArray");
+ //String groupName = data.getExtras().getString("groupName");
+ //groups.put(groupName, groupArray);
+ break;
+ }
+ }
+
+ //Keeps
+ void keeps(){
+
+ }
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActPieceVoca.java b/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActPieceVoca.java
new file mode 100755
index 0000000..d83784b
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActPieceVoca.java
@@ -0,0 +1,92 @@
+package com.example.leeyuanair.englishhelper.act_allwords;
+
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.res.AssetManager;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.ListView;
+import android.widget.Toast;
+
+import com.example.leeyuanair.englishhelper.R;
+import com.example.leeyuanair.englishhelper.access.WordInfo;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+
+public class ActPieceVoca extends AppCompatActivity implements AdapterView.OnItemClickListener {
+ ArrayList WordsList;
+ ArrayAdapter arrayAdapter;
+ //WordsData
+ WordInfo[] words;
+ //Button
+ Button btnBack;
+ //ListView
+ ListView lstWords;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_piece_voca);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ //從Intent中解析Bundle
+ Bundle msg = getIntent().getExtras();
+ //鏈結按鈕物件
+ btnBack = (Button) findViewById(R.id.btnBack1);
+ //鏈結清單物件
+ lstWords = (ListView) findViewById(R.id.lstWords1);
+ lstWords.setOnItemClickListener(this);
+ //設定基本清單數值
+ WordsList = new ArrayList();
+ arrayAdapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1,WordsList);
+ //取得於畫面ActAllVaco的lstWords裡所選擇項目,並依照該值取得相符的自首單字。
+ String SelectedLetter = msg.getString("SelectedItem");
+ readAppointedVoca(SelectedLetter);
+ setTitle("字首為\""+SelectedLetter+"\"的所有單字");
+ }
+
+ //程序: 讀取指定字首的單字,並設定至ListView。
+ protected void readAppointedVoca(String letter){
+ AssetManager as = getAssets();
+ try{
+ InputStream is = as.open("Words.txt");
+ byte[] data = new byte[is.available()];
+ is.read(data); is.close();
+ WordsList.addAll(getAppointedVoca(new String(data),letter.toLowerCase()));
+ arrayAdapter.notifyDataSetChanged();
+ lstWords.setAdapter(arrayAdapter);
+ }catch(Exception ex){
+ Toast.makeText(this,ex.toString(),Toast.LENGTH_SHORT).show();
+ }
+ }
+ //函式: 取得指定字首的字(解析字串),並回傳所選到的字。
+ protected ArrayList getAppointedVoca(String data,String targe){
+ ArrayList returns = new ArrayList();
+ String[] info = (data.replace("\r","")).split("\n");
+ String[] spis;
+ for(int i = 1; i parent, View view, int position, long id) {
+ Object SelItem = parent.getItemAtPosition(position);
+ Intent theIntent = new Intent(this,ActWordInfo.class);
+ theIntent.putExtra("SelectedWord", SelItem.toString());
+ theIntent.putExtra("isAddingMode", false);
+ //theIntent.putExtra("WordsData",words);
+ startActivity(theIntent);
+ }
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActWordInfo.java b/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActWordInfo.java
new file mode 100755
index 0000000..bfc54b0
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/act_allwords/ActWordInfo.java
@@ -0,0 +1,122 @@
+package com.example.leeyuanair.englishhelper.act_allwords;
+
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.res.AssetManager;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.view.ViewGroup.LayoutParams;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.example.leeyuanair.englishhelper.MainActivity;
+import com.example.leeyuanair.englishhelper.R;
+
+import java.io.InputStream;
+
+public class ActWordInfo extends AppCompatActivity {
+ //Global Variables
+ boolean isAddingMode;
+ String isAdd;
+ //LinearLayout直式排版元件
+ LinearLayout linNoun, linAdjective, linVerb, linAdverb, linPreposition;
+ //TextView文字標籤元件
+ TextView lblWordTitle, lblNoun, lblAdjective, lblVerb, lblAdverb, lblPreposition;
+ //Button按鈕元件
+ Button btnAdd2Addition;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_word_info);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ //取得傳遞的訊息
+ Bundle msg = getIntent().getExtras();
+ //鏈結橫列表格物件
+ linNoun = (LinearLayout) findViewById(R.id.linNoun);
+ linAdjective = (LinearLayout) findViewById(R.id.linAdjective);
+ linVerb = (LinearLayout) findViewById(R.id.linVerb);
+ linAdverb = (LinearLayout) findViewById(R.id.linAdverb);
+ linPreposition = (LinearLayout) findViewById(R.id.linPreposition);
+ //鏈結標籤物件
+ lblWordTitle = (TextView) findViewById(R.id.lblWordTitle);
+ lblNoun = (TextView) findViewById(R.id.lblNoun);
+ lblAdjective = (TextView) findViewById(R.id.lblAdjective);
+ lblVerb = (TextView) findViewById(R.id.lblVerb);
+ lblAdverb = (TextView) findViewById(R.id.lblAdverb);
+ lblPreposition = (TextView) findViewById(R.id.lblPreposition);
+ //鏈結按鈕物件
+ btnAdd2Addition = (Button) findViewById(R.id.btnAdd2Addition);
+ //判斷是否有選擇單字的功能
+ isAddingMode = (boolean) msg.get("isAddingMode");
+ LayoutParams btnLayout = btnAdd2Addition.getLayoutParams();
+ btnLayout.height = isAddingMode ? btnLayout.height : 0;
+ btnAdd2Addition.setLayoutParams(btnLayout);
+ btnAdd2Addition.setEnabled(isAddingMode);
+ //初始化是否新增該單字的暫存,原設為無值null
+ isAdd = null;
+ //取得所選單字
+ String SelectedWord = msg.getString("SelectedWord");
+ setTitle("單字\""+SelectedWord+"\"的詞性、字義");
+ //取得該單字的詞性與字義
+ try{
+ lblWordTitle.setText(SelectedWord);
+ String[] pOS = MainActivity.ALL_WORDS.get(SelectedWord);
+ lblNoun.setText((pOS[0]!=null && !pOS[0].equals("")) ? pOS[0] : "");
+ lblAdjective.setText((pOS[1]!=null && !pOS[1].equals("")) ? pOS[1] : "");
+ lblVerb.setText((pOS[2]!=null && !pOS[2].equals("")) ? pOS[2] : "");
+ lblAdverb.setText((pOS[3]!=null && !pOS[3].equals("")) ? pOS[3] : "");
+ lblPreposition.setText((pOS[4]!=null && !pOS[4].equals("")) ? pOS[4] : "");
+ //找到使用者所選的單字時,解析該訊息並顯示詞性、字義
+ hideLayout(lblNoun.getText().equals(""), linNoun);
+ hideLayout(lblAdjective.getText().equals(""),linAdjective);
+ hideLayout(lblVerb.getText().equals(""),linVerb);
+ hideLayout(lblAdverb.getText().equals(""),linAdverb);
+ hideLayout(lblPreposition.getText().equals(""),linPreposition);
+ }catch(Exception ex) {
+ Toast.makeText(this,"找不到該單字!",Toast.LENGTH_SHORT).show();
+ }
+ }
+ //影藏Layout的判斷函式
+ public void hideLayout(boolean compare,LinearLayout ly){
+ if(compare){
+ ViewGroup.LayoutParams lay = ly.getLayoutParams();
+ lay.height = 0;
+ ly.setLayoutParams(lay);
+ }
+ }
+
+ //返回上一層
+ public void btnBack2_onClick(View view) {
+ Intent theIntent = new Intent();
+ if(isAddingMode){
+ theIntent.putExtra("isAdd", isAdd);
+ }
+ setResult(isAddingMode ? 0 : -1, theIntent);
+ finish();
+ }
+
+ //標示使用者要增加此單字
+ public void btnAdd2Addition(View view) {
+ isAdd = lblWordTitle.getText().toString();
+ Toast.makeText(ActWordInfo.this, "已新增單字至群組", Toast.LENGTH_SHORT).show();
+ }
+
+ //攔截使用者所按下的按鍵 - 包含返回、家、視窗等等按鍵
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event){
+ if(keyCode == KeyEvent.KEYCODE_BACK){
+ Intent theIntent = new Intent();
+ if(isAddingMode){
+ theIntent.putExtra("isAdd", isAdd);
+ }
+ setResult(isAddingMode ? 0 : -1, theIntent);
+ finish();
+ }
+ return super.onKeyDown(keyCode, event);
+ }
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/act_memory/ActMemoryPractice.java b/app/src/main/java/com/example/leeyuanair/englishhelper/act_memory/ActMemoryPractice.java
new file mode 100755
index 0000000..ce05487
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/act_memory/ActMemoryPractice.java
@@ -0,0 +1,392 @@
+package com.example.leeyuanair.englishhelper.act_memory;
+
+import android.app.AlertDialog;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.example.leeyuanair.englishhelper.MainActivity;
+import com.example.leeyuanair.englishhelper.R;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.Random;
+import java.util.Timer;
+import java.util.TimerTask;
+
+public class ActMemoryPractice extends AppCompatActivity {
+ //##Global Variable
+ boolean mode; //練習模式: false表示有限題數, true表示練習至了解為止
+ int groupIndex; //使用者所選的群組單字的序號
+ int maxQ, Q; //表示指定的練習題數 與 目前題數
+ int timelimit; //每題所限制的回答時間(毫秒)
+ int timecount; //目前的計時
+ int delay; //延遲次數(每次1秒)
+ int width; //表示加上timecount的幅度,功能是與timecount相加
+ int backUpTimeCount; //退出練習的確認時間
+ ArrayList QuestionList; //題目清單
+ LinkedHashMap WrongsList; //「NO」清單,記錄下所有不了解的單字的次數
+ HashSet QuickWrongsList; //與「NO」清單類似,只不過此清單只有在「練習至了解所有單字為止」時的模式才會用到
+ //TextView文字標籤物件
+ TextView lblMemoryStatus, lblQuestion1, lblMemoryHint;
+ //ProgressBar進度顯示物件
+ ProgressBar pgbCountdown2;
+ //Timer計時器
+ Timer countDownTimer;
+ //AlertDialog對話框物件
+ AlertDialog answerShows;
+ //Random亂數產生器
+ Random rnd;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_memory_practice);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("記憶練習");
+ //連結文字標籤物件
+ lblMemoryStatus = (TextView) findViewById(R.id.lblMemoryStatus);
+ lblQuestion1 = (TextView) findViewById(R.id.lblQuestion1);
+ lblMemoryHint = (TextView) findViewById(R.id.lblMemoryHint);
+ //連結進度顯示物件
+ pgbCountdown2 = (ProgressBar) findViewById(R.id.pgbCountdown2);
+ pgbCountdown2.setMax(1000);
+ //初始化對話方塊
+ answerShows = (new AlertDialog.Builder(this)).create();
+ answerShows.setCancelable(false);
+ //初始化NO清單
+ WrongsList = new LinkedHashMap<>();
+ //初始化亂數產生器
+ rnd = new Random();
+ //取得資料 & 初始化
+ Bundle msg = getIntent().getExtras();
+ mode = msg.getBoolean("mode");
+ timelimit = msg.getInt("timelimit");
+ groupIndex = msg.getInt("Selection");
+ //若模式為練習到了解為止..
+ if (mode) {
+ QuestionGenerator(1);
+ QuickWrongsList = new HashSet<>();
+ } else {
+ maxQ = msg.getInt("questions");
+ QuestionGenerator(maxQ);
+ }
+ Q = 0; //初始化題目計數
+ timecount = 0; //初始化計時
+ delay = 4; //初始化延遲次數
+ width = 1;
+ //初始化計時系統Timer
+ countDownTimer = new Timer();
+ countDownTimer.schedule(countDownTask, 0, 1);
+ }
+
+ //####題目生成器####
+ void QuestionGenerator(int questionAmount){
+ try {
+ ArrayList sourceGroup = ((groupIndex >= 0) ? MainActivity.GROUPS.get(MainActivity.GROUP_NAMES.get(groupIndex)) : MainActivity.WORDS);
+ QuestionList = new ArrayList();
+ for (int i = 1; i <= (questionAmount / sourceGroup.size()) + 1; i++)
+ QuestionList.addAll(RandomizeList(sourceGroup));
+ }catch(Exception ex){
+ Toast.makeText(ActMemoryPractice.this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ }
+ //函式 - 回傳新的已打亂過的清單內容
+ ArrayList RandomizeList(ArrayList list) {
+ ArrayList rndList = (ArrayList) list.clone();
+ try {
+ String temp;
+ int num;
+ //利用rnd亂數產生器打亂原本的排列
+ for (int i = rndList.size() - 1; i >= 0; i--) {
+ num = rnd.nextInt(i + 1);
+ temp = rndList.get(num);
+ rndList.set(num, rndList.get(i));
+ rndList.set(i, temp);
+ }
+ } catch (Exception ex) {
+ Toast.makeText(ActMemoryPractice.this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ return rndList;
+ }
+ //####快速題目生產器####
+ void RapidQuestionGenerator(String word ,int value){
+ if(!QuestionList.contains(word)){
+ ArrayList sourceGroup = ((groupIndex>=0) ? MainActivity.GROUPS.get(MainActivity.GROUP_NAMES.get(groupIndex)) : MainActivity.WORDS);
+ ArrayList rndList = new ArrayList<>(RandomizeList(sourceGroup));
+ //若使用者所選的單字群組的單字量小於10: 為了避免在隨機選取的次數上發生問題,也就是隨機排列後的群組單字量不夠,這裡再增加一組的隨機的單字量
+ if(sourceGroup.size()<10)
+ rndList.addAll(RandomizeList(sourceGroup));
+ for(int i=0;i WrongsList;
+ Object[] WrongsWordsArray;
+ ArrayAdapter WrongsAdapter;
+ //TextView文字標籤物件
+ TextView lblQuestionAmount2;
+ TextView lblNotUnderstandText1;
+ //ListView清單物件
+ ListView lstNotUnderstandList;
+ //AlertDialog對話框物件
+ AlertDialog.Builder msgBox;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_memory_result);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("記憶練習 - 練習結果");
+ try {
+ //連結文字標籤物件
+ lblQuestionAmount2 = (TextView) findViewById(R.id.lblQuestionAmount2);
+ lblNotUnderstandText1 = (TextView) findViewById(R.id.lblNotUnderstandText1);
+ //連結清單物件
+ lstNotUnderstandList = (ListView) findViewById(R.id.lstNotUnderstandList);
+ lstNotUnderstandList.setOnItemClickListener(this);
+ //初始化對話框物件
+ msgBox = new AlertDialog.Builder(this);
+ msgBox.setTitle("單字訊息");
+ msgBox.setPositiveButton("OK", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ }
+ });
+ //取得結果資料
+ Bundle msg = getIntent().getExtras();
+ questions = msg.getInt("questions");
+ lblQuestionAmount2.setText(String.valueOf(questions));
+ WrongsList = (HashMap) msg.get("WrongsList");
+ //初始化清單物件變數
+ if(WrongsList.isEmpty()){
+ lblNotUnderstandText1.setText("Good Job! 你已經記起所有的單字了!");
+ }else{
+ WrongsAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1);
+ WrongsWordsArray = WrongsList.keySet().toArray();
+ for (Object word : WrongsWordsArray)
+ WrongsAdapter.add(word.toString() + " ,次數: " + WrongsList.get(word));
+ lstNotUnderstandList.setAdapter(WrongsAdapter);
+ }
+ }catch(Exception ex){
+ Toast.makeText(ActMemoryResult.this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ //當清單lstWrongsList某項目被按下時
+ @Override
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ String[] partOfSpeech = MainActivity.ALL_WORDS.get(WrongsWordsArray[position]);
+ msgBox.setMessage(WrongsWordsArray[position] +
+ ((partOfSpeech[0]!=null) ? "\r\n名詞(n.) "+partOfSpeech[0] : "") +
+ ((partOfSpeech[1]!=null) ? "\r\n形容詞(adj.) "+partOfSpeech[1] : "") +
+ ((partOfSpeech[2]!=null) ? "\r\n動詞(adj.) "+partOfSpeech[2] : "") +
+ ((partOfSpeech[3]!=null) ? "\r\n副詞(adj.) "+partOfSpeech[3] : "") +
+ ((partOfSpeech[4]!=null) ? "\r\n介係詞(adj.) "+partOfSpeech[4] : ""));
+ msgBox.show();
+ }
+
+ //當【返回至設定頁面】按鈕按下時
+ public void btnBack7_Click(View view) {finish();}
+
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/act_memory/ActMemorySetting.java b/app/src/main/java/com/example/leeyuanair/englishhelper/act_memory/ActMemorySetting.java
new file mode 100755
index 0000000..06dbcb0
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/act_memory/ActMemorySetting.java
@@ -0,0 +1,192 @@
+package com.example.leeyuanair.englishhelper.act_memory;
+
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.graphics.Color;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.RadioButton;
+import android.widget.SeekBar;
+import android.widget.TextView;
+
+import com.example.leeyuanair.englishhelper.MainActivity;
+import com.example.leeyuanair.englishhelper.R;
+
+import java.util.ArrayList;
+
+public class ActMemorySetting extends AppCompatActivity implements SeekBar.OnSeekBarChangeListener {
+ //Global Variable全域變數
+ boolean qualified; //表示所選群組是否符合最低要求(單字量>4)
+ int selection; //表示使用者所選擇的群組號
+ boolean soManyWordsNotice; // 若是用者在了解模式下選擇超過100個單字的單字群組時所判別是否要提醒使用者的變數
+ //Button按鈕物件
+ Button btnChangeGroup2;
+ //EditText文字編輯物件
+ EditText txtQAmount2;
+ //TextView文字標籤物件
+ TextView lblTimePerQ2;
+ TextView lblExtraMsg2;
+ //RadioButton單選按鈕物件
+ RadioButton rdoKeepPractice, rdoQuestions;
+ //SeekBar滑桿元件
+ SeekBar skbTimeSet2;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_memory_setting);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("記憶練習");
+ //連結按鈕物件
+ btnChangeGroup2 = (Button) findViewById(R.id.btnChangeGroup2);
+ //連結文字編輯物件
+ txtQAmount2 = (EditText) findViewById(R.id.txtQAmount2);
+ //連結文字標籤物驗
+ lblTimePerQ2 = (TextView) findViewById(R.id.lblTimePerQ2);
+ lblExtraMsg2 = (TextView) findViewById(R.id.lblExtraMsg2);
+ //連結單選按鈕物件
+ rdoKeepPractice = (RadioButton) findViewById(R.id.rdoKeepPractice);
+ rdoQuestions = (RadioButton) findViewById(R.id.rdoQuestions);
+ //連結華感物件
+ skbTimeSet2 = (SeekBar) findViewById(R.id.skbTimeSet2);
+ skbTimeSet2.setOnSeekBarChangeListener(this);
+ //初始化變數
+ qualified=true;
+ soManyWordsNotice = true;
+ selection=-1;
+ }
+
+ //當按鈕btnChangeGroup2 更換群組按鈕按下時
+ public void btnChangeGroup2_Click(View view) {
+ final ArrayAdapter groupNames = new ArrayAdapter(this,android.R.layout.simple_list_item_1);
+ groupNames.add("所有單字"); groupNames.addAll(MainActivity.GROUP_NAMES);
+ AlertDialog.Builder msgBox = new AlertDialog.Builder(this)
+ .setTitle("選擇群組")
+ .setAdapter(groupNames, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ btnChangeGroup2.setText(groupNames.getItem(which));
+ selection=which-1;
+ if(which>0){
+ ArrayList SelGroup = MainActivity.GROUPS.get(groupNames.getItem(which));
+ if(SelGroup.size()<4) {
+ lblExtraMsg2.setText("群組內的單字量必須大於4個才能開始練習!");
+ lblExtraMsg2.setTextColor(Color.RED);
+ soManyWordsNotice=false;
+ qualified = false;
+ }else if(SelGroup.size()>100){
+ if(rdoKeepPractice.isChecked())
+ lblExtraMsg2.setText("此單字群組的單字量大於100個,若要練習到完可能需要花較長的時間!");
+ else
+ lblExtraMsg2.setText("");
+ qualified=true;
+ soManyWordsNotice=true;
+ }else{
+ lblExtraMsg2.setText("");
+ qualified = true;
+ soManyWordsNotice=false;
+ }
+ }else{
+ if(rdoKeepPractice.isChecked())
+ lblExtraMsg2.setText("此單字群組的單字量大於100個,若要練習到完可能需要花較長的時間!");
+ soManyWordsNotice=true;
+ lblExtraMsg2.setText("");
+ qualified = true;
+ }
+ }
+ });
+ msgBox.show();
+ }
+
+ //當【-】按鈕按下時
+ public void btnSubtract2_Click(View view) {
+ int num = Integer.parseInt(txtQAmount2.getText().toString()) - 1;
+ txtQAmount2.setText(String.valueOf(num > 0 ? num : 1));
+ }
+
+ //當【+】按鈕按下時
+ public void btnAdd2_Click(View view) {
+ int num = Integer.parseInt(txtQAmount2.getText().toString()) + 1;
+ txtQAmount2.setText(String.valueOf(num < 10000 ? num : 9999));
+ }
+
+ //當【練習到每個單字了解為止】單選按鈕按下時
+ public void rdoKeepPractice_Click(View view) {
+ rdoKeepPractice.setChecked(true);
+ rdoQuestions.setChecked(false);
+ if(soManyWordsNotice)
+ lblExtraMsg2.setText("此單字群組的單字量大於100個,若要練習到完可能需要花較長的時間!");
+ }
+
+ //當【依指定題數練習】單選按鈕按下時
+ public void rdoQuestions_Click(View view) {
+ rdoKeepPractice.setChecked(false);
+ rdoQuestions.setChecked(true);
+ if(soManyWordsNotice)
+ lblExtraMsg2.setText("");
+ }
+
+ //當【返回】按鈕按下時
+ public void btnBack6_Click(View view) {
+ finish();
+ }
+
+ //當【說明】按鈕按下時
+ public void btnExplanation2_Click(View view) {
+ final AlertDialog.Builder adExp1, adExp2, adExp3;
+ adExp3 = new AlertDialog.Builder(this)
+ .setTitle("說明")
+ .setMessage("關於設定的部分,你可以選擇單字群組、設定題目數量與每題答題時間," +
+ "練習模式可以選擇「練習到每個了解為止」、「依指定題數練習」這兩種方式。" +
+ "完成設定之後就可以開始練習了!")
+ .setPositiveButton("OK", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {}});
+ adExp2 = new AlertDialog.Builder(this)
+ .setTitle("說明")
+ .setMessage("如果知道該單字的意思的話,按下YES按鈕表示了解;若不知道該單字的意思," +
+ "則按下NO表示不了解,每按一次NO系統就會記錄下一次。如果你所選的模式是練習到會為止," +
+ "則系統也會一直持續記錄到完成為止。(雖然如此,因為有限性的關係,所以至多系統也只會到9999題為止)")
+ .setPositiveButton("下一頁", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {adExp3.show();}});
+ adExp1 = new AlertDialog.Builder(this)
+ .setTitle("說明")
+ .setMessage("由於字義選擇的四選一題目可以透過辨識選項的方式來答題," +
+ "所以這可能無法完全檢視自己是否了解、熟悉該單字,因此,在記憶練習中除了會照常出題之外" +
+ "這裡將四選項改成了YES、NO按鈕。")
+ .setPositiveButton("下一頁", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {adExp2.show();}});
+ adExp1.show();
+ }
+
+ //當【開始練習】按鈕按下時
+ public void btnStartTest2_Click(View view) {
+ if (qualified) {
+ Intent it = new Intent(this, ActMemoryPractice.class);
+ it.putExtra("Selection", selection);
+ it.putExtra("mode", rdoKeepPractice.isChecked());
+ if (rdoQuestions.isChecked())
+ it.putExtra("questions", Integer.parseInt(txtQAmount2.getText().toString()));
+ it.putExtra("timelimit", skbTimeSet2.getProgress() * 1000);
+ startActivity(it);
+ }
+
+ }
+
+ //##SeekBar滑桿物件的事件處理副程式##
+ //當滑桿滑動時
+ @Override
+ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+ if(progress>0)
+ lblTimePerQ2.setText("每題答題時間: "+progress+"秒");
+ else
+ lblTimePerQ2.setText("每題答題時間: 無限制");
+ }
+
+ @Override
+ public void onStartTrackingTouch(SeekBar seekBar) {}
+ @Override
+ public void onStopTrackingTouch(SeekBar seekBar) {}
+ //#####################################
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/act_spelling/ActSpellingExamine.java b/app/src/main/java/com/example/leeyuanair/englishhelper/act_spelling/ActSpellingExamine.java
new file mode 100755
index 0000000..a3afe1a
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/act_spelling/ActSpellingExamine.java
@@ -0,0 +1,215 @@
+package com.example.leeyuanair.englishhelper.act_spelling;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.EditText;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.example.leeyuanair.englishhelper.MainActivity;
+import com.example.leeyuanair.englishhelper.R;
+
+import java.util.ArrayList;
+import java.util.Random;
+
+public class ActSpellingExamine extends AppCompatActivity {
+ //Global Variables
+ int groupIndex; //所選的單字群組的編號
+ int maxQ, Q; //總題數, 目前題號
+ boolean prefix, suffix; //是否啟用字首、字尾提示
+ int rights; //答對題數
+ ArrayList QuestionList; //題目清單
+ ArrayList UserAnswerList; //使用者的回答清單
+ //LinearLayout直線型排版容器
+ LinearLayout[] linPartOfSpeech;
+ //TextView文字標籤元件
+ TextView[] lblPartOfSpeech;
+ TextView lblSpellingStatus1;
+ TextView lblSpellingStatus2;
+ TextView lblQuestionMessage;
+ //EditText文字編輯元件
+ EditText txtAnswerBar;
+ //AlertDialog對話框物件
+ AlertDialog.Builder response;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_spelling_examine);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("拼字測驗");
+ //##連結直線型排版容器 並 初始化陣列
+ try {
+ linPartOfSpeech = new LinearLayout[5];
+ linPartOfSpeech[0] = (LinearLayout) findViewById(R.id.linQNoun);
+ linPartOfSpeech[1] = (LinearLayout) findViewById(R.id.linQAdjective);
+ linPartOfSpeech[2] = (LinearLayout) findViewById(R.id.linQVerb);
+ linPartOfSpeech[3] = (LinearLayout) findViewById(R.id.linQAdverb);
+ linPartOfSpeech[4] = (LinearLayout) findViewById(R.id.linQPreposition);
+ //##連結文字標籤元件 並 初始化陣列
+ lblPartOfSpeech = new TextView[5];
+ lblPartOfSpeech[0] = (TextView) findViewById(R.id.lblQNoun);
+ lblPartOfSpeech[1] = (TextView) findViewById(R.id.lblQAdjective);
+ lblPartOfSpeech[2] = (TextView) findViewById(R.id.lblQVerb);
+ lblPartOfSpeech[3] = (TextView) findViewById(R.id.lblQAdverb);
+ lblPartOfSpeech[4] = (TextView) findViewById(R.id.lblQPreposition);
+ lblSpellingStatus1 = (TextView) findViewById(R.id.lblSpellingStatus1);
+ lblSpellingStatus2 = (TextView) findViewById(R.id.lblSpellingStatus2);
+ lblQuestionMessage = (TextView) findViewById(R.id.lblQuestionMessage);
+ //##連結文字編輯元件
+ txtAnswerBar = (EditText) findViewById(R.id.txtAnswerBar);
+ //##初始化對話框
+ response = new AlertDialog.Builder(this);
+ response.setCancelable(false);
+ response.setPositiveButton("OK", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {}});
+ //取得資料
+ Bundle msg = getIntent().getExtras();
+ groupIndex = msg.getInt("selection");
+ maxQ = msg.getInt("questions");
+ prefix = msg.getBoolean("prefix");
+ suffix = msg.getBoolean("suffix");
+ //建立題目清單
+ QuestionGenerator();
+ //初始化
+ UserAnswerList = new ArrayList<>();
+ Q = 0;
+ rights = 0;
+ lblSpellingStatus1.setText("總題目: " + maxQ + ", 目前題號: 1");
+ AnaliysisQuestion();
+ //預備的對話框
+ AlertDialog.Builder msgBox = new AlertDialog.Builder(this)
+ .setTitle("預備")
+ .setMessage("若輸入文字時會出現提示字的話,建議先關閉此項功能!" +
+ "按下「Start」即可開始測驗。")
+ .setCancelable(false)
+ .setPositiveButton("Start", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ }
+ });
+ msgBox.show();
+ }catch(Exception ex){
+ Toast.makeText(ActSpellingExamine.this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ //程序 - 題目生成器
+ void QuestionGenerator(){
+ QuestionList = new ArrayList<>();
+ ArrayList sourceGroup = (groupIndex>=0) ? MainActivity.GROUPS.get(MainActivity.GROUP_NAMES.get(groupIndex)) : MainActivity.WORDS;
+ for(int i=1;i<=(maxQ/sourceGroup.size())+1;i++)
+ QuestionList.addAll(randomizeGroup(sourceGroup));
+ }
+ //題目生成器 -> 函式 - 回傳打亂過的新的清單
+ ArrayList randomizeGroup(ArrayList sourceGroup){
+ ArrayList rndList = (ArrayList) sourceGroup.clone();
+ Random rnd = new Random(); rnd.setSeed(rnd.nextInt(100));
+ String temp; int num;
+ for(int i=rndList.size()-1;i>0;i--){
+ num = rnd.nextInt(i+1);
+ temp = rndList.get(num);
+ rndList.set(num, rndList.get(i));
+ rndList.set(i, temp);
+ }
+ return rndList;
+ }
+
+ //程序 - 解析題目中的單字
+ void AnaliysisQuestion(){
+ String word = QuestionList.get(Q);
+ String[] partOfSpeech = MainActivity.ALL_WORDS.get(word);
+ for(int i=0;i<5;i++){
+ if(partOfSpeech[i]!=null){
+ ViewGroup.LayoutParams lay = linPartOfSpeech[i].getLayoutParams();
+ lay.height=180;
+ linPartOfSpeech[i].setLayoutParams(lay);
+ lblPartOfSpeech[i].setText(partOfSpeech[i]);
+ }else{
+ ViewGroup.LayoutParams lay = linPartOfSpeech[i].getLayoutParams();
+ lay.height=0;
+ linPartOfSpeech[i].setLayoutParams(lay);
+ }
+ }
+ lblQuestionMessage.setText("#此單字長度為"+word.length()+",有以下詞性意義:");
+ //依條件來生成提示
+ txtAnswerBar.setHint((prefix ? word.charAt(0) : "_")+"_____________"+((suffix && word.length()>4) ? word.charAt(word.length()-1) : "_"));
+ }
+
+ //當【提交答案】按鈕按下時
+ public void btnAnswerIt_Click(View view) {
+ // 隱藏螢幕鍵盤
+ InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
+ imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
+ try {
+ //將使用者的答案增加至UserAnswerList中
+ UserAnswerList.add(txtAnswerBar.getText().toString().trim());
+ if (QuestionList.get(Q).equals(UserAnswerList.get(Q))) {
+ rights++;
+ response.setTitle("答案正確!");
+ response.setMessage(QuestionList.get(Q));
+ } else {
+ response.setTitle("答案錯誤!");
+ response.setMessage("正確答案: " + QuestionList.get(Q) +
+ "\r\n你的答案: " + UserAnswerList.get(Q));
+ }
+ //題目序號+1
+ Q++;
+ //如果還有題目的話
+ if (Q < maxQ) {
+ //更新題目
+ AnaliysisQuestion();
+ txtAnswerBar.setText("");
+ //更新狀態
+ lblSpellingStatus2.setText("總題目: " + maxQ + ", 目前題號: " + (Q + 1));
+ lblSpellingStatus1.setText("答對題數: " + rights + ", 答錯題數: " + (Q - rights));
+ } else {
+ response.setPositiveButton("測驗完成", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ Intent it = new Intent(ActSpellingExamine.this, ActSpellingResult.class);
+ it.putExtra("maxQ", maxQ);
+ it.putExtra("rights", rights);
+ it.putExtra("QuestionList", QuestionList);
+ it.putExtra("UserAnswerList", UserAnswerList);
+ startActivityForResult(it, 0);
+ }
+ });
+ }
+ response.show();
+ }catch(Exception ex){
+ Toast.makeText(ActSpellingExamine.this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ //當下一層的頁面關閉時
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ finish();
+ }
+
+ //攔截使用者所按下的按鍵 - 包含返回、家、視窗等等按鍵
+ @Override
+ public boolean onKeyDown(int keyCode, KeyEvent event){
+ if(keyCode == KeyEvent.KEYCODE_BACK){
+ AlertDialog.Builder checker = new AlertDialog.Builder(this)
+ .setTitle("確定離開測驗?")
+ .setMessage("若中途離開此測驗將看不到所測的結果。")
+ .setPositiveButton("Yes", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {finish();}})
+ .setNegativeButton("No", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {}});
+ checker.show();
+ return true;
+ }
+ return super.onKeyDown(keyCode, event);
+ }
+
+
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/act_spelling/ActSpellingResult.java b/app/src/main/java/com/example/leeyuanair/englishhelper/act_spelling/ActSpellingResult.java
new file mode 100755
index 0000000..14c0fae
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/act_spelling/ActSpellingResult.java
@@ -0,0 +1,80 @@
+package com.example.leeyuanair.englishhelper.act_spelling;
+
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.pm.ActivityInfo;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.example.leeyuanair.englishhelper.MainActivity;
+import com.example.leeyuanair.englishhelper.R;
+
+import java.util.ArrayList;
+
+public class ActSpellingResult extends AppCompatActivity implements ListView.OnItemClickListener{
+ //Global Variables
+ ArrayList QuestionList;
+ ArrayList UserAnswerList;
+ //ListView清單元件
+ ListView lstAnswerLog2;
+ //AlertDialog對話框元件
+ AlertDialog.Builder msgBox;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_spelling_result);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("拼字測驗 - 測驗結果");
+ //##連結清單元件
+ lstAnswerLog2 = (ListView) findViewById(R.id.lstAnswerLog2);
+ lstAnswerLog2.setOnItemClickListener(this);
+ //##初始化對話框物件
+ msgBox = new AlertDialog.Builder(this)
+ .setPositiveButton("OK", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {}});
+ //##取得結果資料
+ Bundle msg = getIntent().getExtras();
+ //利用變數傳址的方法來立即地修改元件屬性
+ ((TextView) findViewById(R.id.lblQuestionAmount3)).setText(String.valueOf(msg.getInt("maxQ")));
+ ((TextView) findViewById(R.id.lblRights2)).setText(String.valueOf(msg.getInt("rights")));
+ ((TextView) findViewById(R.id.lblWrongs2)).setText(String.valueOf(msg.getInt("maxQ") - msg.getInt("rights")));
+ //取得問題清單 及 使用者回答結果
+ QuestionList = (ArrayList) msg.get("QuestionList");
+ UserAnswerList = (ArrayList) msg.get("UserAnswerList");
+ ArrayAdapter logAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1);
+ try {
+ for (int i = 0; i < UserAnswerList.size(); i++) {
+ logAdapter.add((QuestionList.get(i).equals(UserAnswerList.get(i)) ? "O " : "X ") +
+ (i + 1) + ". " + QuestionList.get(i));
+ }
+ lstAnswerLog2.setAdapter(logAdapter);
+ }catch(Exception ex){
+ Toast.makeText(ActSpellingResult.this, ex.toString(), Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ //當lstAnswerLog2內的清單項按下時
+ @Override
+ public void onItemClick(AdapterView> parent, View view, int position, long id) {
+ String word = QuestionList.get(position);
+ String[] partOfSpeech = MainActivity.ALL_WORDS.get(word);
+ boolean isRight = (word.equals(UserAnswerList.get(position)));
+ msgBox.setTitle(isRight ? "此題答對" : "此題答錯");
+ msgBox.setMessage("正確答案: "+word+(isRight ? "\r\n" : "\r\n你的答案: "+UserAnswerList.get(position)+"\r\n") +
+ (partOfSpeech[0]!=null ? "\r\n名詞(n.) "+partOfSpeech[0] : "") +
+ (partOfSpeech[1]!=null ? "\r\n形容詞(adj.) "+partOfSpeech[1] : "") +
+ (partOfSpeech[2]!=null ? "\r\n動詞(v.) "+partOfSpeech[2] : "") +
+ (partOfSpeech[3]!=null ? "\r\n副詞(adv.) "+partOfSpeech[3] : "") +
+ (partOfSpeech[4]!=null ? "\r\n介係詞(prep.) "+partOfSpeech[4] : ""));
+ msgBox.show();
+ }
+
+ //當【返回至設定頁面】按鈕按下時
+ public void btnBack9_Click(View view) {finish();}
+
+}
diff --git a/app/src/main/java/com/example/leeyuanair/englishhelper/act_spelling/ActSpellingSetting.java b/app/src/main/java/com/example/leeyuanair/englishhelper/act_spelling/ActSpellingSetting.java
new file mode 100755
index 0000000..9337b9c
--- /dev/null
+++ b/app/src/main/java/com/example/leeyuanair/englishhelper/act_spelling/ActSpellingSetting.java
@@ -0,0 +1,164 @@
+package com.example.leeyuanair.englishhelper.act_spelling;
+
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.graphics.Color;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.EditText;
+import android.widget.TextView;
+
+import com.example.leeyuanair.englishhelper.MainActivity;
+import com.example.leeyuanair.englishhelper.R;
+
+import java.util.ArrayList;
+
+public class ActSpellingSetting extends AppCompatActivity {
+ //Global Variables
+ int selection; //紀錄使用者所選擇的群組的編號
+ boolean qualified; //表示所選的單字群組是否符合基本要求(單字量大於4個)
+ //Button按鈕元件
+ Button btnChangeGroup3;
+ //TextView文字標籤元件
+ TextView lblExtraMsg3;
+ //EditText文字編輯元件
+ EditText txtQAmount3;
+ //CheckBox勾選元件
+ CheckBox chkPrefix, chkSuffix;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_act_spelling_setting);
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ setTitle("拼字測驗 - 測驗設定");
+ //連結按鈕元件
+ btnChangeGroup3 = (Button) findViewById(R.id.btnChangeGroup3);
+ //連結文字標籤元件
+ lblExtraMsg3 = (TextView) findViewById(R.id.lblExtraMsg3);
+ //連結文字編輯元件
+ txtQAmount3 = (EditText) findViewById(R.id.txtQAmount3);
+ //連結勾選元件
+ chkPrefix = (CheckBox) findViewById(R.id.chkPrefix);
+ chkSuffix = (CheckBox) findViewById(R.id.chkSuffix);
+ //初始化變數
+ selection=-1;
+ qualified=true;
+ }
+
+ //當btnChangeGroup3按鈕按下時
+ public void btnChangeGroup3_Click(View view) {
+ final ArrayList ad = new ArrayList();
+ ad.add("所有單字"); ad.addAll(MainActivity.GROUP_NAMES);
+ AlertDialog.Builder alert = new AlertDialog.Builder(this)
+ .setTitle("選擇群組")
+ .setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, ad), new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ selection=which-1;
+ btnChangeGroup3.setText(ad.get(which));
+ if(selection>=0){
+ ArrayList SelGroup = MainActivity.GROUPS.get(MainActivity.GROUP_NAMES.get(selection));
+ qualified=SelGroup.size()>4;
+ if(qualified){
+ lblExtraMsg3.setTextColor(Color.argb(255,168,168,168));
+ if(chkSuffix.isChecked() || chkPrefix.isChecked()){
+ lblExtraMsg3.setText("如果某項單字長度小於5的話,題目只會提供字首或不提供");
+ }else{
+ lblExtraMsg3.setText("");
+ }
+ }else{
+ lblExtraMsg3.setTextColor(Color.RED);
+ lblExtraMsg3.setText("單字群組內的單字量必須大於4個。");
+ }
+ }else{
+ qualified=true;
+ lblExtraMsg3.setTextColor(Color.argb(255,168,168,168));
+ if(chkSuffix.isChecked() || chkPrefix.isChecked()){
+ lblExtraMsg3.setText("如果某項單字長度小於5的話,題目只會提供字首或不提供");
+ }else{
+ lblExtraMsg3.setText("");
+ }
+ }
+ }
+ });
+ alert.show();
+ }
+
+ //當【+】按鈕按下時
+ public void btnAdd3_Click(View view) {
+ int num = Integer.parseInt(txtQAmount3.getText().toString()) + 1;
+ txtQAmount3.setText(String.valueOf(num<10000 ? num : 9999));
+ }
+
+ //當【-】按鈕按下時
+ public void btnSubtract3_Click(View view) {
+ int num = Integer.parseInt(txtQAmount3.getText().toString()) - 1;
+ txtQAmount3.setText(String.valueOf(num>0 ? num : 1));
+ }
+
+ //當【字首提示】勾選元件按下時
+ public void chkPrefix_Click(View view) {
+ if(qualified){
+ if(chkSuffix.isChecked() || chkPrefix.isChecked()){
+ lblExtraMsg3.setText("如果某項單字長度小於5的話,題目只會提供字首或不提供");
+ }else{
+ lblExtraMsg3.setText("");
+ }
+ }
+ }
+
+ //當【字尾提示】勾選元件按下時
+ public void chkSuffix_Click(View view) {
+ if(qualified){
+ if(chkSuffix.isChecked() || chkPrefix.isChecked()){
+ lblExtraMsg3.setText("如果某項單字長度小於5的話,題目只會提供字首或不提供");
+ }else{
+ lblExtraMsg3.setText("");
+ }
+ }
+ }
+
+ //當【開始測驗】按鈕按下時
+ public void btnStartTest3_Click(View view) {
+ if(qualified){
+ Intent it = new Intent(this, ActSpellingExamine.class);
+ it.putExtra("selection", selection);
+ it.putExtra("questions", Integer.valueOf(txtQAmount3.getText().toString()));
+ it.putExtra("prefix", chkPrefix.isChecked());
+ it.putExtra("suffix", chkSuffix.isChecked());
+ startActivity(it);
+ }
+ }
+
+ //當【說明】按鈕按下時
+ public void btnExplanation3_Click(View view) {
+ final AlertDialog.Builder adExp1, adExp2, adExp3;
+ adExp3 = new AlertDialog.Builder(this)
+ .setTitle("說明")
+ .setMessage("在設定的部分,你可以選擇單字群組、設定題目數量與是否提示字首、字尾。" +
+ "由於每個英文單字的長短個不同,因此次測驗不設置限時選項。設定完之後就可以開始進行測驗了。")
+ .setPositiveButton("完成", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {}});
+ adExp2 = new AlertDialog.Builder(this)
+ .setTitle("說明")
+ .setMessage("測驗時只要針對題目所示的詞性意思來寫出正確的英文單字即可。" +
+ "若有字首或字尾的單字提示,在回答時仍須將其寫出。")
+ .setPositiveButton("下一頁", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {adExp3.show();}});
+ adExp1 = new AlertDialog.Builder(this)
+ .setTitle("說明")
+ .setMessage("除了了解單字字義之外,英文的拼寫也是相當地重要。在此測驗中," +
+ "系統會隨機選擇群組中的單字並秀出其所有的詞性意思。")
+ .setPositiveButton("下一頁", new DialogInterface.OnClickListener() {@Override public void onClick(DialogInterface dialog, int which) {adExp2.show();}});
+ adExp1.show();
+ }
+
+ //當【返回】按鈕按下時
+ public void btnBack7_Click(View view) {finish();}
+
+}
diff --git a/app/src/main/res/Test.txt b/app/src/main/res/Test.txt
new file mode 100755
index 0000000..d800886
--- /dev/null
+++ b/app/src/main/res/Test.txt
@@ -0,0 +1 @@
+123
\ No newline at end of file
diff --git a/app/src/main/res/drawable/drawable.xml b/app/src/main/res/drawable/drawable.xml
new file mode 100755
index 0000000..ea2eee6
--- /dev/null
+++ b/app/src/main/res/drawable/drawable.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/icon.png b/app/src/main/res/drawable/icon.png
new file mode 100755
index 0000000..82574c2
Binary files /dev/null and b/app/src/main/res/drawable/icon.png differ
diff --git a/app/src/main/res/drawable/redngreen.png b/app/src/main/res/drawable/redngreen.png
new file mode 100755
index 0000000..a4ba453
Binary files /dev/null and b/app/src/main/res/drawable/redngreen.png differ
diff --git a/app/src/main/res/layout/activity_act4_selection.xml b/app/src/main/res/layout/activity_act4_selection.xml
new file mode 100755
index 0000000..c770b7b
--- /dev/null
+++ b/app/src/main/res/layout/activity_act4_selection.xml
@@ -0,0 +1,192 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act4_selection_result.xml b/app/src/main/res/layout/activity_act4_selection_result.xml
new file mode 100755
index 0000000..f15aa15
--- /dev/null
+++ b/app/src/main/res/layout/activity_act4_selection_result.xml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_adding_group.xml b/app/src/main/res/layout/activity_act_adding_group.xml
new file mode 100755
index 0000000..42d3cec
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_adding_group.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_all_voca.xml b/app/src/main/res/layout/activity_act_all_voca.xml
new file mode 100755
index 0000000..66dc5ec
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_all_voca.xml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_editing_group.xml b/app/src/main/res/layout/activity_act_editing_group.xml
new file mode 100755
index 0000000..adeecae
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_editing_group.xml
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_grouping.xml b/app/src/main/res/layout/activity_act_grouping.xml
new file mode 100755
index 0000000..548f172
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_grouping.xml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_list_of_word_package.xml b/app/src/main/res/layout/activity_act_list_of_word_package.xml
new file mode 100755
index 0000000..e3e6fde
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_list_of_word_package.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_memory_practice.xml b/app/src/main/res/layout/activity_act_memory_practice.xml
new file mode 100755
index 0000000..7e9db1b
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_memory_practice.xml
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_memory_result.xml b/app/src/main/res/layout/activity_act_memory_result.xml
new file mode 100755
index 0000000..e565b57
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_memory_result.xml
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_memory_setting.xml b/app/src/main/res/layout/activity_act_memory_setting.xml
new file mode 100755
index 0000000..014411a
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_memory_setting.xml
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_multiple_choice.xml b/app/src/main/res/layout/activity_act_multiple_choice.xml
new file mode 100755
index 0000000..7c5fb83
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_multiple_choice.xml
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_piece_voca.xml b/app/src/main/res/layout/activity_act_piece_voca.xml
new file mode 100755
index 0000000..df9a1e0
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_piece_voca.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_search_word.xml b/app/src/main/res/layout/activity_act_search_word.xml
new file mode 100755
index 0000000..0538a97
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_search_word.xml
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_spelling_examine.xml b/app/src/main/res/layout/activity_act_spelling_examine.xml
new file mode 100755
index 0000000..5d55e1e
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_spelling_examine.xml
@@ -0,0 +1,265 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_spelling_result.xml b/app/src/main/res/layout/activity_act_spelling_result.xml
new file mode 100755
index 0000000..4237a1f
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_spelling_result.xml
@@ -0,0 +1,148 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_spelling_setting.xml b/app/src/main/res/layout/activity_act_spelling_setting.xml
new file mode 100755
index 0000000..8561d19
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_spelling_setting.xml
@@ -0,0 +1,190 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_word_info.xml b/app/src/main/res/layout/activity_act_word_info.xml
new file mode 100755
index 0000000..25edc48
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_word_info.xml
@@ -0,0 +1,216 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_act_word_packages.xml b/app/src/main/res/layout/activity_act_word_packages.xml
new file mode 100755
index 0000000..52e69b6
--- /dev/null
+++ b/app/src/main/res/layout/activity_act_word_packages.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100755
index 0000000..13dddfe
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/appicon.png b/app/src/main/res/mipmap-hdpi/appicon.png
new file mode 100755
index 0000000..f9a8460
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/appicon.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100755
index 0000000..cde69bc
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/appicon.png b/app/src/main/res/mipmap-mdpi/appicon.png
new file mode 100755
index 0000000..55821b0
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/appicon.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100755
index 0000000..c133a0c
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/appicon.png b/app/src/main/res/mipmap-xhdpi/appicon.png
new file mode 100755
index 0000000..bc52b7c
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/appicon.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100755
index 0000000..bfa42f0
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/appicon.png b/app/src/main/res/mipmap-xxhdpi/appicon.png
new file mode 100755
index 0000000..01948a6
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/appicon.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100755
index 0000000..324e72c
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/appicon.png b/app/src/main/res/mipmap-xxxhdpi/appicon.png
new file mode 100755
index 0000000..c6a9383
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/appicon.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100755
index 0000000..aee44e1
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml
new file mode 100755
index 0000000..62df187
--- /dev/null
+++ b/app/src/main/res/values-w820dp/dimens.xml
@@ -0,0 +1,6 @@
+
+
+ 64dp
+
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100755
index 0000000..2a12c47
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #3F51B5
+ #303F9F
+ #FF4081
+
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100755
index 0000000..295b5a9
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,5 @@
+
+
+ 16dp
+ 16dp
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100755
index 0000000..221535d
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,31 @@
+
+ 英文幫手
+
+ - A
+ - B
+ - C
+ - D
+ - E
+ - F
+ - G
+ - H
+ - I
+ - J
+ - K
+ - L
+ - M
+ - N
+ - O
+ - P
+ - Q
+ - R
+ - S
+ - T
+ - U
+ - V
+ - W
+ - X
+ - Y
+ - Z
+
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
new file mode 100755
index 0000000..6f19b47
--- /dev/null
+++ b/app/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/app/src/test/java/com/example/leeyuanair/englishhelper/ExampleUnitTest.java b/app/src/test/java/com/example/leeyuanair/englishhelper/ExampleUnitTest.java
new file mode 100755
index 0000000..427e69f
--- /dev/null
+++ b/app/src/test/java/com/example/leeyuanair/englishhelper/ExampleUnitTest.java
@@ -0,0 +1,15 @@
+package com.example.leeyuanair.englishhelper;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * To work on unit tests, switch the Test Artifact in the Build Variants view.
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() throws Exception {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100755
index 0000000..a1f101c
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,23 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:1.5.0'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/gradle.properties b/gradle.properties
new file mode 100755
index 0000000..b8e00bf
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,18 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx1024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100755
index 0000000..f23df6e
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Oct 21 11:34:03 PDT 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..9d82f78
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100755
index 0000000..aec9973
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/settings.gradle b/settings.gradle
new file mode 100755
index 0000000..d3db109
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':app'