Skip to content

Commit

Permalink
Android Support Library, revision 18 (July 2013)
Browse files Browse the repository at this point in the history
Changes for v4 support library:
  - User interface
    - Added BidiFormatter [1] for handling text strings that combine right to left and left to right-formatted text.
    - Modified ViewPager [2] to better handle cases where the pager has a measured width of zero in the initial layout processing.
    - Modified DrawerLayout [3] and SlidingPaneLayout [4] to not throw exceptions for measurement while the project code is being edited.
  - Accessibility
    - Added ExploreByTouchHelper [5] to simplify the implementation of accessibility for custom views.
    - Fixed a problem with ViewPager [2] incorrectly populating TYPE_VIEW_SCROLLED [6] accessibility events.
    - Fixed a null pointer exception in ViewPager [2] when populating an accessibility event.
    - Simplified AccessibilityNodeInfoCompat [7] by changing CharSequence [8] inputs to String [9] objects.
    - Deprecated an AccessibilityRecordCompat [10] constructor that used an Object [11] as input.
  - Media
    - Added TransportMediator [12] helper class to manage media transport control, such as play, pause, skip and other media actions.
    - Added DisplayManagerCompat [13] for managing display output to one or more device displays.
  - Other changes
    - Added WakefulBroadcastReceiver [14] helper class for implementing
      a common pattern of detecting a device wakeup event and passing work off to a Service [15] while ensuring that the device does not go back to sleep before the handoff is complete.
    - Added two new APIs, commitContentChanged() [16] and rollbackContentChanged() [17], to AsyncTaskLoader [18] to help deal with background updates for data changes that are subsequently canceled.

New v7 appcompat library:
  - Added ActionBar [19] to allow implementation of the action bar user interface design pattern [20] back to Android 2.1 (API level 7) and higher. Use of this class requires that you implement your activity by extending the new ActionBarActivity [21] class.

 [1] http://developer.android.com/reference/android/support/v4/text/BidiFormatter.html
 [2] http://developer.android.com/reference/android/support/v4/view/ViewPager.html
 [3] http://developer.android.com/reference/android/support/v4/widget/DrawerLayout.html
 [4] http://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.html
 [5] http://developer.android.com/reference/android/support/v4/widget/ExploreByTouchHelper.html
 [6] http://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityEventCompat.html#TYPE_VIEW_SCROLLED
 [7] http://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat.html
 [8] http://developer.android.com/reference/java/lang/CharSequence.html
 [9] http://developer.android.com/reference/java/lang/String.html
[10] http://developer.android.com/reference/android/support/v4/view/accessibility/AccessibilityRecordCompat.html
[11] http://developer.android.com/reference/java/lang/Object.html
[12] http://developer.android.com/reference/android/support/v4/media/TransportMediator.html
[13] http://developer.android.com/reference/android/support/v4/hardware/display/DisplayManagerCompat.html
[14] http://developer.android.com/reference/android/support/v4/content/WakefulBroadcastReceiver.html
[15] http://developer.android.com/reference/android/app/Service.html
[16] http://developer.android.com/reference/android/support/v4/content/Loader.html#commitContentChanged()
[17] http://developer.android.com/reference/android/support/v4/content/Loader.html#rollbackContentChanged()
[18] http://developer.android.com/reference/android/support/v4/content/AsyncTaskLoader.html
[19] http://developer.android.com/reference/android/support/v7/app/ActionBar.html
[20] http://design/patterns/actionbar.html
[21] http://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html
  • Loading branch information
