Skip to content

Commit a0b7965

Browse files
committed
Add updated StorageProvider sample, merge _index with existing file.
Change-Id: I63d691929d2b30cedaafa5ede900670c59d4f83d (cherry picked from commit 99acac3)
1 parent cbf0e91 commit a0b7965

File tree

20 files changed

+1061
-20
lines changed

20 files changed

+1061
-20
lines changed

samples/browseable/StorageProvider/_index.jd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
page.tags="StorageProvider"
1+
page.tags="Storage access framework", storage, documents
22
sample.group=Content
33
@jd:body
44

196 Bytes
Loading
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!--
2+
Copyright 2013 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+
<LinearLayout
17+
xmlns:android="http://schemas.android.com/apk/res/android"
18+
android:orientation="vertical"
19+
android:layout_width="fill_parent"
20+
android:layout_height="fill_parent"
21+
android:id="@+id/sample_main_layout">
22+
<TextView android:id="@+id/sample_output"
23+
style="@style/Widget.SampleMessage"
24+
android:layout_weight="1"
25+
android:layout_width="match_parent"
26+
android:layout_height="match_parent"
27+
android:text="@string/intro_message" />
28+
<View
29+
android:layout_width="fill_parent"
30+
android:layout_height="1dp"
31+
android:background="@android:color/darker_gray"/>
32+
<fragment
33+
android:name="com.example.android.common.logger.LogFragment"
34+
android:id="@+id/log_fragment"
35+
android:layout_weight="1"
36+
android:layout_width="match_parent"
37+
android:layout_height="match_parent" />
38+
</LinearLayout>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!--
2+
Copyright 2013 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+
<menu xmlns:android="http://schemas.android.com/apk/res/android">
18+
<item android:id="@+id/sample_action"
19+
android:showAsAction="ifRoom|withText"
20+
android:title="@string/sample_action" />
21+
</menu>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!--
2+
Copyright 2013 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+
19+
<!-- Semantic definitions -->
20+
21+
<dimen name="horizontal_page_margin">@dimen/margin_huge</dimen>
22+
<dimen name="vertical_page_margin">@dimen/margin_medium</dimen>
23+
24+
</resources>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!--
2+
Copyright 2013 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+
19+
<style name="Widget.SampleMessage">
20+
<item name="android:textAppearance">?android:textAppearanceLarge</item>
21+
<item name="android:lineSpacingMultiplier">1.2</item>
22+
<item name="android:shadowDy">-6.5</item>
23+
</style>
24+
25+
</resources>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2013 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+
<resources>
20+
<string name="log_in">Log in</string>
21+
<string name="log_out">Log out</string>
22+
<string name="logged_in_info">You are currently logged in, which means the documents in MyCloud are visible to other applications.</string>
23+
<string name="logged_out_info">You are currently logged out, so MyCloud is not visible as a document provider.</string>
24+
<string name="root_summary">cloudy with a chance of &#8230;</string>
25+
<string name="key_logged_in">logged_in</string>
26+
</resources>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright 2013 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+
20+
<resources>
21+
<string name="app_name">MyCloud</string>
22+
<string name="intro_message">
23+
<![CDATA[
24+
25+
26+
\nA simple implementation of a documents provider using the storage access framework in
27+
Android 4.4.
28+
29+
30+
]]>
31+
</string>
32+
</resources>
Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
Copyright 2013 The Android Open Source Project
3+
Copyright 2013 The Android Open Source Project
44
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
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
88
9-
http://www.apache.org/licenses/LICENSE-2.0
9+
http://www.apache.org/licenses/LICENSE-2.0
1010
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.
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.
1616
-->
1717

1818

19+
1920
<resources>
20-
<string name="log_in">Log in</string>
21-
<string name="log_out">Log out</string>
22-
<string name="logged_in_info">You are currently logged in, which means the documents in MyCloud are visible to other applications.</string>
23-
<string name="logged_out_info">You are currently logged out, so MyCloud is not visible as a document provider.</string>
24-
<string name="root_summary">cloudy with a chance of &#8230;</string>
25-
<string name="key_logged_in">logged_in</string>
21+
<string name="sample_action">Log in</string>
2622
</resources>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!--
2+
Copyright 2013 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+
19+
<!-- Define standard dimensions to comply with Holo-style grids and rhythm. -->
20+
21+
<dimen name="margin_tiny">4dp</dimen>
22+
<dimen name="margin_small">8dp</dimen>
23+
<dimen name="margin_medium">16dp</dimen>
24+
<dimen name="margin_large">32dp</dimen>
25+
<dimen name="margin_huge">64dp</dimen>
26+
27+
<!-- Semantic definitions -->
28+
29+
<dimen name="horizontal_page_margin">@dimen/margin_medium</dimen>
30+
<dimen name="vertical_page_margin">@dimen/margin_medium</dimen>
31+
32+
</resources>

0 commit comments

Comments
 (0)