Skip to content

Commit 44810e4

Browse files
committed
merging in branch (conflicts in manifest and in leveldb library )
2 parents d5e51ff + ab4754a commit 44810e4

30 files changed

+2442
-173
lines changed

AndroidManifest.xml

+27-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.example.hellojni"
4-
android:versionCode="1"
5-
android:versionName="1.0">
6-
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="11"/>
7-
<application android:label="@string/app_name"
8-
android:debuggable="true">
9-
<activity android:name="com.google.code.p.leveldb.LevelDB"
10-
android:label="@string/app_name">
11-
<intent-filter>
12-
<action android:name="android.intent.action.MAIN" />
13-
<category android:name="android.intent.category.LAUNCHER" />
14-
</intent-filter>
15-
</activity>
3+
package="com.google.code.p.leveldb"
4+
android:versionCode="1"
5+
android:versionName="1.0" >
6+
7+
<uses-sdk
8+
android:minSdkVersion="3"
9+
android:targetSdkVersion="11" />
10+
11+
<application android:label="@string/app_name" >
12+
13+
<!--
14+
<provider android:name="com.google.code.p.leveldb.provider.NotePadLevelDBProvider"
15+
android:authorities="com.google.provider.NotePad"
16+
/>
17+
-->
18+
19+
<provider
20+
android:name="com.google.code.p.leveldb.provider.LevelDBProvider"
21+
android:authorities="com.google.code.p.leveldb.provider.UnstructuredData" />
22+
23+
<!--
24+
<provider android:name="com.google.code.p.leveldb.provider.NotePadSQLiteProvider"
25+
android:authorities="com.google.provider.NotePad"
26+
/>
27+
-->
1628
</application>
17-
</manifest>
29+
30+
</manifest>

NotePadSample/AndroidManifest.xml