danielesegato committed Jul 24, 2013
1 parent b12207a commit fbe369c
Show file tree
Hide file tree
Showing 478 changed files with 15,097 additions and 561 deletions.
3 changes: 2 additions & 1 deletion HASHES.md
Expand Up @@ -15,4 +15,5 @@ This can help to find out which revision is in use in a project. There is no oth
| 10 | August 2012 | 7c357558b1ef5cd16f1d312fe87c38a0 | 612846c9857077a039b533718f72db3bc041d389 |
| 11 | November 2012 | 7b5efe58fd28cbc7fa8f9e88ab9c7d65 | 48c94ae70fa65718b382098237806a5909bb096e |
| 12 | February 2013 | 9974894df6e8ba95bb27f5e85e2cdfb5 | 307c1cc532eabbf1d135b43e5c983c9da700449d |
| 13 | May 2013 | 5dce8843261486180715e459d953885d | bd6479f5dd592790607e0504e66e0f31c2b4d308 |
| 13 | May 2013 | 5dce8843261486180715e459d953885d | bd6479f5dd592790607e0504e66e0f31c2b4d308 |
| 18 | July 2013 | ed257a47cae11af1a55614055b879947 | 4a6be13368bb64c5a0b0460632d228a1a915f58f |
28 changes: 28 additions & 0 deletions samples/Support4Demos/AndroidManifest.xml
Expand Up @@ -23,6 +23,7 @@
package="com.example.android.supportv4">

<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17" />

Expand Down Expand Up @@ -242,6 +243,17 @@
<service android:name=".content.LocalServiceBroadcaster$LocalService"
android:stopWithTask="true" />

<activity android:name=".content.SimpleWakefulController"
android:label="@string/simple_wakeful_controller">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="com.example.android.supportv4.SUPPORT4_SAMPLE_CODE" />
</intent-filter>
</activity>

<receiver android:name=".content.SimpleWakefulReceiver" />
<service android:name=".content.SimpleWakefulService" />

<activity android:name=".accessibility.AccessibilityManagerSupportActivity"
android:label="@string/accessibility_manager_title">
<intent-filter>
Expand Down Expand Up @@ -276,6 +288,14 @@
</intent-filter>
</activity>

<activity android:name=".text.BidiFormatterSupport"
android:label="@string/bidiformatter_support_title">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="com.example.android.supportv4.SUPPORT4_SAMPLE_CODE" />
</intent-filter>
</activity>

<activity android:name=".widget.DrawerLayoutActivity"
android:label="@string/drawer_layout_support">
<intent-filter>
Expand Down Expand Up @@ -317,5 +337,13 @@
</provider>


<activity android:name=".media.TransportControllerActivity"
android:label="@string/sample_transport_controller_activity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="com.example.android.supportv4.SUPPORT4_SAMPLE_CODE" />
</intent-filter>
</activity>

</application>
</manifest>
58 changes: 58 additions & 0 deletions samples/Support4Demos/res/layout/bidiformater_support.xml
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:padding="16dp"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24dip"
android:text="@string/without_bidiformatter"
/>

<TextView android:id="@+id/textview_without_bidiformatter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="24dip"
/>

</LinearLayout>

<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24dip"
android:text="@string/with_bidiformatter"
/>

<TextView android:id="@+id/textview_with_bidiformatter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="24dip"
/>

</LinearLayout>

</LinearLayout>
76 changes: 76 additions & 0 deletions samples/Support4Demos/res/layout/media_controller.xml
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#CC000000"
android:orientation="vertical"
android:layoutDirection="ltr">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="4dip"
android:orientation="horizontal">

<ImageButton android:id="@+id/prev" style="@android:style/MediaButton.Previous" />
<ImageButton android:id="@+id/rew" style="@android:style/MediaButton.Rew" />
<ImageButton android:id="@+id/pause" style="@android:style/MediaButton.Play" />
<ImageButton android:id="@+id/ffwd" style="@android:style/MediaButton.Ffwd" />
<ImageButton android:id="@+id/next" style="@android:style/MediaButton.Next" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<TextView android:id="@+id/time_current"
android:textSize="14sp"
android:textStyle="bold"
android:paddingTop="4dip"
android:paddingStart="4dip"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingEnd="4dip"
android:textColor="?android:attr/textColorSecondary" />

<SeekBar
android:id="@+id/mediacontroller_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="0dip"
android:layout_weight="1"
android:layout_height="32dip"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true" />

