File tree Expand file tree Collapse file tree 11 files changed +215
-2
lines changed
src/com/example/android/supportv4/widget Expand file tree Collapse file tree 11 files changed +215
-2
lines changed Original file line number Diff line number Diff line change 305
305
</intent-filter >
306
306
</activity >
307
307
308
+ <activity android : name =" .widget.SwipeRefreshLayoutActivity"
309
+ android : label =" @string/swipe"
310
+ android : theme =" @style/ThemeHoloLight" >
311
+ <intent-filter >
312
+ <action android : name =" android.intent.action.MAIN" />
313
+ <category android : name =" com.example.android.supportv4.SUPPORT4_SAMPLE_CODE" />
314
+ </intent-filter >
315
+ </activity >
316
+
308
317
<activity android : name =" .widget.ContentLoadingProgressBarActivity"
309
318
android : label =" @string/content_loading_progress_bar" >
310
319
<intent-filter >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <!-- Copyright (C) 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
+ <android .support.v4.widget.SwipeRefreshLayout xmlns : android =" http://schemas.android.com/apk/res/android"
18
+ android : id =" @+id/swipe_refresh_widget"
19
+ android : layout_width =" match_parent"
20
+ android : layout_height =" match_parent" >
21
+ <!-- some full screen pullable view that will be the offsetable content -->
22
+ <ListView
23
+ android : layout_width =" match_parent"
24
+ android : layout_height =" match_parent"
25
+ android : id =" @+id/content" />
26
+ </android .support.v4.widget.SwipeRefreshLayout>
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <!-- Copyright (C) 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/force_refresh"
19
+ android : showAsAction =" ifRoom"
20
+ android : icon =" @drawable/refresh"
21
+ android : title =" Refresh" />
22
+ </menu >
Original file line number Diff line number Diff line change 19
19
<style name =" ThemeHolo" parent =" android:Theme.Holo" >
20
20
</style >
21
21
22
+ <!-- For API level 11 or later, the Holo theme is available and we prefer that. -->
23
+ <style name =" ThemeHoloLight" parent =" android:Theme.Holo.Light" >
24
+ </style >
25
+
22
26
<!-- For API level 11 or later, we can use the magical DialogWhenLarge theme. -->
23
27
<style name =" ThemeDialogWhenLarge" parent =" android:style/Theme.Holo.DialogWhenLarge" >
24
28
</style >
Original file line number Diff line number Diff line change 18
18
<drawable name =" red" >#7f00</drawable >
19
19
<drawable name =" blue" >#770000ff</drawable >
20
20
<drawable name =" green" >#7700ff00</drawable >
21
- <drawable name =" yellow" >#77ffff00</drawable >
21
+ <drawable name =" yellow" >#77ffff00</drawable >
22
+ <color name =" color1" >#ff0f9d58</color >
23
+ <color name =" color2" >#ffdb4437</color >
24
+ <color name =" color3" >#ff4285f4</color >
25
+ <color name =" color4" >#fff4b400</color >
22
26
</resources >
Original file line number Diff line number Diff line change 176
176
<!-- ContentLoadingProgressBar -->
177
177
<string name =" content_loading_progress_bar" >Widget/Content Loading Progress Bar</string >
178
178
179
+ <!-- Swipe refresh -->
180
+ <string name =" swipe" >Widget/SwipeRefreshLayout</string >
179
181
</resources >
Original file line number Diff line number Diff line change 21
21
selected when the holographic theme is available. -->
22
22
<style name =" ThemeHolo" parent =" android:Theme" >
23
23
</style >
24
-
24
+
25
+ <!-- This is a theme that will adjust itself depending on the API version.
26
+ The default definition is the safe one, using a theme that has always
27
+ been defined. Look at values-11/styles.xml for a variation that is
28
+ selected when the holographic theme is available. -->
29
+ <style name =" ThemeHoloLight" parent =" android:Theme.Light" >
30
+ </style >
31
+
25
32
<!-- Older platforms don't have Theme.Holo.DialogWhenLarge; we will define
26
33
our own wrapper theme that uses it only when running on the appropriate
27
34
platform version. On older platforms, we always use the generic
You can’t perform that action at this time.
0 commit comments