+160
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright (C) 2007 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<!--
19+
Declare the contents of this Android application. The namespace
20+
attribute brings in the Android platform namespace, and the package
21+
supplies a unique name for the application. When writing your
22+
own application, the package name must be changed from "com.example.*"
23+
to come from a domain that you own or have control over.
24+
-->
25+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
26+
package="com.example.android.notepad" >
27+
28+
<application
29+
android:icon="@drawable/app_notes"
30+
android:label="@string/app_name" >
31+
32+
<!-- <provider
33+
android:name="com.google.code.p.leveldb.provider.NotePadLevelDBProvider"
34+
android:authorities="com.google.provider.NotePad" />-->
35+
36+
<provider
37+
android:name="com.google.code.p.leveldb.provider.LevelDBProvider"
38+
android:authorities="com.google.code.p.leveldb.provider.UnstructuredData" />
39+
40+
<!--
41+
<provider android:name="com.google.code.p.leveldb.provider.NotePadSQLiteProvider"
42+
android:authorities="com.google.provider.NotePad"
43+
/>
44+
-->
45+
<activity
46+
android:name=".DBBenchmarkActivity"
47+
android:label="Benchmark Inserts" >
48+
<intent-filter>
49+
<action android:name="android.intent.action.MAIN" />
50+
51+
<category android:name="android.intent.category.LAUNCHER" />
52+
</intent-filter>
53+
</activity>
54+
<activity
55+
android:name="NotesList"
56+
android:label="@string/title_notes_list" >
57+
58+
<intent-filter>
59+
<action android:name="android.intent.action.VIEW" />
60+
<action android:name="android.intent.action.EDIT" />
61+
<action android:name="android.intent.action.PICK" />
62+
63+
<category android:name="android.intent.category.DEFAULT" />
64+
65+
<data android:mimeType="vnd.android.cursor.dir/vnd.google.note" />
66+
</intent-filter>
67+
<intent-filter>
68+
<action android:name="android.intent.action.GET_CONTENT" />
69+
70+
<category android:name="android.intent.category.DEFAULT" />
71+
72+
<data android:mimeType="vnd.android.cursor.item/vnd.google.note" />
73+
</intent-filter>
74+
</activity>
75+
<activity
76+
android:name="NoteEditor"
77+
android:configChanges="keyboardHidden|orientation"
78+
android:label="@string/title_note"
79+
android:screenOrientation="sensor"
80+
android:theme="@android:style/Theme.Light" >
81+
82+
<!--
83+
This filter says that we can view or edit the data of
84+
a single note
85+
-->
86+
<intent-filter android:label="@string/resolve_edit" >
87+
<action android:name="android.intent.action.VIEW" />
88+
<action android:name="android.intent.action.EDIT" />
89+
<action android:name="com.android.notepad.action.EDIT_NOTE" />
90+
91+
<category android:name="android.intent.category.DEFAULT" />
92+
93+
<data android:mimeType="vnd.android.cursor.item/vnd.google.note" />
94+
</intent-filter>
95+
96+
<!--
97+
This filter says that we can create a new note inside
98+
of a directory of notes.
99+
-->
100+
<intent-filter>
101+
<action android:name="android.intent.action.INSERT" />
102+
103+
<category android:name="android.intent.category.DEFAULT" />
104+
105+
<data android:mimeType="vnd.android.cursor.dir/vnd.google.note" />
106+
</intent-filter>
107+
</activity>
108+
<activity
109+
android:name="TitleEditor"
110+
android:label="@string/title_edit_title"
111+
android:theme="@android:style/Theme.Dialog"
112+
android:windowSoftInputMode="stateVisible" >
113+
114+
<!--
115+
This activity implements an alternative action that can be
116+
performed on notes: editing their title. It can be used as
117+
a default operation if the user invokes this action, and is
118+
available as an alternative action for any note data.
119+
-->
120+
<intent-filter android:label="@string/resolve_title" >
121+
122+
<!--
123+
This is the action we perform. It is a custom action we
124+
define for our application, not a generic VIEW or EDIT
125+
action since we are not a general note viewer/editor.
126+
-->
127+
<action android:name="com.android.notepad.action.EDIT_TITLE" />
128+
<!-- DEFAULT: execute if being directly invoked. -->
129+
<category android:name="android.intent.category.DEFAULT" />
130+
<!--
131+
ALTERNATIVE: show as an alternative action when the user is
132+
working with this type of data.
133+
-->
134+
<category android:name="android.intent.category.ALTERNATIVE" />
135+
<!--
136+
SELECTED_ALTERNATIVE: show as an alternative action the user
137+
can perform when selecting this type of data.
138+
-->
139+
<category android:name="android.intent.category.SELECTED_ALTERNATIVE" />
140+
<!-- This is the data type we operate on. -->
141+
<data android:mimeType="vnd.android.cursor.item/vnd.google.note" />
142+
</intent-filter>
143+
</activity>
144+
<activity
145+
android:name="NotesLiveFolder"
146+
android:icon="@drawable/live_folder_notes"
147+
android:label="@string/live_folder_name" >
148+
<intent-filter>
149+
<action android:name="android.intent.action.CREATE_LIVE_FOLDER" />
150+
151+
<category android:name="android.intent.category.DEFAULT" />
152+
</intent-filter>
153+
</activity>
154+
</application>
155+
156+
<uses-sdk
157+
android:minSdkVersion="3"
158+
android:targetSdkVersion="4" />
159+
160+
</manifest>