<TextView android:id="@+id/time"
android:textSize="14sp"
android:textStyle="bold"
android:paddingTop="4dip"
android:paddingEnd="4dip"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="4dip"
android:textColor="?android:attr/textColorSecondary" />
</LinearLayout>

</LinearLayout>
41 changes: 41 additions & 0 deletions samples/Support4Demos/res/layout/videoview.xml
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->


<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent"
>
<view class="com.example.android.supportv4.media.TransportControllerActivity$Content"
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:animateLayoutChanges="true"
>
<com.example.android.supportv4.media.MediaController
android:id="@+id/media_controller"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom">
</com.example.android.supportv4.media.MediaController>
</FrameLayout>
</FrameLayout>

35 changes: 35 additions & 0 deletions samples/Support4Demos/res/layout/wakeful_alarm_controller.xml
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:padding="4dip"
android:gravity="center_horizontal"
android:layout_width="match_parent" android:layout_height="match_parent">

<TextView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_weight="0" android:paddingBottom="4dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/simple_wakeful_controller_msg"/>

<Button android:id="@+id/schedule"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="@string/schedule_wakeful_alarm">
<requestFocus />
</Button>

</LinearLayout>

Binary file added samples/Support4Demos/res/raw/videoviewdemo.mp4
Binary file not shown.
26 changes: 23 additions & 3 deletions samples/Support4Demos/res/values/strings.xml
Expand Up @@ -32,7 +32,9 @@
<string name="violet">Violet</string>
<string name="receive_result_instructions">Press the button to get an activity result, which will be displayed here:</string>
<string name="receive_result_result">Get Result</string>


<!-- Fragment API -->

<string name="fragment_alert_dialog_support">Fragment/Alert Dialog</string>

<string name="fragment_arguments_support">Fragment/Arguments</string>
Expand Down Expand Up @@ -108,6 +110,13 @@
<string name="start_service">Start Service</string>
<string name="stop_service">Stop Service</string>

<string name="simple_wakeful_controller">Content/Simple WakefulReceiver</string>

<string name="simple_wakeful_controller_msg">Demonstrates use of WakefulBroadcastReceiver
to keep the device awake while dispatching a broadcast to a service.</string>
<string name="schedule_wakeful_alarm">Wakeup in 30 seconds</string>
<string name="simple_wakeful_scheduled">Alarm scheduled</string>

<!-- Accessibility API -->

<string name="accessibility_manager_title">Accessibility/Accessibility Manager</string>
Expand All @@ -131,10 +140,21 @@
<string name="share_text">Share some text</string>
<string name="share_file">Share a file</string>
<string name="share_multiple_file">Share multiple files</string>
<string name="sharing_support_title">ShareCompat Demo</string>
<string name="sharing_support_title">App/ShareCompat Demo</string>
<string name="sharing_receiver_title">ShareCompat Receiver</string>

<string name="file_provider_example">FileProvider example</string>
<string name="file_provider_example">Content/FileProvider example</string>

<!-- Text API -->

<string name="without_bidiformatter">Without BidiFormatter:</string>
<string name="with_bidiformatter">With BidiFormatter:</string>
<string name="bidiformatter_support_title">Text/BidiFormatter Demo</string>

<!-- TransportController -->

<string name="sample_transport_controller_activity">Media/TransportController</string>

<string name="drawer_layout_support">Widget/Drawer layout</string>

<string name="drawer_layout_summary">This activity illustrates the use of sliding drawers. The drawer may be pulled out from the left edge with an edge swipe. If this demo is running on Ice Cream Sandwich or newer you may tap the icon at the left side of the action bar to open the drawer as well.</string>
Expand Down
4 changes: 2 additions & 2 deletions samples/Support4Demos/res/xml/my_paths.xml
Expand Up @@ -8,7 +8,7 @@
through alias "my_external" -->
<external-path name="my_external" />

<!-- Offer access to files under "/proc" through alias "my_proc" -->
<root-path name="my_proc" path="proc/" />
<!-- Offer access to files under Context.getCacheDir() -->
<cache-path name="my_cache" />
</paths>

0 comments on commit fbe369c

Please sign in to comment.