1、Fragment和 FragmentActivity implement LifecycleOwner
1、26.1.0-27.0.0 API DIFF
package |
class |
change |
type |
android.support.content android.support.wear.ambient android.support.wear.utils |
add Package |
||
android.support.customtabs |
CustomTabsCallback |
|
add |
CustomTabsService |
|
add |
|
CustomTabsSession |
|
add |
|
CustomTabsSessionToken |
|
add |
|
android.support.media |
ExifInterface |
String TAG_ISO_SPEED_RATINGS int WHITEBALANCE_AUTO int WHITEBALANCE_MANUAL |
deprecated |
android.support.media.tv |
TvContractCompat.PreviewPrograms |
|
add |
|
TvContractCompat.WatchNextPrograms |
|
add |
android.support.v13.app |
FragmentCompat |
|
add |
android.support.v17.leanback.app |
MediaControllerGlue PlaybackControlGlue PlaybackControlGlue.InputEventHandler PlaybackControlSupportGlue PlaybackOverlayFragment PlaybackOverlayFragment. InputEventHandler PlaybackOverlayFragment. OnFadeCompleteListener PlaybackOverlaySupportFragment PlaybackOverlaySupportFragment. InputEventHandler PlaybackOverlaySupportFragment. OnFadeCompleteListener |
|
remove |
SearchFragment |
void setSpeechRecognitionCallback(SpeechRecognitionCallback) |
deprecated |
|
SearchSupportFragment |
void setSpeechRecognitionCallback(SpeechRecognitionCallback) |
deprecated |
|
android.support.v17.leanback.media |
MediaControllerAdapter |
|
add |
MediaControllerGlue |
|
deprecated |
|
PlaybackBannerControlGlue |
long getSupportedActions() |
Method was locally defined, but is now inherited from PlaybackBaseControlGlue. |
|
PlaybackBaseControlGlue |
|
add |
|
PlaybackGlue |
boolean isReadyForPlayback() void setPlayerCallback(PlayerCallback) |
remove |
|
PlaybackGlue.PlayerCallback |
void onReadyForPlayback() |
remove |
|
PlayerAdapter |
|
add |
|
PlayerAdapter.Callback |
|
add |
|
android.support.v17.leanback.system |
Settings |
|
add |
android.support.v17.leanback.widget |
ArrayObjectAdapter |
|
add method |
|
ItemBridgeAdapter |
|
|
|
ItemBridgeAdapter.AdapterListener |
|
|
|
ListRowPresenter |
|
|
|
ObjectAdapter |
|
|
|
ObjectAdapter.DataObserver |
|
|
|
Presenter |
|
|
|
SearchBar |
|
|
|
SpeechRecognitionCallback |
|
deprecated |
android.support.v17.leanback.widget.picker |
Picker |
CharSequence getSeparator() |
Now deprecated. |
android.support.v4.accessibilityservice |
AccessibilityServiceInfoCompat |
boolean getCanRetrieveWindowContent(AccessibilityServiceInfo) String getDescription(AccessibilityServiceInfo) String getId(AccessibilityServiceInfo) ResolveInfo getResolveInfo(AccessibilityServiceInfo) String getSettingsActivityName(AccessibilityServiceInfo) |
remove |
|
|
int DEFAULT |
remove |
android.support.v4.app |
ActivityCompat |
boolean invalidateOptionsMenu(Activity) |
Now deprecated. |
|
NotificationCompat.Builder |
ArrayList |
Now deprecated. |
|
RemoteInputCompatBase.RemoteInput |
RemoteInputCompatBase.RemoteInput() boolean getAllowFreeFormInput() Set CharSequence[] getChoices() Bundle getExtras() CharSequence getLabel() String getResultKey() |
deprecated |
android.support.v4.content |
ParallelExecutorCompat |
|
remove class |
|
IntentCompat |
Intent makeMainActivity(ComponentName) Intent makeRestartActivityTask(ComponentName) String ACTION_EXTERNAL_APPLICATIONS_AVAILABLE String ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE String EXTRA_CHANGED_PACKAGE_LIST String EXTRA_CHANGED_UID_LIST int FLAG_ACTIVITY_CLEAR_TASK int FLAG_ACTIVITY_TASK_ON_HOME |
remove |
|
SharedPreferencesCompat |
|
deprecated class |
|
SharedPreferencesCompat.EditorCompat |
void apply(Editor) Now deprecated. EditorCompat getInstance() Now deprecated. |
deprecated |
android.support.v4.content.pm |
ActivityInfoCompat |
int CONFIG_UI_MODE |
Now deprecated. |
|
ShortcutInfoCompat |
|
add mothod |
|
ShortcutInfoCompat.Builder |
Builder setIcon(Bitmap) Builder setIcon(int) |
remove |
android.support.v4.content.res |
ConfigurationHelper |
int getScreenHeightDp(Resources) int getScreenWidthDp(Resources) int getSmallestScreenWidthDp(Resources) |
remove |
|
ResourcesCompat |
|
add method |
android.support.v4.database |
DatabaseUtilsCompat |
String[] appendSelectionArgs(String[], String[]) Now deprecated. String concatenateWhere(String, String) Now deprecated. |
deprecated |
android.support.v4.graphics.drawable |
DrawableCompat |
void jumpToCurrentState(Drawable) |
Now deprecated. |
|
IconCompat |
|
add method |
android.support.v4.media.session |
MediaControllerCompat |
boolean isShuffleModeEnabled() |
remove |
|
MediaControllerCompat.Callback |
void onShuffleModeChanged(boolean) |
remove |
|
MediaControllerCompat.TransportControls |
void setShuffleModeEnabled(boolean) |
remove |
|
MediaSessionCompat |
void setShuffleModeEnabled(boolean) |
remove |
|
MediaSessionCompat.Callback |
void onSetShuffleModeEnabled(boolean) |
remove |
|
PlaybackStateCompat |
ong ACTION_SET_SHUFFLE_MODE_ENABLED |
Now deprecated. |
android.support.v4.os |
AsyncTaskCompat |
remove class |
|
|
BuildCompat |
boolean isAtLeastOMR1() |
Now deprecated. |
android.support.v4.provider |
FontsContractCompat.FontRequestCallback |
|
add |
android.support.v4.text |
TextUtilsCompat |
Locale ROOT |
remove |
android.support.v4.view |
KeyEventCompat |
remove |
|
|
ViewCompat |
void setChildrenDrawingOrderEnabled(ViewGroup,boolean) |
Now deprecated. |
android.support.v4.view.accessibility |
AccessibilityEventCompat |
int getAction(AccessibilityEvent) Change from non-static to static. int getMovementGranularity(AccessibilityEvent) Change from non-static to static. void setAction(AccessibilityEvent, int) Change from non-static to static. void setMovementGranularity(AccessibilityEvent, int) Change from non-static to static. |
Change from non-static to static. |
android.support.v4.widget |
SearchViewCompat SearchViewCompat.OnCloseListener SearchViewCompat.OnCloseListenerCompat SearchViewCompat.OnQueryTextListener SearchViewCompat.OnQueryTextListenerCompat |
Removed Classes and Interfaces |
|
android.support.v7.app |
NotificationCompat NotificationCompat.Builder NotificationCompat.DecoratedCustomViewStyle NotificationCompat.DecoratedMediaCustomViewStyle NotificationCompat.MediaStyle |
Removed Classes |
|
android.support.v7.widget |
RecyclerView |
int getItemDecorationCount() |
add mothod |
void removeItemDecorationAt(int) |
3、非空注解
一些API上添加了非空注解,如:
Fragment.getActivity()
Fragment.getContext()
可能导致Kotlin编译错误
4、fragment 元素共享渐变动画
5、RoundedDrawable 支持XML定义
6、废弃API被移除
如: android.support.v7.NotificationCompat (use v4 NotificationCompat instead)
KeyEventCompat,
ParallelExecutorCompat
SearchViewCompat
Bug fixes
Support
Support 27.1.0
1、DialogFragment的 getDialog 在onDestroyView之前都是非空的(以前通过dismiss置空),可以通过getDialog().isShowing()判断是否显示
2、ListAdapter 、AsyncListDiffer优化RecycyclerView 在后台线程计算List diffs
3、FragmentActivity和Fragment implement ViewModelStoreOwner
4、Fragments 有 requireContext(), requireActivity(), requireHost(), 和 requireFragmentManager() 方法,返回对应非空对象或者 throw anIllegalStateException.
5、findviewbyid的非空实现 requieviewbyid 被加入到windowcompat,activitycompat中,如果找不到对象将抛异常
6、LoaderCallbacks 非空、可空注解优化
7、SortedList.ReplaceAll可以更新sortedlist中的数据,并支持动画
Bug fixes
0、AndroidX发布
1、分离support-core-ui, support-core-utils, and support-compat到小library
asynclayoutinflater (from support-core-ui)
collections (from support-compat)
coordinatorlayout (from design)
cursoradapter (from support-core-ui)
customview (from support-core-ui)
documentfile (from support-core-utils)
drawerlayout (from support-core-ui)
interpolator (from support-core-ui)
loader (from support-fragments and core-utils)
localbroadcastmanager (from support-core-utils)
print (from support-core-utils)
slidingpanelayout (from support-core-ui)
swiperefreshlayout (from support-core-ui)
viewpager (from support-core-ui)
2、recyclerview-selection 支持item选择
3、Design Library改动
发布新主题:Theme.MaterialComponents
添加新组件
BottomAppBar
Chip
ChipGroup
MaterialButton
MaterialCardView
Bug fixes
1、AnimatedStateListDrawableCompat提供drawable状态动画支持
2、AnimatedStateListDrawableCompat 获取gradient、colorstatelist fill和strokes支持