NotePadSample/assets/sample.json

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"_id": "33EE7A7F-45DF-40FD-B847-D46185A2AE0D",
3+
"_rev": "6-6993acafd1a0571e3e8c9f47471df84d",
4+
"utterance": "tusunayawan",
5+
"morphemes": "my morphemes",
6+
"gloss": "my gloss",
7+
"translation": "my translation",
8+
"grammaticalTags": "impulsative",
9+
"sessionID": 0,
10+
"status": {
11+
"statuses": [
12+
{
13+
"id": 1,
14+
"label": "Checked"
15+
},
16+
{
17+
"id": 2,
18+
"label": "To be checked",
19+
"selected": true
20+
},
21+
{
22+
"id": 3,
23+
"label": "Deleted"
24+
}
25+
],
26+
"active": 0,
27+
"defaultStatus": 0
28+
},
29+
"datumField": {
30+
"sessionID": 0,
31+
"user": "User",
32+
"informant": "",
33+
"language": "Language",
34+
"languageFamily": "Family",
35+
"dialect": "",
36+
"date": "Mon Jun 04 2012 16:07:24 GMT-0400 (EDT)",
37+
"goal": ""
38+
},
39+
"datumTag": {
40+
"script": "",
41+
"context": "",
42+
"semanticDenotation": "",
43+
"ipa": "",
44+
"segmentation": "tusu-naya-wa-n",
45+
"other": ""
46+
}
47+
}
3.85 KB
Loading
Loading
4.77 KB
Loading
1.43 KB
Loading
Loading
2.04 KB
Loading
Loading
2.81 KB
Loading
Loading
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (C) 2007 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+
<view xmlns:android="http://schemas.android.com/apk/res/android"
18+
class="com.example.android.notepad.NoteEditor$LinedEditText"
19+
android:id="@+id/note"
20+
android:layout_width="match_parent"
21+
android:layout_height="match_parent"
22+
android:background="@android:color/transparent"
23+
android:padding="5dip"
24+
android:scrollbars="vertical"
25+
android:fadingEdge="vertical"
26+
android:gravity="top"
27+
android:textSize="22sp"
28+
android:capitalize="sentences"
29+
/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (C) 2006 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+
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
18+
android:id="@android:id/text1"
19+
android:layout_width="match_parent"
20+
android:layout_height="?android:attr/listPreferredItemHeight"
21+
android:textAppearance="?android:attr/textAppearanceLarge"
22+
android:gravity="center_vertical"
23+
android:paddingLeft="5dip"
24+
android:singleLine="true"
25+
/>
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (C) 2007 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+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
18+
android:layout_width="wrap_content"
19+
android:layout_height="wrap_content"
20+
android:orientation="vertical"
21+
android:paddingLeft="6dip"
22+
android:paddingRight="6dip"
23+
android:paddingBottom="3dip">
24+
25+
<EditText android:id="@+id/title"
26+
android:maxLines="1"
27+
android:layout_marginTop="2dip"
28+
android:layout_width="wrap_content"
29+
android:ems="25"
30+
android:layout_height="wrap_content"
31+
android:autoText="true"
32+
android:capitalize="sentences"
33+
android:scrollHorizontally="true" />
34+
35+
<Button android:id="@+id/ok"
36+
android:layout_width="wrap_content"
37+
android:layout_height="wrap_content"
38+
android:layout_gravity="right"
39+
android:text="@string/button_ok" />
40+
41+
</LinearLayout>

NotePadSample/res/values/strings.xml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Copyright (C) 2007 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+
<resources>
18+
<string name="menu_delete">Delete</string>
19+
<string name="menu_insert">Add note</string>
20+
<string name="menu_revert">Revert</string>
21+
<string name="menu_discard">Discard</string>
22+
23+
<string name="resolve_edit">Edit note</string>
24+
<string name="resolve_title">Edit title</string>
25+
26+
<string name="title_create">Create note</string>
27+
<string name="title_edit">Edit note</string>
28+
<string name="title_notes_list">Note pad</string>
29+
<string name="title_note">Note</string>
30+
<string name="title_edit_title">Note title:</string>
31+
32+
<string name="app_name">Note Pad</string>
33+
<string name="live_folder_name">Notes</string>
34+
35+
<string name="button_ok">OK</string>
36+
37+
<string name="error_title">Error</string>
38+
<string name="error_message">Error loading note</string>
39+
</resources>

0 commit comments

Comments
 (0)