• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

development


コミットメタ情報

リビジョン67545123a4188c714fbcf24e7fe1cf1f614b610c (tree)
日時2009-08-29 02:35:46
作者Mike LeBeau <mlebeau@andr...>
コミッターMike LeBeau

ログメッセージ

Reinclude SearchableDictionary sample app as a demo of third party inclusion in Quick Search Box.

This reverts commit 3e83e8bc8b969a993b026dab9d13b99b315d9af0.

変更サマリ

差分

--- a/build/sdk.atree
+++ b/build/sdk.atree
@@ -75,6 +75,7 @@ development/samples/SkeletonApp platforms/${PLATFORM_NAME}/samples/SkeletonApp
7575 development/samples/Snake platforms/${PLATFORM_NAME}/samples/Snake
7676 development/samples/SoftKeyboard platforms/${PLATFORM_NAME}/samples/SoftKeyboard
7777 development/samples/JetBoy platforms/${PLATFORM_NAME}/samples/JetBoy
78+development/samples/SearchableDictionary platforms/${PLATFORM_NAME}/samples/SearchableDictionary
7879
7980 # dx
8081 bin/dx platforms/${PLATFORM_NAME}/tools/dx
--- /dev/null
+++ b/samples/SearchableDictionary/Android.mk
@@ -0,0 +1,12 @@
1+LOCAL_PATH:= $(call my-dir)
2+include $(CLEAR_VARS)
3+
4+LOCAL_MODULE_TAGS := samples
5+
6+LOCAL_SRC_FILES := $(call all-subdir-java-files)
7+
8+LOCAL_SDK_VERSION := current
9+
10+LOCAL_PACKAGE_NAME := SearchableDictionary
11+
12+include $(BUILD_PACKAGE)
--- /dev/null
+++ b/samples/SearchableDictionary/AndroidManifest.xml
@@ -0,0 +1,58 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+/*
4+** Copyright 2009, The Android Open Source Project
5+**
6+** Licensed under the Apache License, Version 2.0 (the "License");
7+** you may not use this file except in compliance with the License.
8+** You may obtain a copy of the License at
9+**
10+** http://www.apache.org/licenses/LICENSE-2.0
11+**
12+** Unless required by applicable law or agreed to in writing, software
13+** distributed under the License is distributed on an "AS IS" BASIS,
14+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+** See the License for the specific language governing permissions and
16+** limitations under the License.
17+*/
18+-->
19+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
20+ package="com.example.android.searchabledict">
21+
22+ <uses-sdk android:minSdkVersion="4" />
23+
24+ <application android:label="@string/app_name"
25+ android:icon="@drawable/ic_dictionary">
26+
27+ <!-- The default activity of the app. Can also display search results. -->
28+ <activity android:name=".SearchableDictionary"
29+ android:label="@string/app_name"
30+ android:theme="@android:style/Theme.NoTitleBar">
31+
32+ <intent-filter>
33+ <action android:name="android.intent.action.MAIN" />
34+ <category android:name="android.intent.category.LAUNCHER" />
35+ </intent-filter>
36+
37+ <!-- Receives the search request. -->
38+ <intent-filter>
39+ <action android:name="android.intent.action.SEARCH" />
40+ <category android:name="android.intent.category.DEFAULT" />
41+ </intent-filter>
42+
43+ <!-- Points to searchable meta data. -->
44+ <meta-data android:name="android.app.searchable"
45+ android:resource="@xml/searchable"/>
46+ </activity>
47+
48+ <!-- Displays the definition of a word. -->
49+ <activity android:name=".WordActivity"
50+ android:theme="@android:style/Theme.NoTitleBar"/>
51+
52+ <!-- Provides search suggestions for words and their definitions. -->
53+ <provider android:name="DictionaryProvider"
54+ android:authorities="dictionary"
55+ android:syncable="false" />
56+
57+ </application>
58+</manifest>
--- /dev/null
+++ b/samples/SearchableDictionary/res/layout/main.xml
@@ -0,0 +1,37 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+/*
4+** Copyright 2009, The Android Open Source Project
5+**
6+** Licensed under the Apache License, Version 2.0 (the "License");
7+** you may not use this file except in compliance with the License.
8+** You may obtain a copy of the License at
9+**
10+** http://www.apache.org/licenses/LICENSE-2.0
11+**
12+** Unless required by applicable law or agreed to in writing, software
13+** distributed under the License is distributed on an "AS IS" BASIS,
14+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+** See the License for the specific language governing permissions and
16+** limitations under the License.
17+*/
18+-->
19+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
20+ android:orientation="vertical"
21+ android:layout_width="fill_parent"
22+ android:layout_height="fill_parent">
23+ <TextView
24+ android:id="@+id/textField"
25+ android:textAppearance="?android:attr/textAppearanceMedium"
26+ android:layout_width="fill_parent"
27+ android:layout_height="wrap_content"
28+ android:text="@string/search_instructions"/>
29+
30+ <ListView
31+ android:id="@+id/list"
32+ android:layout_width="fill_parent"
33+ android:layout_height="0dip"
34+ android:layout_weight="1"/>
35+</LinearLayout>
36+
37+
--- /dev/null
+++ b/samples/SearchableDictionary/res/layout/word.xml
@@ -0,0 +1,39 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+/*
4+** Copyright 2009, The Android Open Source Project
5+**
6+** Licensed under the Apache License, Version 2.0 (the "License");
7+** you may not use this file except in compliance with the License.
8+** You may obtain a copy of the License at
9+**
10+** http://www.apache.org/licenses/LICENSE-2.0
11+**
12+** Unless required by applicable law or agreed to in writing, software
13+** distributed under the License is distributed on an "AS IS" BASIS,
14+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+** See the License for the specific language governing permissions and
16+** limitations under the License.
17+*/
18+-->
19+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
20+ android:orientation="vertical"
21+ android:layout_width="fill_parent"
22+ android:layout_height="fill_parent">
23+ <TextView
24+ android:id="@+id/word"
25+ android:textAppearance="?android:attr/textAppearanceLarge"
26+ android:textSize="30sp"
27+ android:layout_width="wrap_content"
28+ android:layout_height="wrap_content"
29+ android:text="@string/search_instructions"
30+ android:layout_marginLeft="10dip"
31+ android:layout_marginTop="5dip" />
32+ <TextView
33+ android:id="@+id/definition"
34+ android:textAppearance="?android:attr/textAppearanceMedium"
35+ android:layout_width="fill_parent"
36+ android:layout_height="wrap_content"
37+ android:text="@string/search_instructions"
38+ android:layout_marginLeft="10dip" />
39+</LinearLayout>
--- /dev/null
+++ b/samples/SearchableDictionary/res/raw/definitions.txt
@@ -0,0 +1,997 @@
1+abbey - n. a monastery ruled by an abbot
2+abide - v. dwell; inhabit or live in
3+abound - v. be abundant or plentiful; exist in large quantities
4+absence - n. the state of being absent
5+absorb - v. assimilate or take in
6+abstinence - n. practice of refraining from indulging an appetite especially alcohol
7+absurd - j. inconsistent with reason or logic or common sense
8+abundant - j. present in great quantity
9+abusive - j. characterized by physical or psychological maltreatment
10+academic - j. associated with school or learning
11+academy - n. a school for special training
12+accept - v. consider or hold as true
13+access - v. reach or gain access to
14+accessible - j. easily obtained
15+acclaim - n. enthusiastic approval
16+accommodate - v. provide with something desired or needed
17+accompany - v. go or travel along with
18+accomplish - v. to gain with effort
19+account - v. furnish a justifying analysis or explanation
20+accurate - j. conforming exactly or almost exactly to fact or to a standard or performing with total accuracy
21+accusation - n. an assertion that someone is guilty of a fault or offence
22+accuse - v. blame for, make a claim of wrongdoing or misbehavior against
23+acid - j. biting, sarcastic, or scornful
24+acknowledge - v. declare to be true or admit the existence or reality or truth of
25+acquire - v. come into the possession of something concrete or abstract
26+acquisition - n. something acquired or received
27+adamant - j. impervious to pleas, persuasion, requests, reason
28+adjacent - j. having a common boundary or edge; abutting; touching
29+administrator - n. someone who manages a government agency or department
30+advent - n. arrival that has been awaited (especially of something momentous)
31+adverse - j. contrary to your interests or welfare
32+advisory - n. an announcement that usually advises or warns the public of some threat
33+advocacy - n. active support of an idea or cause etc.; especially the act of pleading or arguing for something
34+advocate - v. speak, plead, or argue in favor of
35+affect - n. the conscious subjective aspect of feeling or emotion
36+affirmative - j. affirming or giving assent
37+aggression - n. violent action that is hostile and usually unprovoked
38+airy - j. not practical or realizable; speculative
39+album - n. a book of blank pages with pockets or envelopes; for organizing photographs or stamp collections etc
40+alcohol - n. a liquor or brew containing alcohol as the active agent
41+alien - j. being or from or characteristic of another place or part of the world
42+allegiance - n. the loyalty that citizens owe to their country (or subjects to their sovereign)
43+alley - n. a narrow street with walls on both sides
44+alliance - n. a formal agreement establishing an association or alliance between nations or other groups to achieve a particular aim
45+ally - n. an associate who provides cooperation or assistance
46+altar - n. a raised structure on which gifts or sacrifices to a god are made
47+alter - v. cause to change; make different; cause a transformation
48+alternate - j. serving or used in place of another
49+alternative - j. serving or used in place of another
50+altitude - n. elevation especially above sea level or above the earth's surface
51+amateur - j. lacking professional skill or expertise
52+ambiguous - j. having more than one possible meaning
53+ambitious - j. having a strong desire for success or achievement
54+ambivalent - j. uncertain or unable to decide about what course to follow
55+analogy - n. drawing a comparison in order to show a similarity in some respect
56+analyst - n. someone who is skilled at analyzing data
57+analyze - v. break down into components or essential features
58+anchor - v. fix firmly and stably
59+annual - j. occurring or payable every year
60+anonymous - j. having no known name or identity or known source
61+antichrist - n. the adversary of Christ (or Christianity) mentioned in the New Testament
62+antique - j. made in or typical of earlier times and valued for its age
63+anxious - j. causing or fraught with or showing anxiety
64+apartheid - n. a social policy or racial segregation involving political and economic and legal discrimination against people who are not Whites
65+apocalyptic - j. prophetic of devastation or ultimate doom
66+apology - n. an expression of regret at having caused trouble for someone
67+apparel - n. clothing in general
68+apparent - j. clearly revealed to the mind or the senses or judgment
69+appease - v. make peace with
70+appropriate - j. suitable for a particular person or place or condition etc
71+apt - j. being of striking appropriateness and pertinence
72+arbitrary - j. based on or subject to individual discretion or preference or sometimes impulse or caprice
73+arcade - n. a covered passageway with shops and stalls on either side
74+arrange - v. put into a proper or systematic order
75+arrangement - n. an orderly grouping (of things or persons) considered as a unit; the result of arranging
76+arrival - n. the act of arriving at a certain place
77+arrogance - n. overbearing pride evidenced by a superior manner toward inferiors
78+arrogant - j. having or showing feelings of unwarranted importance out of overbearing pride
79+articulate - j. expressing yourself easily or characterized by clear expressive language
80+assassination - n. murder of a public figure by surprise attack
81+assess - v. set or determine the amount of (a payment such as a fine)
82+assets - n. anything of material value or usefulness that is owned by a person or company
83+asylum - n. a shelter from danger or hardship
84+auburn - j. (of hair) colored a moderate reddish-brown
85+august - j. profoundly honored
86+aura - n. a distinctive but intangible quality surrounding a person or thing
87+austere - j. of a stern or strict bearing or demeanor; forbidding in aspect
88+authentic - j. not counterfeit or copied
89+authenticity - n. undisputed credibility
90+authoritarian - n. a person who behaves in a tyrannical manner
91+autobiography - n. a biography of yourself
92+autonomous - j. existing as an independent entity
93+autonomy - n. immunity from arbitrary exercise of authority: political independence
94+avid - j. marked by active interest and enthusiasm
95+banal - j. repeated too often; over familiar through overuse
96+barring - n. the act of excluding someone by a negative vote or veto
97+bass - n. the lowest adult male singing voice
98+batter - n. a liquid or semiliquid mixture, as of flour, eggs, and milk, used in cooking
99+belle - n. a young woman who is the most charming and beautiful of several rivals
100+beneficial - j. promoting or enhancing well-being
101+benefit - n. something that aids or promotes well-being
102+benign - j. not dangerous to health; not recurrent or progressive (especially of a tumor)
103+bid - n. a formal proposal to buy at a specified price
104+biography - n. an account of the series of events making up a person's life
105+biology - n. the science that studies living organisms
106+blaze - n. a strong flame that burns brightly
107+bleak - j. unpleasantly cold and damp
108+bogus - j. fraudulent; having a misleading appearance
109+bolster - v. support and strengthen
110+bomb - n. an explosive device fused to explode under specific conditions
111+bore - n. a person who evokes boredom
112+botanical - j. of or relating to plants or botany
113+boycott - n. a group's refusal to have commercial dealings with some organization in protest against its policies
114+brass - n. an alloy of copper and zinc
115+breach - n. an opening (especially a gap in a dike or fortification)
116+broadcast - n. message that is transmitted by radio or television
117+brokerage - n. the business of a broker; charges a fee to arrange a contract between two parties
118+buffet - n. a meal set out on a buffet at which guests help themselves
119+bumper - n. a mechanical device consisting of bars at either end of a vehicle to absorb shock and prevent serious damage
120+bureau - n. an administrative unit of government
121+bureaucracy - n. non elected government officials
122+butt - v. to strike, thrust or shove against
123+cabinet - n. persons appointed by a head of state to head executive departments of government and act as official advisers
124+caliber - n. a degree or grade of excellence or worth
125+campaign - n. a series of actions advancing a principle or tending toward a particular end
126+canon - n. a rule or especially body of rules or principles generally established as valid and fundamental in a field or art or philosophy
127+cardinal - j. serving as an essential component
128+caricature - n. a representation of a person that is exaggerated for comic effect
129+casual - j. without or seeming to be without plan or method; offhand
130+catastrophe - n. an event resulting in great loss and misfortune
131+caucus - n. a closed political meeting
132+causal - j. involving or constituting a cause; causing
133+censure - n. harsh criticism or disapproval
134+census - n. a periodic count of the population
135+cereal - n. grass whose starchy grains are used as food: wheat; rice; rye; oats; maize; buckwheat; millet
136+ceremonial - j. marked by pomp or ceremony or formality
137+chaos - n. a state of extreme confusion and disorder
138+characteristic - n. a distinguishing quality
139+chronic - j. being long-lasting and recurrent or characterized by long suffering
140+citadel - n. a stronghold into which people could go for shelter during a battle
141+cite - v. refer to for illustration or proof
142+clumsy - j. not elegant or graceful in expression
143+coalition - n. an organization of people (or countries) involved in a pact or treaty
144+coherent - j. marked by an orderly, logical, and aesthetically consistent relation of parts
145+coincidence - n. the temporal property of two things happening at the same time
146+collapse - v. break down, literally or metaphorically
147+colleague - n. an associate that one works with
148+collective - j. set up on the principle of collectivism or ownership and production by the workers involved usually under the supervision of a government
149+collector - n. a person who collects things
150+collision - n. an accident resulting from violent impact of a moving object
151+commemorate - v. mark by some ceremony or observation
152+commentary - n. a written explanation or criticism or illustration that is added to a book or other textual material
153+commission - n. a special group delegated to consider some matter
154+commitment - n. the act of binding yourself (intellectually or emotionally) to a course of action
155+commodity - n. articles of commerce
156+commute - n. a regular journey of some distance to and from your place of work
157+comparable - j. able to be compared or worthy of comparison
158+comparison - n. the act of examining resemblances
159+compassionate - j. showing or having compassion
160+compensate - v. make payment to; compensate
161+competence - n. the quality of being adequately or well qualified physically and intellectually
162+competent - j. properly or sufficiently qualified or capable or efficient
163+competitive - j. involving competition or competitiveness
164+competitor - n. the contestant you hope to defeat
165+complex - j. complicated in structure; consisting of interconnected parts
166+component - n. an artifact that is one of the individual parts of which a composite entity is made up; especially a part that can be separated from or attached to a system
167+composer - n. someone who composes music as a profession
168+comprehensive - j. broad in scope
169+concede - v. admit (to a wrongdoing)
170+conceive - v. have the idea for
171+concession - n. a point conceded or yielded
172+confederate - j. united in a group or league
173+confidence - n. a state of confident hopefulness that events will be favorable
174+confident - j. having or marked by confidence or assurance
175+confront - v. oppose, as in hostility or a competition
176+conscience - n. a feeling of shame when you do something immoral
177+conscious - j. knowing and perceiving; having awareness of surroundings and sensations and thoughts
178+consecutive - j. one after the other
179+consensus - n. agreement in the judgment or opinion reached by a group as a whole
180+conservatism - n. a political or theological orientation advocating the preservation of the best in society and opposing radical changes
181+conservative - j. avoiding excess
182+consistency - n. a harmonious uniformity or agreement among things or parts
183+conspicuous - j. obvious to the eye or mind
184+conspiracy - n. a plot to carry out some harmful or illegal act (especially a political plot)
185+constituency - n. the body of voters who elect a representative for their area
186+consume - v. use up (resources or materials)
187+consumer - n. a person who uses goods or services
188+consumption - n. the process of taking food into the body through the mouth
189+contemplate - v. look at thoughtfully; observe deep in thought
190+contemporary - j. belonging to the present time
191+contender - n. the contestant you hope to defeat
192+contentious - j. inclined or showing an inclination to dispute or disagree, even to engage in law suits
193+contingent - j. possible but not certain to occur
194+continuous - j. continuing in time or space without interruption
195+contradiction - n. opposition between two conflicting forces or ideas
196+contradictory - j. unable for both to be true at the same time
197+contribution - n. a voluntary gift (as of money or service or ideas) made to some worthwhile cause
198+contributor - n. someone who contributes (or promises to contribute) a sum of money
199+convenience - n. the quality of being useful and convenient
200+conversion - n. the act of changing from one use or function or purpose to another
201+convertible - j. designed to be changed from one use or form to another
202+conviction - n. an unshakable belief in something without need for proof or evidence
203+corporate - j. of or belonging to a corporation
204+corps - n. a body of people associated together
205+corruption - n. destroying someone's (or some group's) honesty or loyalty; undermining moral integrity
206+cosmetic - j. serving an esthetic rather than a useful purpose
207+cosmopolitan - j. of worldwide scope or applicability
208+counsel - n. something that provides direction or advice as to a decision or course of action
209+counterpart - n. a person or thing having the same function or characteristics as another
210+courageous - j. able to face and deal with danger or fear without flinching
211+course - n. a connected series of events or actions or developments
212+courtesy - n. a courteous or respectful or considerate act
213+credible - j. appearing to merit belief or acceptance
214+critique - n. a serious examination and judgment of something
215+crusade - v. exert oneself continuously, vigorously, or obtrusively to gain an end or engage in a crusade for a certain cause or person; be an advocate for
216+crush - v. to compress with violence, out of natural shape or condition
217+curator - n. the custodian of a collection (as a museum or library)
218+curriculum - n. an integrated course of academic studies
219+cynical - j. believing the worst of human nature and motives; having a sneering disbelief in e.g. selflessness of others
220+cynicism - n. a cynical feeling of distrust
221+daring - n. the trait of being willing to undertake things that involve risk or danger
222+debacle - n. a sudden and violent collapse
223+debut - v. appear for the first time in public
224+decay - n. the organic phenomenon of rotting
225+decency - n. the quality of conforming to standards of propriety and morality
226+decent - j. socially or conventionally correct; refined or virtuous
227+decisive - j. characterized by decision and firmness
228+decree - n. a legally binding command or decision entered on the court record (as if issued by a court or judge)
229+dedication - n. complete and wholehearted fidelity
230+default - n. loss due to not showing up
231+defendant - n. a person or institution against whom an action is brought in a court of law; the person being sued or accused
232+defensive - j. attempting to justify or defend in speech or writing
233+defiance - n. a hostile challenge
234+definite - j. known for certain
235+delicacy - n. something considered choice to eat
236+demise - v. transfer by a lease or by a will
237+demonstrate - v. establish the validity of something, as by an example, explanation or experiment
238+denominator - n. the divisor of a fraction
239+deposition - n. (law) a pretrial interrogation of a witness; usually conducted in a lawyer's office
240+depression - n. a long-term economic state characterized by unemployment and low prices and low levels of trade and investment
241+depth - n. the attribute or quality of being deep, strong, or intense
242+derive - v. come from
243+descent - n. properties attributable to your ancestry
244+desert - n. arid land with little or no vegetation
245+designate - v. give an assignment to (a person) to a post, or assign a task to (a person)
246+despair - n. a state in which all hope is lost or absent
247+desperate - j. showing extreme urgency or intensity especially because of great need or desire
248+detect - v. discover or determine the existence, presence, or fact of
249+deter - v. try to prevent; show opposition to
250+determination - n. the quality of being determined to do or achieve something; firmness of purpose
251+deterrent - j. tending to deter
252+diagnosis - n. identifying the nature or cause of some phenomenon
253+dialogue - n. a discussion intended to produce an agreement
254+difference - n. the quality of being unlike or dissimilar
255+dignity - n. the quality of being worthy of esteem or respect
256+dilemma - n. state of uncertainty or perplexity especially as requiring a choice between equally unfavorable options
257+diplomacy - n. subtly skillful handling of a situation
258+diplomat - n. a person who deals tactfully with others
259+diplomatic - j. using or marked by tact in dealing with sensitive matters or people
260+disagree - v. be of different opinions
261+disappear - v. become invisible or unnoticeable
262+discern - v. detect with the senses
263+discipline - n. a system of rules of conduct or method of practice
264+discomfort - n. the state of being tense and feeling pain
265+discourse - n. extended verbal expression in speech or writing
266+discover - v. see for the first time; make a discovery
267+discriminate - v. treat differently on the basis of sex or race
268+discussion - n. an exchange of views on some topic
269+disdain - n. lack of respect accompanied by a feeling of intense dislike
270+dishonest - j. deceptive or fraudulent; disposed to cheat or defraud or deceive
271+dismal - j. causing dejection
272+dismay - v. fill with apprehension or alarm; cause to be unpleasantly surprised
273+dismissal - n. the termination of someone's employment (leaving them free to depart)
274+disparity - n. inequality or difference in some respect
275+disregard - n. willful lack of care and attention
276+dissent - n. a difference of opinion
277+distant - j. separated in space or coming from or going to a distance
278+distinction - n. a distinguishing difference
279+distress - n. extreme physical pain
280+distrust - v. regard as untrustworthy; regard with suspicion; have no faith or confidence in
281+diverse - j. many and different
282+diversion - n. an activity that diverts or amuses or stimulates
283+diversity - n. noticeable heterogeneity
284+divert - v. turn aside; turn away from
285+document - n. writing that provides information (especially information of an official nature)
286+doe - n. mature female of mammals of which the male is called 'buck'
287+domain - n. territory over which rule or control is exercised
288+dominance - n. the state that exists when one person or group has power over another
289+dominant - j. exercising influence or control
290+dominate - v. be in control
291+domination - n. social control by dominating
292+donate - v. give to a charity or good cause
293+donor - n. person who makes a gift of property
294+drastic - j. forceful and extreme and rigorous
295+drought - n. a shortage of rainfall
296+dubious - j. open to doubt or suspicion
297+dynamics - n. the branch of mechanics concerned with the forces that cause motions of bodies
298+earnest - j. characterized by a firm and humorless belief in the validity of your opinions
299+eccentric - n. a person with an unusual or odd personality
300+eclectic - j. selecting what seems best of various styles or ideas
301+editorial - n. an article giving opinions or perspectives
302+effect - n. a phenomenon that follows and is caused by some previous phenomenon
303+effective - j. works well as a means or remedy
304+efficiency - n. skillfulness in avoiding wasted time and effort
305+efficient - j. able to accomplish a purpose; functioning effectively
306+elaborate - v. add details, as to an account or idea; clarify the meaning of and discourse in a learned way, usually in writing
307+element - n. any of the more than 100 known substances (of which 92 occur naturally) that cannot be separated into simpler substances and that singly or in combination constitute all matter
308+eligible - j. qualified for or allowed or worthy of being chosen
309+eliminate - v. terminate, end, or take out
310+embargo - n. a government order imposing a trade barrier
311+emblem - n. a visible symbol representing an abstract idea
312+embrace - n. the act of clasping another person in the arms (as in greeting or affection)
313+emerge - v. come out into view, as from concealment
314+emergence - n. the gradual beginning or coming forth
315+eminent - j. of imposing height; especially standing out above others
316+emphasis - n. intensity or forcefulness of expression
317+emphasize - v. to stress, single out as important
318+employee - n. a worker who is hired to perform a job
319+employer - n. a person or firm that employs workers
320+emulate - v. imitate the function of (another system), as by modifying the hardware or the software
321+enact - v. order by virtue of superior authority; decree
322+encourage - v. inspire with confidence; give hope or courage to
323+encyclopedia - n. a reference work (often in several volumes) containing articles on various topics
324+endorse - v. be behind; approve of
325+enduring - j. patiently bearing continual wrongs or trouble
326+energetic - j. possessing or exerting or displaying energy
327+enhance - v. make better or more attractive
328+enormous - j. extraordinarily large in size or extent or amount or power or degree
329+enthusiastic - j. having or showing great excitement and interest
330+entity - n. that which is perceived or known or inferred to have its own distinct existence (living or nonliving)
331+epic - j. very imposing or impressive; surpassing the ordinary (especially in size or scale)
332+epidemic - n. a widespread outbreak of an infectious disease; many people are infected at the same time
333+episode - n. a brief section of a literary or dramatic work that forms part of a connected series
334+equilibrium - n. a stable situation in which forces cancel one another
335+equity - n. the difference between the market value of a property and the claims held against it
336+equivalent - j. being essentially equal to something
337+error - n. a wrong action attributable to bad judgment or ignorance or inattention
338+esquire - n. a title of respect for a member of the English gentry ranking just below a knight; placed after the name
339+essence - n. the central meaning or theme of a speech or literary work
340+evangelical - j. relating to or being a Christian church believing in personal conversion and the inerrancy of the Bible especially the 4 Gospels
341+evoke - v. call to mind
342+evolution - n. a process in which something passes by degrees to a different stage (especially a more advanced or mature stage)
343+exceed - v. be greater in scope or size than some standard
344+excellent - j. very good; of the highest quality
345+excerpt - n. a passage selected from a larger work
346+excess - j. more than is needed, desired, or required
347+exclude - v. prevent from being included or considered or accepted
348+excursion - n. a journey taken for pleasure
349+exempt - v. grant relief or an exemption from a rule or requirement to
350+existence - n. everything that exists anywhere
351+exit - v. move out of or depart from
352+exotic - j. strikingly strange or unusual
353+expand - v. become larger in size or volume or quantity
354+expansion - n. the act of increasing (something) in size or volume or quantity or scope
355+expect - v. regard something as probable or likely
356+expectancy - n. something expected (as on the basis of a norm)
357+expense - n. money spent to perform work and usually reimbursed by an employer
358+expertise - n. skillfulness by virtue of possessing special knowledge
359+explicit - j. precisely and clearly expressed or readily observable; leaving nothing to implication
360+explode - v. drive from the stage by noisy disapproval
361+exploit - v. use or manipulate to one's advantage
362+explosion - n. the act of exploding or bursting
363+explosive - n. a chemical substance that undergoes a rapid chemical change (with the production of gas) on being heated or struck
364+exposure - n. vulnerability to the elements; to the action of heat or cold or wind or rain
365+expressive - j. characterized by expression
366+extension - n. an addition to the length of something
367+extensive - j. large in spatial extent or range or scope or quantity
368+exterior - n. the outer side or surface of something
369+external - j. happening or arising or located outside or beyond some limits or especially surface
370+extradition - n. the surrender of an accused or convicted person by one state or country to another (usually under the provisions of a statute or treaty)
371+extraordinary - j. beyond what is ordinary or usual; highly unusual or exceptional or remarkable
372+extravagant - j. unrestrained, especially with regard to feelings
373+exuberant - j. joyously unrestrained
374+fabulous - j. extremely pleasing
375+facial - j. of or concerning the face
376+facility - n. something designed and created to serve a particular function and to afford a particular convenience or service
377+faction - n. a dissenting clique
378+faulty - j. characterized by errors; not agreeing with a model or not following established rules
379+feasible - j. capable of being done with means at hand and circumstances as they are
380+felony - n. a serious crime (such as murder or arson)
381+feminine - j. associated with women and not with men
382+fervor - n. the state of being emotionally aroused and worked up
383+fetus - n. an unborn or unhatched vertebrate in the later stages of development showing the main recognizable features of the mature animal
384+feud - n. a bitter quarrel between two parties
385+feudal - j. of or relating to or characteristic of feudalism
386+fidelity - n. the quality of being faithful
387+finale - n. the concluding part of any performance
388+finite - j. bounded or limited in magnitude or spatial or temporal extent
389+fiscal - j. involving financial matters
390+flag - n. emblem usually consisting of a rectangular piece of cloth of distinctive design
391+flamboyant - j. marked by ostentation but often tasteless
392+fleet - n. a group of warships organized as a tactical unit
393+flexible - j. able to flex; able to bend easily
394+flop - n. a complete failure
395+flourish - n. a showy gesture
396+foil - n. anything that serves by contrast to call attention to another thing's good qualities
397+ford - v. cross a river where it's shallow
398+forecast - n. a prediction about how something (as the weather) will develop
399+foreign - j. relating to or originating in or characteristic of another place or part of the world
400+foresee - v. act in advance of; deal with ahead of time
401+formation - n. an arrangement of people or things acting as a unit
402+formidable - j. extremely impressive in strength or excellence
403+formula - n. directions for making something
404+forte - n. an asset of special worth or utility
405+forth - a. forward in time or order or degree
406+foster - v. promote the growth of
407+fragile - j. easily broken or damaged or destroyed
408+frantic - j. excessively agitated; distraught with fear or other violent emotion
409+fray - v. wear away by rubbing
410+frequency - n. the number of occurrences within a given time period
411+fringe - n. a social group holding marginal or extreme views
412+frivolous - j. not serious in content or attitude or behavior
413+frontier - n. a wilderness at the edge of a settled area of a country
414+fundamental - j. being or involving basic facts or principles
415+further - v. promote the growth of
416+futile - j. producing no result or effect
417+galaxy - n. (astronomy) a collection of star systems; any of the billions of systems each having many stars and nebulae and dust
418+gamble - v. take a risk in the hope of a favorable outcome
419+gauge - n. a measuring instrument for measuring and indicating a quantity such as the thickness of wire or the amount of rain etc.
420+generate - v. bring into existence
421+generic - j. applicable to an entire class or group
422+generosity - n. the trait of being willing to give your money or time
423+genesis - n. the first book of the Old Testament: tells of Creation; Adam and Eve; Cain and Abel
424+gesture - n. motion of hands or body to emphasize or help to express a thought or feeling
425+gigantic - j. so exceedingly large or extensive as to suggest a giant or mammoth
426+gist - n. the choicest or most essential or most vital part of some idea or experience
427+glimpse - n. a brief or incomplete view
428+glorious - j. having great beauty and splendor
429+grandeur - n. the quality of being magnificent or splendid or grand
430+grandiose - j. impressive because of unnecessary largeness or grandeur; used to show disapproval
431+grave - j. of great gravity or crucial import; requiring serious thought
432+gravity - n. a manner that is serious and solemn
433+grief - n. something that causes great unhappiness
434+grotesque - j. distorted and unnatural in shape or size; abnormal and hideous
435+grove - n. a small growth of trees without underbrush
436+guise - n. an artful or simulated semblance
437+hack - n. a mediocre and disdained writer
438+hale - j. exhibiting or restored to vigorous good health
439+handwriting - n. something written by hand
440+harbor - v. hold back a thought or feeling about
441+hazard - n. a source of danger; a possibility of incurring loss or misfortune
442+heir - n. a person who is entitled by law or by the terms of a will to inherit the estate of another
443+heritage - n. practices that are handed down from the past by tradition
444+hilarious - j. marked by or causing boisterous merriment or convulsive laughter
445+hollow - j. not solid; having a space or gap or cavity
446+homage - n. respectful deference
447+hostility - n. violent action that is hostile and usually unprovoked
448+humane - j. marked or motivated by concern with the alleviation of suffering
449+humanitarian - n. someone devoted to the promotion of human welfare and to social reforms
450+hush - v. become quiet or still; fall silent
451+hybrid - n. (genetics) an organism that is the offspring of genetically dissimilar parents or stock; especially offspring produced by breeding plants or animals of different varieties or breeds or species
452+hypocrisy - n. insincerity by virtue of pretending to have qualities or beliefs that you do not really have
453+hypothesis - n. a tentative insight into the natural world; a concept that is not yet verified but that if true would explain certain facts or phenomena
454+hysteria - n. excessive or uncontrollable fear
455+icon - n. a conventional religious painting in oil on a small wooden panel; venerated in the Eastern Church
456+ideology - n. an orientation that characterizes the thinking of a group or nation
457+illusion - n. an erroneous mental representation
458+imaginary - j. not based on fact; unreal
459+imitation - n. something copied or derived from an original
460+immense - j. unusually great in size or amount or degree or especially extent or scope
461+immigrant - n. a person who comes to a country where they were not born in order to settle there
462+imminent - j. close in time; about to occur
463+immoral - j. not adhering to ethical or moral principles
464+immune - j. (usually followed by 'to') not affected by a given influence
465+impending - j. close in time; about to occur
466+implausible - j. having a quality that provokes disbelief
467+implicit - j. implied though not directly expressed; inherent in the nature of something
468+imply - v. express or state indirectly
469+impose - v. compel to behave in a certain way
470+improper - j. not suitable or right or appropriate
471+impulse - n. a sudden desire
472+inadequate - j. not sufficient to meet a need
473+incentive - n. a positive motivational influence
474+incidence - n. the relative frequency of occurrence of something
475+incident - n. a public disturbance
476+incidentally - a. of a minor or subordinate nature
477+inclined - j. at an angle to the horizontal or vertical position
478+incompetence - n. lack of physical or intellectual ability or qualifications
479+inconsistent - j. displaying a lack of consistency
480+inconvenient - j. not suited to your comfort, purpose or needs
481+indefinitely - a. to an indefinite extent; for an indefinite time
482+indicator - n. a device for showing the operating condition of some system
483+indifferent - j. showing no care or concern in attitude or action
484+indigenous - j. originating where it is found
485+indulge - v. enjoy to excess
486+inefficient - j. not producing desired results; wasteful
487+inept - j. generally incompetent and ineffectual
488+inevitable - j. incapable of being avoided or prevented
489+inexpensive - j. relatively low in price or charging low prices
490+infamous - j. known widely and usually unfavorably
491+infinite - j. having no limits or boundaries in time or space or extent or magnitude
492+influence - n. a power to affect persons or events especially power based on prestige etc
493+influential - j. having or exercising influence or power
494+influx - n. the process of flowing in
495+ingenious - j. showing inventiveness and skill
496+inherent - j. in the nature of something though not readily apparent
497+injunction - n. (law) a judicial remedy issued in order to prohibit a party from doing or continuing to do a certain activity
498+inland - a. towards or into the interior of a region
499+insight - n. the clear (and often sudden) understanding of a complex situation
500+insistence - n. the state of demanding notice or attention
501+inspector - n. a high ranking police officer
502+instance - n. an occurrence of something
503+instant - n. a very short time
504+insufficient - j. of a quantity not able to fulfill a need or requirement
505+integral - j. essential to completeness; lacking nothing
506+integrity - n. moral soundness
507+intellectual - j. appealing to or using the intellect
508+intelligence - n. the ability to comprehend; to understand and profit from experience
509+intensive - j. characterized by a high degree or intensity; often used as a combining form
510+intention - n. an act of intending; a volition that you intend to carry out
511+interact - v. act together or towards others or with others
512+interim - n. the time between one event, process, or period and another
513+intermediate - j. lying between two extremes in time or space or state
514+intervene - v. get involved, so as to alter or hinder an action, or through force or threat of force
515+intervention - n. the act of intervening (as to mediate a dispute, etc.)
516+intimacy - n. close or warm friendship
517+intricate - j. having many complexly arranged elements; elaborate
518+invasion - n. any entry into an area not previously occupied
519+inventive - j. (used of persons or artifacts) marked by independence and creativity in thought or action
520+investigator - n. a police officer who investigates crimes
521+investor - n. someone who commits capital in order to gain financial returns
522+invincible - j. incapable of being overcome or subdued
523+invoke - v. cite as an authority; resort to
524+involuntary - j. not subject to the control of the will
525+involve - v. engage as a participant
526+irony - n. incongruity between what might be expected and what actually occurs
527+irrational - j. not consistent with or using reason
528+irrelevant - j. having no bearing on or connection with the subject at issue
529+irresistible - j. impossible to resist; overpowering
530+irresponsible - j. showing lack of care for consequences
531+judgment - n. the capacity to assess situations or circumstances shrewdly and to draw sound conclusions
532+judicial - j. belonging or appropriate to the office of a judge
533+juicy - j. lucrative
534+junction - n. something that joins or connects
535+jurisdiction - n. (law) the right and power to interpret and apply the law
536+juror - n. someone who serves (or waits to be called to serve) on a jury
537+justification - n. something (such as a fact or circumstance) that shows an action to be reasonable or necessary
538+juvenile - j. of or relating to or characteristic of or appropriate for children or young people
539+ken - n. range of what one can know or understand
540+knight - n. originally a person of noble birth trained to arms and chivalry; today in Great Britain a person honored by the sovereign for personal merit
541+knit - n. needlework created by interlacing yarn in a series of connected loops using straight eyeless needles or by machine
542+lament - v. regret strongly
543+landmark - n. the position of a prominent or well-known object in a particular landscape
544+landscape - n. an expanse of scenery that can be seen in a single view
545+lapse - n. a break or intermission in the occurrence of something
546+laureate - n. someone honored for great achievements; figuratively someone crowned with a laurel wreath
547+lavish - j. very generous
548+lax - j. lacking in rigor or strictness
549+legacy - n. (law) a gift of personal property by will
550+legislative - j. relating to a legislature or composed of members of a legislature
551+legitimacy - n. lawfulness by virtue of being authorized or in accordance with law
552+legitimate - j. in accordance with recognized or accepted standards or principles
553+leisure - n. time available for ease and relaxation
554+lenient - j. not strict
555+levy - v. impose and collect
556+liable - j. held legally responsible
557+liberalism - n. a political orientation that favors social progress by reform and by changing laws rather than by revolution
558+lifelong - j. continuing through life
559+lifetime - n. the period during which something is functional (as between birth and death)
560+likelihood - n. the probability of a specified outcome
561+liking - n. a feeling of pleasure and enjoyment
562+liquor - n. an alcoholic beverage that is distilled rather than fermented
563+literacy - n. the ability to read and write
564+literal - j. avoiding embellishment or exaggeration (used for emphasis)
565+literature - n. creative writing of recognized artistic value
566+logic - n. the principles that guide reasoning within a given field or situation
567+logical - j. capable of thinking and expressing yourself in a clear and consistent manner
568+lovable - j. having characteristics that attract love or affection
569+lucrative - j. producing a sizeable profit
570+ludicrous - j. broadly or extravagantly humorous; resembling farce
571+lying - n. the deliberate act of deviating from the truth
572+machinery - n. machines or machine systems collectively
573+magnet - n. (physics) a device that attracts iron and produces a magnetic field
574+magnificent - j. characterized by grandeur
575+magnitude - n. the property of relative size or extent (whether large or small)
576+maintain - v. state or assert
577+maintenance - n. activity involved in maintaining something in good working order
578+makeup - n. the way in which someone or something is composed
579+mandate - n. an authorization to act given to a representative
580+mandatory - j. required by rule
581+maneuver - v. act in order to achieve a certain goal
582+manifesto - n. a public declaration of intentions (as issued by a political party or government)
583+marine - j. native to or inhabiting the sea
584+maritime - j. relating to or involving ships or shipping or navigation or seamen
585+martial - j. suggesting war or military life
586+marvel - v. be amazed at
587+massacre - n. the savage and excessive killing of many people
588+massive - j. imposing in size or bulk or solidity
589+masterpiece - n. the most outstanding work of a creative artist or craftsman
590+material - j. concerned with worldly rather than spiritual interests
591+maternal - j. relating to or derived from one's mother
592+maze - n. complex system of paths or tunnels in which it is easy to get lost
593+mechanics - n. the technical aspects of doing something
594+medicine - n. something that treats or prevents or alleviates the symptoms of disease
595+medieval - j. as if belonging to the Middle Ages; old-fashioned and unenlightened
596+mediocre - j. moderate to inferior in quality
597+meditation - n. continuous and profound contemplation or musing on a subject or series of subjects of a deep or abstruse nature
598+melodrama - n. an extravagant comedy in which action is more salient than characterization
599+memorable - j. worth remembering
600+menace - v. act in a threatening manner
601+mentality - n. a habitual or characteristic mental attitude that determines how you will interpret and respond to situations
602+mentor - v. serve as a teacher or trusted counselor
603+metal - n. any of several chemical elements that are usually shiny solids
604+metaphor - n. a figure of speech in which an expression is used to refer to something that it does not literally denote in order to suggest a similarity
605+metric - j. based on the meter as a standard of measurement
606+metropolis - n. a large and densely populated urban area; may include several independent administrative districts
607+metropolitan - j. relating to or characteristic of a densely populated urban area
608+mileage - n. the ratio of the number of miles traveled to the number of gallons of gasoline burned; miles per gallon
609+militant - j. disposed to warfare or hard-line policies
610+militia - n. civilians trained as soldiers but not part of the regular army
611+miniature - j. being on a very small scale
612+minimize - v. make small or insignificant
613+ministry - n. a government department under the direction of a minister
614+minority - n. being or relating to the smaller in number of two parts
615+minute - j. infinitely or immeasurably small
616+misdemeanor - n. a crime less serious than a felony
617+missile - n. a rocket carrying a warhead of conventional or nuclear explosives
618+momentum - n. an impelling force or strength
619+monarchy - n. an autocracy governed by a monarch who usually inherits the authority
620+monastery - n. the residence of a religious community
621+monetary - j. relating to or involving money
622+monopoly - n. (economics) a market in which there are many buyers but only one seller
623+morale - n. the spirit of a group that makes the members want the group to succeed
624+morality - n. concern with the distinction between good and evil or right and wrong; right or good conduct
625+motto - n. a favorite saying of a sect or political group
626+mundane - j. concerned with the world or worldly matters; ordinary
627+municipal - j. relating to city government
628+muster - v. gather or bring together
629+myriad - n. a large indefinite number
630+myth - n. a traditional story accepted as history; serves to explain the world view of a people
631+mythology - n. myths collectively; the body of stories associated with a culture or institution or person
632+narrative - n. a message that tells the particulars of an act or occurrence or course of events; presented in writing or drama or cinema or as a radio or television program
633+narrator - n. someone who tells a story
634+naturally - a. according to nature; by natural means; without artificial help
635+naval - j. connected with or belonging to or used in a navy
636+necessary - j. absolutely essential
637+necessity - n. anything indispensable
638+network - n. an interconnected system of things or people
639+neutral - j. having no personal preference
640+nevertheless - a. despite anything to the contrary (usually following a concession)
641+noisy - j. full of or characterized by loud and nonmusical sounds
642+nomination - n. the condition of having been proposed as a suitable candidate for appointment or election
643+nominee - n. a politician who is running for public office
644+norm - n. a standard or model or pattern regarded as typical
645+notorious - j. known widely and usually unfavorably
646+nude - n. without clothing (especially in the phrase 'in the nude')
647+obesity - n. more than average fatness
648+objective - j. undistorted by emotion or personal bias; based on observable phenomena
649+observatory - n. a building designed and equipped to observe astronomical phenomena
650+obsolete - j. no longer in use
651+obstruction - n. something that stands in the way and must be circumvented or surmounted
652+obtain - v. come into possession of
653+occasion - n. a vaguely specified social event
654+odor - n. the sensation that results when olfactory receptors in the nose are stimulated by particular chemicals in gaseous form
655+ominous - j. threatening or foreshadowing evil or tragic developments
656+operate - v. handle and cause to function
657+operator - n. an agent that operates some apparatus or machine
658+opinion - n. a personal belief or judgment that is not founded on proof or certainty
659+opponent - n. a contestant that you are matched against
660+opportunity - n. a possibility due to a favorable combination of circumstances
661+optimism - n. a general disposition to expect the best in all things
662+option - n. one of a number of things from which only one can be chosen
663+oral - j. of or relating to or affecting or for use in the mouth
664+ordeal - n. a severe or trying experience
665+ornate - j. marked by elaborate rhetoric and elaborated with decorative details
666+orthodox - j. adhering to what is commonly accepted
667+outbreak - n. a sudden violent spontaneous occurrence (usually of some undesirable condition)
668+outcry - n. a loud utterance; often in protest or opposition
669+outrage - n. a feeling of righteous anger
670+outrageous - j. grossly offensive to decency or morality; causing horror
671+outright - a. without reservation or concealment
672+overhaul - v. make repairs, renovations, revisions or adjustments to
673+oversee - v. watch and direct
674+overthrow - n. the termination of a ruler or institution (especially by force)
675+overweight - n. the property of excessive fatness
676+pact - n. a written agreement between two states or sovereigns
677+pageant - n. a rich and spectacular ceremony
678+panic - n. an overwhelming feeling of fear and anxiety
679+pantheon - n. all the gods of a religion
680+paradox - n. (logic) a statement that contradicts itself
681+parallel - j. being everywhere equidistant and not intersecting
682+parish - n. a local church community
683+parliament - n. a legislative assembly in certain countries
684+parody - v. make a spoof of or make fun of
685+participant - n. someone who takes part in an activity
686+participate - v. become a participant; be involved in
687+partisan - n. an ardent and enthusiastic supporter of some person or activity
688+partition - v. divide into parts, pieces, or sections
689+passive - j. lacking in energy or will
690+patriotism - n. love of country and willingness to sacrifice for it
691+patron - n. someone who supports or champions something
692+pavilion - n. large and often sumptuous tent
693+peaceful - j. not disturbed by strife or turmoil or war
694+pedestrian - j. lacking wit or imagination
695+penalty - n. a punishment for a crime or offense
696+penchant - n. a strong liking
697+pennant - n. a long flag; often tapering
698+pension - n. a regular payment to a person that is intended to allow them to subsist without working
699+pentagon - n. a five-sided polygon
700+perceive - v. to become aware of or conscious of
701+perception - n. becoming aware of something via the senses
702+perennial - j. lasting an indefinitely long time; suggesting self-renewal
703+perform - v. carry out or perform an action
704+perjury - n. criminal offense of making false statements under oath
705+permanent - j. continuing or enduring without marked change in status or condition or place
706+perpetual - j. continuing forever or indefinitely
707+persist - v. be persistent, refuse to stop
708+personal - j. concerning or affecting a particular person or his or her private life and personality
709+personality - n. the complex of all the attributes--behavioral, temperamental, emotional and mental--that characterize a unique individual
710+personnel - n. persons collectively in the employ of a business
711+perspective - n. the appearance of things relative to one another as determined by their distance from the viewer
712+persuade - v. cause somebody to adopt a certain position, belief, or course of action; twist somebody's arm
713+pervasive - j. spreading or spread throughout
714+petty - j. contemptibly narrow in outlook
715+phenomenal - j. exceedingly or unbelievably great
716+phenomenon - n. any state or process known through the senses rather than by intuition or reasoning
717+philharmonic - j. composing or characteristic of an orchestral group
718+philosophy - n. any personal belief about how to live or how to deal with a situation
719+physicist - n. a scientist trained in physics
720+physics - n. the science of matter and energy and their interactions
721+pinch - n. a squeeze with the fingers
722+pine - n. straight-grained white to yellowish tree
723+pioneer - v. open up and explore a new area
724+pivotal - j. being of crucial importance
725+plausible - j. apparently reasonable and valid, and truthful
726+playful - j. full of fun and high spirits
727+playwright - n. someone who writes plays
728+plea - n. a humble request for help from someone in authority
729+plead - v. appeal or request earnestly
730+pleasant - j. affording pleasure; being in harmony with your taste or likings
731+plunge - v. fall abruptly
732+poetic - j. of or relating to poetry
733+poignant - j. arousing emotions; touching
734+poised - j. in full control of your faculties
735+portfolio - n. a set of pieces of creative work collected to be shown to potential customers or employers
736+positive - j. characterized by or displaying affirmation or acceptance or certainty etc.
737+possess - v. have as an attribute, knowledge, or skill
738+possession - n. the act of having and controlling property
739+potent - j. having a strong physiological or chemical effect
740+potential - j. existing in possibility
741+precedent - n. an example that is used to justify similar occurrences at a later time
742+precise - j. sharply exact or accurate or delimited
743+precision - n. the quality of being reproducible in amount or performance
744+predecessor - n. one who precedes you in time (as in holding a position or office)
745+predict - v. make a prediction about; tell in advance
746+prediction - n. a statement made about the future
747+prefer - v. like better; value more highly
748+preference - n. a strong liking
749+prejudice - n. a partiality that prevents objective consideration of an issue or situation
750+premature - j. too soon or too hasty
751+premier - v. be performed for the first time
752+premise - v. set forth beforehand, often as an explanation
753+preparation - n. the activity of putting or setting in order in advance of some act or purpose
754+preposterous - j. incongruous; inviting ridicule
755+prescription - n. written instructions from a physician or dentist to a druggist concerning the form and dosage of a drug to be issued to a given patient
756+preservation - n. the activity of protecting something from loss or danger
757+pretentious - j. making claim to or creating an appearance of (often undeserved) importance or distinction
758+prevalent - j. most frequent or common
759+prevention - n. the act of preventing
760+primer - n. an introductory textbook
761+primitive - j. belonging to an early stage of technical development; characterized by simplicity and (often) crudeness
762+principal - n. the educator who has executive authority for a school
763+principle - n. a basic truth or law or assumption
764+principled - j. based on or manifesting objectively defined standards of rightness or morality
765+pristine - j. completely free from dirt or contamination
766+privilege - n. a special advantage or immunity or benefit not enjoyed by all
767+probation - n. (law) a way of dealing with offenders without imprisoning them; a defendant found guilty of a crime is released by the court without imprisonment subject to conditions imposed by the court
768+probe - v. question or examine thoroughly and closely
769+procedure - n. a process or series of acts especially of a practical or mechanical nature involved in a particular form of work
770+proceed - v. move ahead; travel onward in time or space
771+productive - j. producing or capable of producing (especially abundantly)
772+profession - n. an occupation requiring special education (especially in the liberal arts or sciences)
773+professor - n. someone who is a member of the faculty at a college or university
774+profile - n. an outline of something (especially a human face as seen from one side)
775+progressive - j. favoring or promoting progress
776+prohibition - n. the action of prohibiting or inhibiting or forbidding (or an instance thereof)
777+prolific - j. bearing in abundance especially offspring
778+promenade - n. a public area set aside as a pedestrian walk
779+prominence - n. relative importance
780+prominent - j. having a quality that thrusts itself into attention
781+promoter - n. someone who is an active supporter and advocate
782+prone - j. having a tendency (to); often used in combination
783+propaganda - n. information that is spread for the purpose of promoting some cause
784+prophet - n. someone who speaks by divine inspiration; someone who is an interpreter of the will of God
785+protagonist - n. the principal character in a work of fiction
786+protection - n. the activity of protecting someone or something
787+protective - j. intended or adapted to afford protection of some kind
788+protestant - j. of or relating to Protestants or Protestantism
789+provincial - j. characteristic of the provinces or their people
790+provoke - v. evoke or provoke to appear or occur
791+proxy - n. a person authorized to act for another
792+prudence - n. knowing how to avoid embarrassment or distress
793+psychic - j. outside the sphere of physical science
794+pundit - n. someone who has been admitted to membership in a scholarly field
795+quake - v. shake with fast, tremulous movements
796+qualify - v. make fit or prepared
797+quarterly - a. in three month intervals
798+radical - j. markedly new or introducing extreme change
799+rampant - j. unrestrained and violent
800+rapid - j. characterized by speed; moving with or capable of moving with high speed
801+rave - v. praise enthusiastically
802+reaction - n. a response that reveals a person's feelings or attitude
803+readily - a. without much difficulty
804+realism - n. the attribute of accepting the facts of life and favoring practicality and literal truth
805+recipient - n. a person who receives something
806+reckless - j. characterized by careless unconcern
807+recognize - v. detect with the senses
808+reconcile - v. come to terms
809+reconsider - v. consider again; give new consideration to; usually with a view to changing
810+recover - v. get or find back; recover the use of
811+recruit - v. cause to assemble or enlist in the military
812+redemption - n. (theology) the act of delivering from sin or saving from evil
813+refer - v. send or direct for treatment, information, or a decision
814+reflection - n. the image of something as reflected by a mirror (or other reflective material)
815+reform - v. make changes for improvement in order to remove abuse and injustices
816+refuge - n. a shelter from danger or hardship
817+refusal - n. the act of not accepting something that is offered
818+regime - n. the government or governing authority of a political unit
819+regional - j. related or limited to a particular region
820+reign - v. have sovereign power
821+relevant - j. having a bearing on or connection with the subject at issue
822+reliant - j. depending on another for support
823+reluctance - n. a certain degree of unwillingness
824+reluctant - j. not eager
825+reminiscent - j. serving to bring to mind
826+renaissance - n. the period of European history at the close of the Middle Ages and the rise of the modern world; a cultural rebirth from the 14th through the middle of the 17th centuries
827+render - v. give or supply
828+renowned - j. widely known and esteemed
829+repeal - n. cancel officially
830+reproduction - n. the act of making copies
831+requisite - n. anything indispensable
832+resemblance - n. similarity in appearance or external or superficial details
833+resent - v. feel bitter or indignant about
834+resist - v. withstand the force of something
835+resistance - n. the action of opposing something that you disapprove or disagree with
836+resistant - j. impervious to being affected
837+resort - v. have recourse to
838+resource - n. a source of aid or support that may be drawn upon when needed
839+restore - v. bring back into original existence, use, function, or position
840+resurrection - n. (New Testament) the rising of Christ on the third day after the Crucifixion
841+retrospect - n. contemplation of things past
842+retrospective - j. concerned with or related to the past
843+revelation - n. communication of knowledge to man by a divine or supernatural agency
844+revive - v. be brought back to life, consciousness, or strength
845+rhetoric - n. using language effectively to please or persuade
846+ridiculous - j. incongruous; absurd; nonsensical
847+rigorous - j. demanding strict attention to rules and procedures
848+robust - j. sturdy and strong in form, constitution, or construction
849+rue - n. sadness associated with some wrong done or some disappointment
850+rural - j. living in or characteristic of farming or country life
851+rustic - j. characteristic of the fields or country
852+sacrifice - v. kill or destroy
853+savage - v. criticize harshly or violently
854+scholarly - j. characteristic of learning or studying
855+scope - n. an area in which something acts or operates or has power or control
856+script - n. a written version of a play or other dramatic composition; used in preparing for a performance
857+secession - n. formal separation from an alliance or federation
858+secondary - j. not of major importance
859+secrecy - n. the trait of keeping things secret
860+secular - j. not concerned with or devoted to religion
861+seize - v. take hold of; grab
862+selective - j. characterized by very careful or fastidious choices
863+seminar - n. any meeting for an exchange of ideas
864+sensation - n. a perception associated with stimulation of a sensory organ
865+sensibility - n. refined sensitivity to pleasurable or painful impressions
866+sensitive - j. responsive to physical stimuli
867+sentence - n. the period of time a prisoner is imprisoned
868+sentinel - n. a person employed to keep watch for some anticipated event
869+sequel - n. a part added to a book or play that continues and extends it
870+sequence - n. serial arrangement in which things follow in logical order or a recurrent pattern
871+sergeant - n. any of several noncommissioned officer ranks in the Army or Air Force or Marines ranking above a corporal
872+servitude - n. state of subjection to an owner or master or forced labor imposed as punishment
873+severely - a. with sternness; in a severe manner
874+shallow - j. lacking depth of intellect or knowledge; concerned only with what is obvious
875+sheer - j. complete and without restriction or qualification
876+shrewd - j. marked by practical hardheaded intelligence
877+siege - n. the action of an armed force that surrounds a fortified place and isolates it while continuing to attack
878+significance - n. the quality of being important in effect or meaning
879+significant - j. important in effect or meaning
880+similar - j. having close to the same characteristics
881+sinister - j. stemming from evil characteristics or forces; wicked or dishonorable
882+skepticism - n. the disbelief in any claims of ultimate knowledge
883+slack - j. not tense or taut
884+slight - n. a deliberate discourteous act (usually as an expression of anger or disapproval)
885+sober - v. become more realistic
886+socialism - n. a political theory advocating state ownership of industry
887+socialist - j. advocating or following the socialist principles of state ownership
888+sociology - n. the study and classification of human societies
889+solar - j. relating to or derived from the sun or utilizing the energies of the sun
890+soldier - n. an enlisted man or woman who serves in an army
891+somber - j. grave or even gloomy in character
892+sophisticated - j. having or appealing to those having worldly knowledge and refinement
893+souvenir - n. a reminder of past events
894+specialty - n. an asset of special worth or utility
895+species - n. (biology) taxonomic group whose members can interbreed
896+spectator - n. a close observer; someone who looks at something (such as an exhibition of some kind)
897+specter - n. a ghostly appearing figure
898+spectrum - n. a broad range of related objects or ideas or activities
899+speculate - v. consider in an idle or casual way and with an element of doubt or without sufficient reason to reach a conclusion
900+spontaneous - j. said or done without having been planned or written in advance
901+static - j. showing little if any change
902+stature - n. high level of respect gained by impressive development or achievement
903+statute - n. an act passed by a legislative body
904+stealth - n. avoiding detection by moving carefully
905+stimulate - v. cause to be alert and energetic
906+stringent - j. demanding strict attention to rules and procedures
907+submission - n. something (manuscripts or architectural plans and models or estimates or works of art of all genres etc.) submitted for the judgment of others (as in a competition)
908+subsequent - j. following in time or order
909+subsidiary - j. functioning in a supporting capacity
910+substantive - j. having a firm basis in reality and being therefore important, meaningful, or considerable
911+subtle - j. difficult to detect or grasp by the mind or analyze
912+successor - n. a person who follows next in order
913+summary - n. a brief statement that presents the main points in a concise form
914+superb - j. of surpassing excellence
915+superficial - j. concerned with or comprehending only what is apparent or obvious; not deep or penetrating emotionally or intellectually
916+suppress - v. reduce the incidence or severity of or stop
917+surround - v. extend on all sides of simultaneously; encircle
918+suspense - n. excited anticipation of an approaching climax
919+suspension - n. an interruption in the intensity or amount of something
920+suspicious - j. openly distrustful and unwilling to confide
921+sympathetic - j. expressing or feeling or resulting from sympathy or compassion or friendly fellow feelings; disposed toward
922+symphony - n. a large orchestra; can perform symphonies
923+systematic - j. characterized by order and planning
924+tactics - n. the branch of military science dealing with detailed maneuvers to achieve objectives set by strategy
925+tangible - j. perceptible by the senses especially the sense of touch
926+taxation - n. the imposition of taxes; the practice of the government in levying taxes on the subjects of a state
927+technique - n. skillfulness in the command of fundamentals deriving from practice and familiarity
928+technology - n. the practical application of science to commerce or industry
929+telescope - n. a magnifier of images of distant objects
930+temporary - j. not permanent; not lasting
931+tendency - n. a characteristic likelihood of or natural disposition toward a certain condition or character or effect
932+tense - j. taut or rigid; stretched tight
933+tentative - j. unsettled in mind or opinion
934+tenure - v. give life-time employment to
935+terminal - j. being or situated at an end
936+territorial - j. displaying territoriality; defending an area from intruders
937+testament - n. a profession of belief
938+theological - j. of or relating to or concerning the study of religion
939+theology - n. the rational and systematic study of religion and its influences and of the nature of religious truth
940+theoretical - j. concerned with theories rather than their practical applications
941+theorist - n. someone who theorizes (especially in science or art)
942+thesis - n. a formal paper advancing a new point of view resulting from research; usually a requirement for an advanced academic degree
943+titanic - j. of great force or power
944+tolerance - n. willingness to recognize and respect the beliefs or practices of others
945+tolerant - j. showing respect for the rights or opinions or practices of others
946+tolerate - v. recognize and respect (rights and beliefs of others)
947+transcript - n. something that has been transcribed; a written record (usually typewritten) of dictated or recorded speech
948+transfer - v. move from one place to another
949+transition - v. make or undergo a transition (from one state or system to another)
950+translate - v. restate (words) from one language into another language
951+transmission - n. the act of sending a message; causing a message to be transmitted
952+transparent - j. transmitting light; able to be seen through with clarity
953+transplant - n. the act of removing something from one location and introducing it in another location
954+tremendous - j. extraordinarily large in size or extent or amount or power or degree
955+tribune - n. a protector of the people
956+trinity - n. the union of the Father and Son and Holy Ghost in one Godhead
957+triple - v. increase threefold
958+trivial - j. of little substance or significance
959+truthful - j. expressing or given to expressing the truth
960+turmoil - n. a violent disturbance
961+typical - j. exhibiting the qualities or characteristics that identify a group or kind or category
962+ubiquitous - j. being present everywhere at once
963+ultimate - j. furthest or highest in degree or order; utmost or extreme
964+unanimous - j. acting together as a single undiversified whole
965+uncommon - j. not common or ordinarily encountered; unusually great in amount or remarkable in character or kind
966+unconscious - j. not conscious; lacking awareness and the capacity for sensory perception as if asleep or dead
967+undermine - v. destroy property or hinder normal operations
968+unique - j. the single one of its kind
969+unlimited - j. having no limits in range or scope
970+unprecedented - j. having no previous example; novel
971+urban - j. located in or characteristic of a city or city life
972+urgency - n. an urgent situation calling for prompt action
973+usage - n. the act of using
974+utility - n. the quality of being of practical use
975+vacuum - n. a region that is devoid of matter
976+valid - j. well grounded in logic or truth or having legal force
977+variation - n. an artifact that deviates from a norm or standard
978+vegetarian - n. eater of fruits and grains and nuts; someone who eats no meat or fish or (often) any animal products
979+vegetation - n. all the plant life in a particular region or period
980+venerable - j. impressive by reason of age
981+verify - v. confirm the truth of
982+version - n. something a little different from others of the same type
983+vertical - j. at right angles to the plane of the horizon or a base line
984+veto - n. the power or right to prohibit or reject a proposed or intended act (especially the power of a chief executive to reject a bill passed by the legislature)
985+vigorous - j. strong and active physically or mentally
986+violation - n. an act that disregards an agreement or a right
987+vista - n. the visual percept of a region
988+visual - j. relating to or using sight
989+vitality - n. an energetic style
990+vogue - n. the popular taste at a given time
991+volatile - j. liable to lead to sudden change or violence
992+vulnerable - j. capable of being wounded or hurt
993+warrant - v. stand behind and guarantee the quality, accuracy, or condition of
994+wherever - a. where in the world
995+wholly - a. to a complete degree or to the full or entire extent ('whole' is often used informally for 'wholly')
996+woo - v. seek someone's favor
997+zeal - n. excessive fervor to do something or accomplish some end
--- /dev/null
+++ b/samples/SearchableDictionary/res/values/strings.xml
@@ -0,0 +1,38 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+/*
4+** Copyright 2009, The Android Open Source Project
5+**
6+** Licensed under the Apache License, Version 2.0 (the "License");
7+** you may not use this file except in compliance with the License.
8+** You may obtain a copy of the License at
9+**
10+** http://www.apache.org/licenses/LICENSE-2.0
11+**
12+** Unless required by applicable law or agreed to in writing, software
13+** distributed under the License is distributed on an "AS IS" BASIS,
14+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+** See the License for the specific language governing permissions and
16+** limitations under the License.
17+*/
18+-->
19+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
20+
21+ <!-- The name of the application. -->
22+ <string name="app_name">Searchable Dictionary</string>
23+
24+ <!-- The label for the search results for this app (see searchable.xml for more details). -->
25+ <string name="search_label">Dictionary</string>
26+
27+ <!-- The menu entry that invokes search. -->
28+ <string name="menu_search">Search</string>
29+
30+ <!-- The description that will show up in the search settings for this source. -->
31+ <string name="settings_description">Definitions of words</string>
32+
33+ <!-- General instructions in the main activity. -->
34+ <string name="search_instructions">Press the search key to look up a word</string>
35+
36+ <!-- Shown above search results when we receive a search request. -->
37+ <string name="search_results">Search results for \'<xliff:g id="string">%s</xliff:g>\': </string>
38+</resources>
--- /dev/null
+++ b/samples/SearchableDictionary/res/xml/searchable.xml
@@ -0,0 +1,40 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!--
3+/*
4+** Copyright 2009, The Android Open Source Project
5+**
6+** Licensed under the Apache License, Version 2.0 (the "License");
7+** you may not use this file except in compliance with the License.
8+** You may obtain a copy of the License at
9+**
10+** http://www.apache.org/licenses/LICENSE-2.0
11+**
12+** Unless required by applicable law or agreed to in writing, software
13+** distributed under the License is distributed on an "AS IS" BASIS,
14+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+** See the License for the specific language governing permissions and
16+** limitations under the License.
17+*/
18+-->
19+
20+<!-- The attributes below configure how the search results will work:
21+ - the 'label' points to a short description used when searching within the application if
22+ 'badge mode' is used as specified with android:searchMode="useLabelAsBadge" (which it is not for
23+ this application).
24+ - the 'searchSettingsDescription' points to a string that will be displayed underneath the
25+ name of this application in the search settings to describe what content will be searched.
26+ - 'includeInGlobalSearch' will include this app's search suggestions in Quick Search Box.
27+ - 'searchSuggestAuthority' specifies the authority matching the authority of the
28+ "DictionaryProvider" specified in the manifest. This means the DictionaryProvider will be
29+ queried for search suggestions.
30+ - 'searchSuggestIntentAction' the default intent action used in the intent that is launched based
31+ on a user cilcking on a search suggestion. This saves us from manually having to fill in the
32+ SUGGEST_COLUMN_INTENT_ACTION column for each suggestion returned by the provider.
33+ -->
34+<searchable xmlns:android="http://schemas.android.com/apk/res/android"
35+ android:label="@string/search_label"
36+ android:searchSettingsDescription="@string/settings_description"
37+ android:includeInGlobalSearch="true"
38+ android:searchSuggestAuthority="dictionary"
39+ android:searchSuggestIntentAction="android.intent.action.VIEW">
40+</searchable>
--- /dev/null
+++ b/samples/SearchableDictionary/src/com/example/android/searchabledict/Dictionary.java
@@ -0,0 +1,130 @@
1+/*
2+ * Copyright (C) 2009 The Android Open Source Project
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+package com.example.android.searchabledict;
18+
19+import android.content.res.Resources;
20+import android.text.TextUtils;
21+import android.util.Log;
22+
23+import java.io.BufferedReader;
24+import java.io.IOException;
25+import java.io.InputStream;
26+import java.io.InputStreamReader;
27+import java.util.ArrayList;
28+import java.util.Collections;
29+import java.util.List;
30+import java.util.Map;
31+import java.util.concurrent.ConcurrentHashMap;
32+
33+/**
34+ * Contains logic to load the word of words and definitions and find a list of matching words
35+ * given a query. Everything is held in memory; this is not a robust way to serve lots of
36+ * words and is only for demo purposes.
37+ *
38+ * You may want to consider using an SQLite database. In practice, you'll want to make sure your
39+ * suggestion provider is as efficient as possible, as the system will be taxed while performing
40+ * searches across many sources for each keystroke the user enters into Quick Search Box.
41+ */
42+public class Dictionary {
43+
44+ public static class Word {
45+ public final String word;
46+ public final String definition;
47+
48+ public Word(String word, String definition) {
49+ this.word = word;
50+ this.definition = definition;
51+ }
52+ }
53+
54+ private static final Dictionary sInstance = new Dictionary();
55+
56+ public static Dictionary getInstance() {
57+ return sInstance;
58+ }
59+
60+ private final Map<String, List<Word>> mDict = new ConcurrentHashMap<String, List<Word>>();
61+
62+ private Dictionary() {
63+ }
64+
65+ private boolean mLoaded = false;
66+
67+ /**
68+ * Loads the words and definitions if they haven't been loaded already.
69+ *
70+ * @param resources Used to load the file containing the words and definitions.
71+ */
72+ public synchronized void ensureLoaded(final Resources resources) {
73+ if (mLoaded) return;
74+
75+ new Thread(new Runnable() {
76+ public void run() {
77+ try {
78+ loadWords(resources);
79+ } catch (IOException e) {
80+ throw new RuntimeException(e);
81+ }
82+ }
83+ }).start();
84+ }
85+
86+ private synchronized void loadWords(Resources resources) throws IOException {
87+ if (mLoaded) return;
88+
89+ Log.d("dict", "loading words");
90+ InputStream inputStream = resources.openRawResource(R.raw.definitions);
91+ BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
92+
93+ try {
94+ String line;
95+ while((line = reader.readLine()) != null) {
96+ String[] strings = TextUtils.split(line, "-");
97+ if (strings.length < 2) continue;
98+ addWord(strings[0].trim(), strings[1].trim());
99+ }
100+ } finally {
101+ reader.close();
102+ }
103+ mLoaded = true;
104+ }
105+
106+
107+ public List<Word> getMatches(String query) {
108+ List<Word> list = mDict.get(query);
109+ return list == null ? Collections.EMPTY_LIST : list;
110+ }
111+
112+ private void addWord(String word, String definition) {
113+ final Word theWord = new Word(word, definition);
114+
115+ final int len = word.length();
116+ for (int i = 0; i < len; i++) {
117+ final String prefix = word.substring(0, len - i);
118+ addMatch(prefix, theWord);
119+ }
120+ }
121+
122+ private void addMatch(String query, Word word) {
123+ List<Word> matches = mDict.get(query);
124+ if (matches == null) {
125+ matches = new ArrayList<Word>();
126+ mDict.put(query, matches);
127+ }
128+ matches.add(word);
129+ }
130+}
--- /dev/null
+++ b/samples/SearchableDictionary/src/com/example/android/searchabledict/DictionaryProvider.java
@@ -0,0 +1,160 @@
1+/*
2+ * Copyright (C) 2009 The Android Open Source Project
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+package com.example.android.searchabledict;
18+
19+import android.app.SearchManager;
20+import android.content.ContentProvider;
21+import android.content.ContentValues;
22+import android.content.UriMatcher;
23+import android.content.res.Resources;
24+import android.database.Cursor;
25+import android.database.MatrixCursor;
26+import android.net.Uri;
27+import android.text.TextUtils;
28+
29+import java.util.List;
30+
31+/**
32+ * Provides search suggestions for a list of words and their definitions.
33+ */
34+public class DictionaryProvider extends ContentProvider {
35+
36+ public static String AUTHORITY = "dictionary";
37+
38+ private static final int SEARCH_SUGGEST = 0;
39+ private static final int SHORTCUT_REFRESH = 1;
40+ private static final UriMatcher sURIMatcher = buildUriMatcher();
41+
42+ /**
43+ * The columns we'll include in our search suggestions. There are others that could be used
44+ * to further customize the suggestions, see the docs in {@link SearchManager} for the details
45+ * on additional columns that are supported.
46+ */
47+ private static final String[] COLUMNS = {
48+ "_id", // must include this column
49+ SearchManager.SUGGEST_COLUMN_TEXT_1,
50+ SearchManager.SUGGEST_COLUMN_TEXT_2,
51+ SearchManager.SUGGEST_COLUMN_INTENT_DATA,
52+ };
53+
54+
55+ /**
56+ * Sets up a uri matcher for search suggestion and shortcut refresh queries.
57+ */
58+ private static UriMatcher buildUriMatcher() {
59+ UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);
60+ matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_QUERY, SEARCH_SUGGEST);
61+ matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_QUERY + "/*", SEARCH_SUGGEST);
62+ matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_SHORTCUT, SHORTCUT_REFRESH);
63+ matcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_SHORTCUT + "/*", SHORTCUT_REFRESH);
64+ return matcher;
65+ }
66+
67+ @Override
68+ public boolean onCreate() {
69+ Resources resources = getContext().getResources();
70+ Dictionary.getInstance().ensureLoaded(resources);
71+ return true;
72+ }
73+
74+ @Override
75+ public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
76+ String sortOrder) {
77+ if (!TextUtils.isEmpty(selection)) {
78+ throw new IllegalArgumentException("selection not allowed for " + uri);
79+ }
80+ if (selectionArgs != null && selectionArgs.length != 0) {
81+ throw new IllegalArgumentException("selectionArgs not allowed for " + uri);
82+ }
83+ if (!TextUtils.isEmpty(sortOrder)) {
84+ throw new IllegalArgumentException("sortOrder not allowed for " + uri);
85+ }
86+ switch (sURIMatcher.match(uri)) {
87+ case SEARCH_SUGGEST:
88+ String query = null;
89+ if (uri.getPathSegments().size() > 1) {
90+ query = uri.getLastPathSegment().toLowerCase();
91+ }
92+ return getSuggestions(query, projection);
93+ case SHORTCUT_REFRESH:
94+ String shortcutId = null;
95+ if (uri.getPathSegments().size() > 1) {
96+ shortcutId = uri.getLastPathSegment();
97+ }
98+ return refreshShortcut(shortcutId, projection);
99+ default:
100+ throw new IllegalArgumentException("Unknown URL " + uri);
101+ }
102+ }
103+
104+ private Cursor getSuggestions(String query, String[] projection) {
105+ String processedQuery = query == null ? "" : query.toLowerCase();
106+ List<Dictionary.Word> words = Dictionary.getInstance().getMatches(processedQuery);
107+
108+ MatrixCursor cursor = new MatrixCursor(COLUMNS);
109+ for (Dictionary.Word word : words) {
110+ cursor.addRow(columnValuesOfWord(word));
111+ }
112+
113+ return cursor;
114+ }
115+
116+ private Object[] columnValuesOfWord(Dictionary.Word word) {
117+ return new String[] {
118+ word.word, // _id
119+ word.word, // text1
120+ word.definition, // text2
121+ word.word, // intent_data (included when clicking on item)
122+ };
123+ }
124+
125+ /**
126+ * Note: this is unused as is, but if we included
127+ * {@link SearchManager#SUGGEST_COLUMN_SHORTCUT_ID} as a column in our results, we
128+ * could expect to receive refresh queries on this uri for the id provided, in which case we
129+ * would return a cursor with a single item representing the refreshed suggestion data.
130+ */
131+ private Cursor refreshShortcut(String shortcutId, String[] projection) {
132+ return null;
133+ }
134+
135+ /**
136+ * All queries for this provider are for the search suggestion and shortcut refresh mime type.
137+ */
138+ public String getType(Uri uri) {
139+ switch (sURIMatcher.match(uri)) {
140+ case SEARCH_SUGGEST:
141+ return SearchManager.SUGGEST_MIME_TYPE;
142+ case SHORTCUT_REFRESH:
143+ return SearchManager.SHORTCUT_MIME_TYPE;
144+ default:
145+ throw new IllegalArgumentException("Unknown URL " + uri);
146+ }
147+ }
148+
149+ public Uri insert(Uri uri, ContentValues values) {
150+ throw new UnsupportedOperationException();
151+ }
152+
153+ public int delete(Uri uri, String selection, String[] selectionArgs) {
154+ throw new UnsupportedOperationException();
155+ }
156+
157+ public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
158+ throw new UnsupportedOperationException();
159+ }
160+}
--- /dev/null
+++ b/samples/SearchableDictionary/src/com/example/android/searchabledict/SearchableDictionary.java
@@ -0,0 +1,155 @@
1+/*
2+ * Copyright (C) 2009 The Android Open Source Project
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+package com.example.android.searchabledict;
18+
19+import android.app.Activity;
20+import android.app.SearchManager;
21+import android.content.Context;
22+import android.content.Intent;
23+import android.os.Bundle;
24+import android.text.TextUtils;
25+import android.util.Log;
26+import android.view.LayoutInflater;
27+import android.view.View;
28+import android.view.ViewGroup;
29+import android.view.Menu;
30+import android.view.MenuItem;
31+import android.widget.AdapterView;
32+import android.widget.BaseAdapter;
33+import android.widget.ListView;
34+import android.widget.TextView;
35+import android.widget.TwoLineListItem;
36+
37+import java.util.List;
38+
39+/**
40+ * The main activity for the dictionary. Also displays search results triggered by the search
41+ * dialog.
42+ */
43+public class SearchableDictionary extends Activity {
44+
45+ private static final int MENU_SEARCH = 1;
46+
47+ private TextView mTextView;
48+ private ListView mList;
49+
50+ @Override
51+ public void onCreate(Bundle savedInstanceState) {
52+ super.onCreate(savedInstanceState);
53+
54+ Intent intent = getIntent();
55+
56+ setContentView(R.layout.main);
57+ mTextView = (TextView) findViewById(R.id.textField);
58+ mList = (ListView) findViewById(R.id.list);
59+
60+ if (Intent.ACTION_VIEW.equals(intent.getAction())) {
61+ // from click on search results
62+ Dictionary.getInstance().ensureLoaded(getResources());
63+ String word = intent.getDataString();
64+ Dictionary.Word theWord = Dictionary.getInstance().getMatches(word).get(0);
65+ launchWord(theWord);
66+ finish();
67+ } else if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
68+ String query = intent.getStringExtra(SearchManager.QUERY);
69+ mTextView.setText(getString(R.string.search_results, query));
70+ WordAdapter wordAdapter = new WordAdapter(Dictionary.getInstance().getMatches(query));
71+ mList.setAdapter(wordAdapter);
72+ mList.setOnItemClickListener(wordAdapter);
73+ }
74+
75+ Log.d("dict", intent.toString());
76+ if (intent.getExtras() != null) {
77+ Log.d("dict", intent.getExtras().keySet().toString());
78+ }
79+ }
80+
81+ @Override
82+ public boolean onCreateOptionsMenu(Menu menu) {
83+ menu.add(0, MENU_SEARCH, 0, R.string.menu_search)
84+ .setIcon(android.R.drawable.ic_search_category_default)
85+ .setAlphabeticShortcut(SearchManager.MENU_KEY);
86+
87+ return super.onCreateOptionsMenu(menu);
88+ }
89+
90+ @Override
91+ public boolean onOptionsItemSelected(MenuItem item) {
92+ switch (item.getItemId()) {
93+ case MENU_SEARCH:
94+ onSearchRequested();
95+ return true;
96+ }
97+ return super.onOptionsItemSelected(item);
98+ }
99+
100+ private void launchWord(Dictionary.Word theWord) {
101+ Intent next = new Intent();
102+ next.setClass(this, WordActivity.class);
103+ next.putExtra("word", theWord.word);
104+ next.putExtra("definition", theWord.definition);
105+ startActivity(next);
106+ }
107+
108+ class WordAdapter extends BaseAdapter implements AdapterView.OnItemClickListener {
109+
110+ private final List<Dictionary.Word> mWords;
111+ private final LayoutInflater mInflater;
112+
113+ public WordAdapter(List<Dictionary.Word> words) {
114+ mWords = words;
115+ mInflater = (LayoutInflater) SearchableDictionary.this.getSystemService(
116+ Context.LAYOUT_INFLATER_SERVICE);
117+ }
118+
119+ public int getCount() {
120+ return mWords.size();
121+ }
122+
123+ public Object getItem(int position) {
124+ return position;
125+ }
126+
127+ public long getItemId(int position) {
128+ return position;
129+ }
130+
131+ public View getView(int position, View convertView, ViewGroup parent) {
132+ TwoLineListItem view = (convertView != null) ? (TwoLineListItem) convertView :
133+ createView(parent);
134+ bindView(view, mWords.get(position));
135+ return view;
136+ }
137+
138+ private TwoLineListItem createView(ViewGroup parent) {
139+ TwoLineListItem item = (TwoLineListItem) mInflater.inflate(
140+ android.R.layout.simple_list_item_2, parent, false);
141+ item.getText2().setSingleLine();
142+ item.getText2().setEllipsize(TextUtils.TruncateAt.END);
143+ return item;
144+ }
145+
146+ private void bindView(TwoLineListItem view, Dictionary.Word word) {
147+ view.getText1().setText(word.word);
148+ view.getText2().setText(word.definition);
149+ }
150+
151+ public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
152+ launchWord(mWords.get(position));
153+ }
154+ }
155+}
--- /dev/null
+++ b/samples/SearchableDictionary/src/com/example/android/searchabledict/WordActivity.java
@@ -0,0 +1,49 @@
1+/*
2+ * Copyright (C) 2009 The Android Open Source Project
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+package com.example.android.searchabledict;
18+
19+import android.app.Activity;
20+import android.os.Bundle;
21+import android.widget.TextView;
22+import android.content.Intent;
23+
24+/**
25+ * Displays a word and its definition.
26+ */
27+public class WordActivity extends Activity {
28+
29+ private TextView mWord;
30+ private TextView mDefinition;
31+
32+ @Override
33+ protected void onCreate(Bundle savedInstanceState) {
34+ super.onCreate(savedInstanceState);
35+
36+ setContentView(R.layout.word);
37+
38+ mWord = (TextView) findViewById(R.id.word);
39+ mDefinition = (TextView) findViewById(R.id.definition);
40+
41+ Intent intent = getIntent();
42+
43+ String word = intent.getStringExtra("word");
44+ String definition = intent.getStringExtra("definition");
45+
46+ mWord.setText(word);
47+ mDefinition.setText(definition);
48+ }
49+}