Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Android Support Library, revision 18 (July 2013)
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
1 parent
b12207a
commit fbe369c
Showing
478 changed files
with
15,097 additions
and
561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
35
samples/Support4Demos/res/layout/wakeful_alarm_controller.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.