Merge "leanback: fix broken VerticalGridView RTL layout"
diff --git a/compat/api/current.txt b/compat/api/current.txt
index a85290e..006316b 100644
--- a/compat/api/current.txt
+++ b/compat/api/current.txt
@@ -136,6 +136,12 @@
method public static void setExactAndAllowWhileIdle(android.app.AlarmManager, int, long, android.app.PendingIntent);
}
+ public class AppLaunchChecker {
+ ctor public AppLaunchChecker();
+ method public static boolean hasStartedFromLauncher(android.content.Context);
+ method public static void onActivityCreate(android.app.Activity);
+ }
+
public final class AppOpsManagerCompat {
method public static int noteOp(android.content.Context, java.lang.String, int, java.lang.String);
method public static int noteOpNoThrow(android.content.Context, java.lang.String, int, java.lang.String);
@@ -153,6 +159,35 @@
method public static void putBinder(android.os.Bundle, java.lang.String, android.os.IBinder);
}
+ public class FrameMetricsAggregator {
+ ctor public FrameMetricsAggregator();
+ ctor public FrameMetricsAggregator(int);
+ method public void add(android.app.Activity);
+ method public android.util.SparseIntArray[] getMetrics();
+ method public android.util.SparseIntArray[] remove(android.app.Activity);
+ method public android.util.SparseIntArray[] reset();
+ method public android.util.SparseIntArray[] stop();
+ field public static final int ANIMATION_DURATION = 256; // 0x100
+ field public static final int ANIMATION_INDEX = 8; // 0x8
+ field public static final int COMMAND_DURATION = 32; // 0x20
+ field public static final int COMMAND_INDEX = 5; // 0x5
+ field public static final int DELAY_DURATION = 128; // 0x80
+ field public static final int DELAY_INDEX = 7; // 0x7
+ field public static final int DRAW_DURATION = 8; // 0x8
+ field public static final int DRAW_INDEX = 3; // 0x3
+ field public static final int EVERY_DURATION = 511; // 0x1ff
+ field public static final int INPUT_DURATION = 2; // 0x2
+ field public static final int INPUT_INDEX = 1; // 0x1
+ field public static final int LAYOUT_MEASURE_DURATION = 4; // 0x4
+ field public static final int LAYOUT_MEASURE_INDEX = 2; // 0x2
+ field public static final int SWAP_DURATION = 64; // 0x40
+ field public static final int SWAP_INDEX = 6; // 0x6
+ field public static final int SYNC_DURATION = 16; // 0x10
+ field public static final int SYNC_INDEX = 4; // 0x4
+ field public static final int TOTAL_DURATION = 1; // 0x1
+ field public static final int TOTAL_INDEX = 0; // 0x0
+ }
+
public abstract class JobIntentService extends android.app.Service {
ctor public JobIntentService();
method public static void enqueueWork(android.content.Context, java.lang.Class, int, android.content.Intent);
@@ -164,6 +199,18 @@
method public void setInterruptIfStopped(boolean);
}
+ public final class NavUtils {
+ method public static android.content.Intent getParentActivityIntent(android.app.Activity);
+ method public static android.content.Intent getParentActivityIntent(android.content.Context, java.lang.Class<?>) throws android.content.pm.PackageManager.NameNotFoundException;
+ method public static android.content.Intent getParentActivityIntent(android.content.Context, android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
+ method public static java.lang.String getParentActivityName(android.app.Activity);
+ method public static java.lang.String getParentActivityName(android.content.Context, android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
+ method public static void navigateUpFromSameTask(android.app.Activity);
+ method public static void navigateUpTo(android.app.Activity, android.content.Intent);
+ method public static boolean shouldUpRecreateTask(android.app.Activity, android.content.Intent);
+ field public static final java.lang.String PARENT_ACTIVITY = "android.support.PARENT_ACTIVITY";
+ }
+
public class NotificationCompat {
ctor public NotificationCompat();
method public static android.support.v4.app.NotificationCompat.Action getAction(android.app.Notification, int);
@@ -683,6 +730,29 @@
method public abstract void onSharedElementsReady();
}
+ public final class TaskStackBuilder implements java.lang.Iterable {
+ method public android.support.v4.app.TaskStackBuilder addNextIntent(android.content.Intent);
+ method public android.support.v4.app.TaskStackBuilder addNextIntentWithParentStack(android.content.Intent);
+ method public android.support.v4.app.TaskStackBuilder addParentStack(android.app.Activity);
+ method public android.support.v4.app.TaskStackBuilder addParentStack(java.lang.Class<?>);
+ method public android.support.v4.app.TaskStackBuilder addParentStack(android.content.ComponentName);
+ method public static android.support.v4.app.TaskStackBuilder create(android.content.Context);
+ method public android.content.Intent editIntentAt(int);
+ method public static deprecated android.support.v4.app.TaskStackBuilder from(android.content.Context);
+ method public deprecated android.content.Intent getIntent(int);
+ method public int getIntentCount();
+ method public android.content.Intent[] getIntents();
+ method public android.app.PendingIntent getPendingIntent(int, int);
+ method public android.app.PendingIntent getPendingIntent(int, int, android.os.Bundle);
+ method public deprecated java.util.Iterator<android.content.Intent> iterator();
+ method public void startActivities();
+ method public void startActivities(android.os.Bundle);
+ }
+
+ public static abstract interface TaskStackBuilder.SupportParentable {
+ method public abstract android.content.Intent getSupportParentActivityIntent();
+ }
+
}
package android.support.v4.content {
@@ -711,6 +781,17 @@
method public static void startForegroundService(android.content.Context, android.content.Intent);
}
+ public class FileProvider extends android.content.ContentProvider {
+ ctor public FileProvider();
+ method public int delete(android.net.Uri, java.lang.String, java.lang.String[]);
+ method public java.lang.String getType(android.net.Uri);
+ method public static android.net.Uri getUriForFile(android.content.Context, java.lang.String, java.io.File);
+ method public android.net.Uri insert(android.net.Uri, android.content.ContentValues);
+ method public boolean onCreate();
+ method public android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
+ method public int update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]);
+ }
+
public final class IntentCompat {
method public static android.content.Intent makeMainSelectorActivity(java.lang.String, java.lang.String);
field public static final java.lang.String CATEGORY_LEANBACK_LAUNCHER = "android.intent.category.LEANBACK_LAUNCHER";
@@ -718,6 +799,23 @@
field public static final java.lang.String EXTRA_START_PLAYBACK = "android.intent.extra.START_PLAYBACK";
}
+ public final class MimeTypeFilter {
+ method public static boolean matches(java.lang.String, java.lang.String);
+ method public static java.lang.String matches(java.lang.String, java.lang.String[]);
+ method public static java.lang.String matches(java.lang.String[], java.lang.String);
+ method public static java.lang.String[] matchesMany(java.lang.String[], java.lang.String);
+ }
+
+ public final class PermissionChecker {
+ method public static int checkCallingOrSelfPermission(android.content.Context, java.lang.String);
+ method public static int checkCallingPermission(android.content.Context, java.lang.String, java.lang.String);
+ method public static int checkPermission(android.content.Context, java.lang.String, int, int, java.lang.String);
+ method public static int checkSelfPermission(android.content.Context, java.lang.String);
+ field public static final int PERMISSION_DENIED = -1; // 0xffffffff
+ field public static final int PERMISSION_DENIED_APP_OP = -2; // 0xfffffffe
+ field public static final int PERMISSION_GRANTED = 0; // 0x0
+ }
+
public final deprecated class SharedPreferencesCompat {
}
@@ -806,6 +904,29 @@
method public static void setHasMipMap(android.graphics.Bitmap, boolean);
}
+ public final class ColorUtils {
+ method public static int HSLToColor(float[]);
+ method public static int LABToColor(double, double, double);
+ method public static void LABToXYZ(double, double, double, double[]);
+ method public static void RGBToHSL(int, int, int, float[]);
+ method public static void RGBToLAB(int, int, int, double[]);
+ method public static void RGBToXYZ(int, int, int, double[]);
+ method public static int XYZToColor(double, double, double);
+ method public static void XYZToLAB(double, double, double, double[]);
+ method public static int blendARGB(int, int, float);
+ method public static void blendHSL(float[], float[], float, float[]);
+ method public static void blendLAB(double[], double[], double, double[]);
+ method public static double calculateContrast(int, int);
+ method public static double calculateLuminance(int);
+ method public static int calculateMinimumAlpha(int, int, float);
+ method public static void colorToHSL(int, float[]);
+ method public static void colorToLAB(int, double[]);
+ method public static void colorToXYZ(int, double[]);
+ method public static int compositeColors(int, int);
+ method public static double distanceEuclidean(double[], double[]);
+ method public static int setAlphaComponent(int, int);
+ }
+
public final class PaintCompat {
method public static boolean hasGlyph(android.graphics.Paint, java.lang.String);
}
@@ -845,6 +966,35 @@
method public android.graphics.drawable.Icon toIcon();
}
+ public abstract class RoundedBitmapDrawable extends android.graphics.drawable.Drawable {
+ method public void draw(android.graphics.Canvas);
+ method public final android.graphics.Bitmap getBitmap();
+ method public float getCornerRadius();
+ method public int getGravity();
+ method public int getOpacity();
+ method public final android.graphics.Paint getPaint();
+ method public boolean hasAntiAlias();
+ method public boolean hasMipMap();
+ method public boolean isCircular();
+ method public void setAlpha(int);
+ method public void setAntiAlias(boolean);
+ method public void setCircular(boolean);
+ method public void setColorFilter(android.graphics.ColorFilter);
+ method public void setCornerRadius(float);
+ method public void setDither(boolean);
+ method public void setGravity(int);
+ method public void setMipMap(boolean);
+ method public void setTargetDensity(android.graphics.Canvas);
+ method public void setTargetDensity(android.util.DisplayMetrics);
+ method public void setTargetDensity(int);
+ }
+
+ public final class RoundedBitmapDrawableFactory {
+ method public static android.support.v4.graphics.drawable.RoundedBitmapDrawable create(android.content.res.Resources, android.graphics.Bitmap);
+ method public static android.support.v4.graphics.drawable.RoundedBitmapDrawable create(android.content.res.Resources, java.lang.String);
+ method public static android.support.v4.graphics.drawable.RoundedBitmapDrawable create(android.content.res.Resources, java.io.InputStream);
+ }
+
}
package android.support.v4.hardware.display {
@@ -892,6 +1042,16 @@
}
+package android.support.v4.math {
+
+ public class MathUtils {
+ method public static float clamp(float, float, float);
+ method public static double clamp(double, double, double);
+ method public static int clamp(int, int, int);
+ }
+
+}
+
package android.support.v4.net {
public final class ConnectivityManagerCompat {
@@ -2216,6 +2376,33 @@
package android.support.v4.widget {
+ public abstract class AutoScrollHelper implements android.view.View.OnTouchListener {
+ ctor public AutoScrollHelper(android.view.View);
+ method public abstract boolean canTargetScrollHorizontally(int);
+ method public abstract boolean canTargetScrollVertically(int);
+ method public boolean isEnabled();
+ method public boolean isExclusive();
+ method public boolean onTouch(android.view.View, android.view.MotionEvent);
+ method public abstract void scrollTargetBy(int, int);
+ method public android.support.v4.widget.AutoScrollHelper setActivationDelay(int);
+ method public android.support.v4.widget.AutoScrollHelper setEdgeType(int);
+ method public android.support.v4.widget.AutoScrollHelper setEnabled(boolean);
+ method public android.support.v4.widget.AutoScrollHelper setExclusive(boolean);
+ method public android.support.v4.widget.AutoScrollHelper setMaximumEdges(float, float);
+ method public android.support.v4.widget.AutoScrollHelper setMaximumVelocity(float, float);
+ method public android.support.v4.widget.AutoScrollHelper setMinimumVelocity(float, float);
+ method public android.support.v4.widget.AutoScrollHelper setRampDownDuration(int);
+ method public android.support.v4.widget.AutoScrollHelper setRampUpDuration(int);
+ method public android.support.v4.widget.AutoScrollHelper setRelativeEdges(float, float);
+ method public android.support.v4.widget.AutoScrollHelper setRelativeVelocity(float, float);
+ field public static final int EDGE_TYPE_INSIDE = 0; // 0x0
+ field public static final int EDGE_TYPE_INSIDE_EXTEND = 1; // 0x1
+ field public static final int EDGE_TYPE_OUTSIDE = 2; // 0x2
+ field public static final float NO_MAX = 3.4028235E38f;
+ field public static final float NO_MIN = 0.0f;
+ field public static final float RELATIVE_UNSPECIFIED = 0.0f;
+ }
+
public final class CompoundButtonCompat {
method public static android.graphics.drawable.Drawable getButtonDrawable(android.widget.CompoundButton);
method public static android.content.res.ColorStateList getButtonTintList(android.widget.CompoundButton);
@@ -2224,6 +2411,15 @@
method public static void setButtonTintMode(android.widget.CompoundButton, android.graphics.PorterDuff.Mode);
}
+ public class ContentLoadingProgressBar extends android.widget.ProgressBar {
+ ctor public ContentLoadingProgressBar(android.content.Context);
+ ctor public ContentLoadingProgressBar(android.content.Context, android.util.AttributeSet);
+ method public synchronized void hide();
+ method public void onAttachedToWindow();
+ method public void onDetachedFromWindow();
+ method public synchronized void show();
+ }
+
public final class EdgeEffectCompat {
ctor public deprecated EdgeEffectCompat(android.content.Context);
method public deprecated boolean draw(android.graphics.Canvas);
@@ -2249,6 +2445,13 @@
method public static android.view.View.OnTouchListener createDragToOpenListener(android.widget.ListPopupWindow, android.view.View);
}
+ public class ListViewAutoScrollHelper extends android.support.v4.widget.AutoScrollHelper {
+ ctor public ListViewAutoScrollHelper(android.widget.ListView);
+ method public boolean canTargetScrollHorizontally(int);
+ method public boolean canTargetScrollVertically(int);
+ method public void scrollTargetBy(int, int);
+ }
+
public final class ListViewCompat {
method public static boolean canScrollList(android.widget.ListView, int);
method public static void scrollListBy(android.widget.ListView, int);
diff --git a/compat/src/androidTest/AndroidManifest.xml b/compat/src/androidTest/AndroidManifest.xml
index 8f78188..25ca7ef 100644
--- a/compat/src/androidTest/AndroidManifest.xml
+++ b/compat/src/androidTest/AndroidManifest.xml
@@ -22,6 +22,12 @@
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
+ <uses-permission android:name="android.permission.READ_CONTACTS"/>
+ <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
+
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+
<application
android:supportsRtl="true"
android:theme="@style/TestActivityTheme">
@@ -42,6 +48,22 @@
<activity android:name="android.support.v13.view.DragStartHelperTestActivity"/>
+ <activity android:name="android.support.v4.widget.ContentLoadingProgressBarActivity"/>
+
+ <activity android:name="android.support.v4.widget.TextViewTestActivity"/>
+ <activity android:name="android.support.v4.app.FrameMetricsActivity"/>
+ <activity android:name="android.support.v4.app.FrameMetricsSubActivity"/>
+
+ <provider
+ android:name="android.support.v4.content.FileProvider"
+ android:authorities="moocow"
+ android:exported="false"
+ android:grantUriPermissions="true">
+ <meta-data
+ android:name="android.support.FILE_PROVIDER_PATHS"
+ android:resource="@xml/paths"/>
+ </provider>
+
<provider android:name="android.support.v4.provider.MockFontProvider"
android:authorities="android.support.provider.fonts.font"
android:exported="false"
diff --git a/core-utils/src/androidTest/java/android/support/v4/app/FrameMetricsActivity.java b/compat/src/androidTest/java/android/support/v4/app/FrameMetricsActivity.java
similarity index 100%
rename from core-utils/src/androidTest/java/android/support/v4/app/FrameMetricsActivity.java
rename to compat/src/androidTest/java/android/support/v4/app/FrameMetricsActivity.java
diff --git a/core-utils/src/androidTest/java/android/support/v4/app/FrameMetricsAggregatorTest.java b/compat/src/androidTest/java/android/support/v4/app/FrameMetricsAggregatorTest.java
similarity index 100%
rename from core-utils/src/androidTest/java/android/support/v4/app/FrameMetricsAggregatorTest.java
rename to compat/src/androidTest/java/android/support/v4/app/FrameMetricsAggregatorTest.java
diff --git a/core-utils/src/androidTest/java/android/support/v4/app/FrameMetricsSubActivity.java b/compat/src/androidTest/java/android/support/v4/app/FrameMetricsSubActivity.java
similarity index 100%
rename from core-utils/src/androidTest/java/android/support/v4/app/FrameMetricsSubActivity.java
rename to compat/src/androidTest/java/android/support/v4/app/FrameMetricsSubActivity.java
diff --git a/core-utils/src/androidTest/java/android/support/v4/content/FileProviderTest.java b/compat/src/androidTest/java/android/support/v4/content/FileProviderTest.java
similarity index 100%
rename from core-utils/src/androidTest/java/android/support/v4/content/FileProviderTest.java
rename to compat/src/androidTest/java/android/support/v4/content/FileProviderTest.java
diff --git a/core-utils/src/androidTest/java/android/support/v4/content/MimeTypeFilterTest.java b/compat/src/androidTest/java/android/support/v4/content/MimeTypeFilterTest.java
similarity index 100%
rename from core-utils/src/androidTest/java/android/support/v4/content/MimeTypeFilterTest.java
rename to compat/src/androidTest/java/android/support/v4/content/MimeTypeFilterTest.java
diff --git a/core-utils/src/androidTest/java/android/support/v4/content/PermissionCheckerTest.java b/compat/src/androidTest/java/android/support/v4/content/PermissionCheckerTest.java
similarity index 100%
rename from core-utils/src/androidTest/java/android/support/v4/content/PermissionCheckerTest.java
rename to compat/src/androidTest/java/android/support/v4/content/PermissionCheckerTest.java
diff --git a/core-utils/src/androidTest/java/android/support/v4/graphics/ColorUtilsTest.java b/compat/src/androidTest/java/android/support/v4/graphics/ColorUtilsTest.java
similarity index 99%
rename from core-utils/src/androidTest/java/android/support/v4/graphics/ColorUtilsTest.java
rename to compat/src/androidTest/java/android/support/v4/graphics/ColorUtilsTest.java
index 5a78c92..af11e2b 100644
--- a/core-utils/src/androidTest/java/android/support/v4/graphics/ColorUtilsTest.java
+++ b/compat/src/androidTest/java/android/support/v4/graphics/ColorUtilsTest.java
@@ -312,4 +312,4 @@
return this;
}
}
-}
\ No newline at end of file
+}
diff --git a/core-utils/src/androidTest/java/android/support/v4/math/MathUtilsTest.java b/compat/src/androidTest/java/android/support/v4/math/MathUtilsTest.java
similarity index 100%
rename from core-utils/src/androidTest/java/android/support/v4/math/MathUtilsTest.java
rename to compat/src/androidTest/java/android/support/v4/math/MathUtilsTest.java
diff --git a/core-ui/src/androidTest/java/android/support/v4/widget/ContentLoadingProgressBarActivity.java b/compat/src/androidTest/java/android/support/v4/widget/ContentLoadingProgressBarActivity.java
similarity index 67%
rename from core-ui/src/androidTest/java/android/support/v4/widget/ContentLoadingProgressBarActivity.java
rename to compat/src/androidTest/java/android/support/v4/widget/ContentLoadingProgressBarActivity.java
index 7eb2342..d9bf4e2 100644
--- a/core-ui/src/androidTest/java/android/support/v4/widget/ContentLoadingProgressBarActivity.java
+++ b/compat/src/androidTest/java/android/support/v4/widget/ContentLoadingProgressBarActivity.java
@@ -16,12 +16,14 @@
package android.support.v4.widget;
-import android.support.coreui.test.R;
-import android.support.v4.BaseTestActivity;
+import android.app.Activity;
+import android.os.Bundle;
+import android.support.compat.test.R;
-public class ContentLoadingProgressBarActivity extends BaseTestActivity {
+public class ContentLoadingProgressBarActivity extends Activity {
@Override
- protected int getContentViewLayoutResId() {
- return R.layout.content_loading_progress_bar_activity;
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.content_loading_progress_bar_activity);
}
}
diff --git a/core-ui/src/androidTest/java/android/support/v4/widget/ContentLoadingProgressBarTest.java b/compat/src/androidTest/java/android/support/v4/widget/ContentLoadingProgressBarTest.java
similarity index 86%
rename from core-ui/src/androidTest/java/android/support/v4/widget/ContentLoadingProgressBarTest.java
rename to compat/src/androidTest/java/android/support/v4/widget/ContentLoadingProgressBarTest.java
index 837bf33..c8bc229 100644
--- a/core-ui/src/androidTest/java/android/support/v4/widget/ContentLoadingProgressBarTest.java
+++ b/compat/src/androidTest/java/android/support/v4/widget/ContentLoadingProgressBarTest.java
@@ -18,23 +18,28 @@
import static org.junit.Assert.assertEquals;
-import android.support.coreui.test.R;
+import android.support.compat.test.R;
import android.support.test.filters.LargeTest;
+import android.support.test.rule.ActivityTestRule;
+import android.support.test.runner.AndroidJUnit4;
import android.support.testutils.PollingCheck;
-import android.support.v4.BaseInstrumentationTestCase;
import android.view.View;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.runner.RunWith;
/**
* Tests for {@link ContentLoadingProgressBar}
*/
-public class ContentLoadingProgressBarTest extends
- BaseInstrumentationTestCase<ContentLoadingProgressBarActivity> {
+@RunWith(AndroidJUnit4.class)
+public class ContentLoadingProgressBarTest {
+ @Rule
+ public final ActivityTestRule<ContentLoadingProgressBarActivity> mActivityTestRule;
public ContentLoadingProgressBarTest() {
- super(ContentLoadingProgressBarActivity.class);
+ mActivityTestRule = new ActivityTestRule<>(ContentLoadingProgressBarActivity.class);
}
private ContentLoadingProgressBar mContentLoadingProgressBar;
diff --git a/core-ui/src/androidTest/res/layout/content_loading_progress_bar_activity.xml b/compat/src/androidTest/res/layout/content_loading_progress_bar_activity.xml
similarity index 100%
rename from core-ui/src/androidTest/res/layout/content_loading_progress_bar_activity.xml
rename to compat/src/androidTest/res/layout/content_loading_progress_bar_activity.xml
diff --git a/core-utils/src/androidTest/res/xml/paths.xml b/compat/src/androidTest/res/xml/paths.xml
similarity index 100%
rename from core-utils/src/androidTest/res/xml/paths.xml
rename to compat/src/androidTest/res/xml/paths.xml
diff --git a/core-utils/src/main/java/android/support/v4/app/AppLaunchChecker.java b/compat/src/main/java/android/support/v4/app/AppLaunchChecker.java
similarity index 100%
rename from core-utils/src/main/java/android/support/v4/app/AppLaunchChecker.java
rename to compat/src/main/java/android/support/v4/app/AppLaunchChecker.java
diff --git a/core-utils/src/main/java/android/support/v4/app/FrameMetricsAggregator.java b/compat/src/main/java/android/support/v4/app/FrameMetricsAggregator.java
similarity index 100%
rename from core-utils/src/main/java/android/support/v4/app/FrameMetricsAggregator.java
rename to compat/src/main/java/android/support/v4/app/FrameMetricsAggregator.java
diff --git a/core-utils/src/main/java/android/support/v4/app/NavUtils.java b/compat/src/main/java/android/support/v4/app/NavUtils.java
similarity index 100%
rename from core-utils/src/main/java/android/support/v4/app/NavUtils.java
rename to compat/src/main/java/android/support/v4/app/NavUtils.java
diff --git a/core-utils/src/main/java/android/support/v4/app/TaskStackBuilder.java b/compat/src/main/java/android/support/v4/app/TaskStackBuilder.java
similarity index 100%
rename from core-utils/src/main/java/android/support/v4/app/TaskStackBuilder.java
rename to compat/src/main/java/android/support/v4/app/TaskStackBuilder.java
diff --git a/core-utils/src/main/java/android/support/v4/content/FileProvider.java b/compat/src/main/java/android/support/v4/content/FileProvider.java
similarity index 100%
rename from core-utils/src/main/java/android/support/v4/content/FileProvider.java
rename to compat/src/main/java/android/support/v4/content/FileProvider.java
diff --git a/core-utils/src/main/java/android/support/v4/content/MimeTypeFilter.java b/compat/src/main/java/android/support/v4/content/MimeTypeFilter.java
similarity index 100%
rename from core-utils/src/main/java/android/support/v4/content/MimeTypeFilter.java
rename to compat/src/main/java/android/support/v4/content/MimeTypeFilter.java
diff --git a/core-utils/src/main/java/android/support/v4/content/PermissionChecker.java b/compat/src/main/java/android/support/v4/content/PermissionChecker.java
similarity index 100%
rename from core-utils/src/main/java/android/support/v4/content/PermissionChecker.java
rename to compat/src/main/java/android/support/v4/content/PermissionChecker.java
diff --git a/core-utils/src/main/java/android/support/v4/graphics/ColorUtils.java b/compat/src/main/java/android/support/v4/graphics/ColorUtils.java
similarity index 99%
rename from core-utils/src/main/java/android/support/v4/graphics/ColorUtils.java
rename to compat/src/main/java/android/support/v4/graphics/ColorUtils.java
index c58d2ba..4d1f465 100644
--- a/core-utils/src/main/java/android/support/v4/graphics/ColorUtils.java
+++ b/compat/src/main/java/android/support/v4/graphics/ColorUtils.java
@@ -5,7 +5,7 @@
* 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
+ * 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,
diff --git a/core-utils/src/main/java/android/support/v4/graphics/drawable/RoundedBitmapDrawable.java b/compat/src/main/java/android/support/v4/graphics/drawable/RoundedBitmapDrawable.java
similarity index 100%
rename from core-utils/src/main/java/android/support/v4/graphics/drawable/RoundedBitmapDrawable.java
rename to compat/src/main/java/android/support/v4/graphics/drawable/RoundedBitmapDrawable.java
diff --git a/core-utils/src/main/java/android/support/v4/graphics/drawable/RoundedBitmapDrawable21.java b/compat/src/main/java/android/support/v4/graphics/drawable/RoundedBitmapDrawable21.java
similarity index 100%
rename from core-utils/src/main/java/android/support/v4/graphics/drawable/RoundedBitmapDrawable21.java
rename to compat/src/main/java/android/support/v4/graphics/drawable/RoundedBitmapDrawable21.java
diff --git a/core-utils/src/main/java/android/support/v4/graphics/drawable/RoundedBitmapDrawableFactory.java b/compat/src/main/java/android/support/v4/graphics/drawable/RoundedBitmapDrawableFactory.java
similarity index 100%
rename from core-utils/src/main/java/android/support/v4/graphics/drawable/RoundedBitmapDrawableFactory.java
rename to compat/src/main/java/android/support/v4/graphics/drawable/RoundedBitmapDrawableFactory.java
diff --git a/core-utils/src/main/java/android/support/v4/math/MathUtils.java b/compat/src/main/java/android/support/v4/math/MathUtils.java
similarity index 100%
rename from core-utils/src/main/java/android/support/v4/math/MathUtils.java
rename to compat/src/main/java/android/support/v4/math/MathUtils.java
diff --git a/core-ui/src/main/java/android/support/v4/widget/AutoScrollHelper.java b/compat/src/main/java/android/support/v4/widget/AutoScrollHelper.java
similarity index 100%
rename from core-ui/src/main/java/android/support/v4/widget/AutoScrollHelper.java
rename to compat/src/main/java/android/support/v4/widget/AutoScrollHelper.java
diff --git a/core-ui/src/main/java/android/support/v4/widget/ContentLoadingProgressBar.java b/compat/src/main/java/android/support/v4/widget/ContentLoadingProgressBar.java
similarity index 100%
rename from core-ui/src/main/java/android/support/v4/widget/ContentLoadingProgressBar.java
rename to compat/src/main/java/android/support/v4/widget/ContentLoadingProgressBar.java
diff --git a/core-ui/src/main/java/android/support/v4/widget/ListViewAutoScrollHelper.java b/compat/src/main/java/android/support/v4/widget/ListViewAutoScrollHelper.java
similarity index 100%
rename from core-ui/src/main/java/android/support/v4/widget/ListViewAutoScrollHelper.java
rename to compat/src/main/java/android/support/v4/widget/ListViewAutoScrollHelper.java
diff --git a/core-ui/api/27.1.0.ignore b/core-ui/api/27.1.0.ignore
index e38b98d..5175a59 100644
--- a/core-ui/api/27.1.0.ignore
+++ b/core-ui/api/27.1.0.ignore
@@ -1,15 +1,23 @@
21edeac
c8f5cd8
c6c4dfc
+528a17a
3ee7015
+9dbd12a
+9d26569
897caa3
0a4a21e
9a73d77
2812bc8
2b135f6
6862ae7
+15490c8
1bdc70f
c79ca3e
+40d58a6
+3251849
+d95e163
+56b0aa1
c9f0c98
4a9b508
0058a00
diff --git a/core-ui/api/current.txt b/core-ui/api/current.txt
index 13abb73..6aa3e11 100644
--- a/core-ui/api/current.txt
+++ b/core-ui/api/current.txt
@@ -30,106 +30,6 @@
package android.support.v4.widget {
- public abstract class AutoScrollHelper implements android.view.View.OnTouchListener {
- ctor public AutoScrollHelper(android.view.View);
- method public abstract boolean canTargetScrollHorizontally(int);
- method public abstract boolean canTargetScrollVertically(int);
- method public boolean isEnabled();
- method public boolean isExclusive();
- method public boolean onTouch(android.view.View, android.view.MotionEvent);
- method public abstract void scrollTargetBy(int, int);
- method public android.support.v4.widget.AutoScrollHelper setActivationDelay(int);
- method public android.support.v4.widget.AutoScrollHelper setEdgeType(int);
- method public android.support.v4.widget.AutoScrollHelper setEnabled(boolean);
- method public android.support.v4.widget.AutoScrollHelper setExclusive(boolean);
- method public android.support.v4.widget.AutoScrollHelper setMaximumEdges(float, float);
- method public android.support.v4.widget.AutoScrollHelper setMaximumVelocity(float, float);
- method public android.support.v4.widget.AutoScrollHelper setMinimumVelocity(float, float);
- method public android.support.v4.widget.AutoScrollHelper setRampDownDuration(int);
- method public android.support.v4.widget.AutoScrollHelper setRampUpDuration(int);
- method public android.support.v4.widget.AutoScrollHelper setRelativeEdges(float, float);
- method public android.support.v4.widget.AutoScrollHelper setRelativeVelocity(float, float);
- field public static final int EDGE_TYPE_INSIDE = 0; // 0x0
- field public static final int EDGE_TYPE_INSIDE_EXTEND = 1; // 0x1
- field public static final int EDGE_TYPE_OUTSIDE = 2; // 0x2
- field public static final float NO_MAX = 3.4028235E38f;
- field public static final float NO_MIN = 0.0f;
- field public static final float RELATIVE_UNSPECIFIED = 0.0f;
- }
-
- public class ContentLoadingProgressBar extends android.widget.ProgressBar {
- ctor public ContentLoadingProgressBar(android.content.Context);
- ctor public ContentLoadingProgressBar(android.content.Context, android.util.AttributeSet);
- method public synchronized void hide();
- method public void onAttachedToWindow();
- method public void onDetachedFromWindow();
- method public synchronized void show();
- }
-
- public abstract class CursorAdapter extends android.widget.BaseAdapter implements android.widget.Filterable {
- ctor public deprecated CursorAdapter(android.content.Context, android.database.Cursor);
- ctor public CursorAdapter(android.content.Context, android.database.Cursor, boolean);
- ctor public CursorAdapter(android.content.Context, android.database.Cursor, int);
- method public abstract void bindView(android.view.View, android.content.Context, android.database.Cursor);
- method public void changeCursor(android.database.Cursor);
- method public java.lang.CharSequence convertToString(android.database.Cursor);
- method public int getCount();
- method public android.database.Cursor getCursor();
- method public android.widget.Filter getFilter();
- method public android.widget.FilterQueryProvider getFilterQueryProvider();
- method public java.lang.Object getItem(int);
- method public long getItemId(int);
- method public android.view.View getView(int, android.view.View, android.view.ViewGroup);
- method protected deprecated void init(android.content.Context, android.database.Cursor, boolean);
- method public android.view.View newDropDownView(android.content.Context, android.database.Cursor, android.view.ViewGroup);
- method public abstract android.view.View newView(android.content.Context, android.database.Cursor, android.view.ViewGroup);
- method protected void onContentChanged();
- method public android.database.Cursor runQueryOnBackgroundThread(java.lang.CharSequence);
- method public void setFilterQueryProvider(android.widget.FilterQueryProvider);
- method public android.database.Cursor swapCursor(android.database.Cursor);
- field public static final deprecated int FLAG_AUTO_REQUERY = 1; // 0x1
- field public static final int FLAG_REGISTER_CONTENT_OBSERVER = 2; // 0x2
- }
-
- public class ListViewAutoScrollHelper extends android.support.v4.widget.AutoScrollHelper {
- ctor public ListViewAutoScrollHelper(android.widget.ListView);
- method public boolean canTargetScrollHorizontally(int);
- method public boolean canTargetScrollVertically(int);
- method public void scrollTargetBy(int, int);
- }
-
- public abstract class ResourceCursorAdapter extends android.support.v4.widget.CursorAdapter {
- ctor public deprecated ResourceCursorAdapter(android.content.Context, int, android.database.Cursor);
- ctor public deprecated ResourceCursorAdapter(android.content.Context, int, android.database.Cursor, boolean);
- ctor public ResourceCursorAdapter(android.content.Context, int, android.database.Cursor, int);
- method public android.view.View newView(android.content.Context, android.database.Cursor, android.view.ViewGroup);
- method public void setDropDownViewResource(int);
- method public void setViewResource(int);
- }
-
- public class SimpleCursorAdapter extends android.support.v4.widget.ResourceCursorAdapter {
- ctor public deprecated SimpleCursorAdapter(android.content.Context, int, android.database.Cursor, java.lang.String[], int[]);
- ctor public SimpleCursorAdapter(android.content.Context, int, android.database.Cursor, java.lang.String[], int[], int);
- method public void bindView(android.view.View, android.content.Context, android.database.Cursor);
- method public void changeCursorAndColumns(android.database.Cursor, java.lang.String[], int[]);
- method public android.support.v4.widget.SimpleCursorAdapter.CursorToStringConverter getCursorToStringConverter();
- method public int getStringConversionColumn();
- method public android.support.v4.widget.SimpleCursorAdapter.ViewBinder getViewBinder();
- method public void setCursorToStringConverter(android.support.v4.widget.SimpleCursorAdapter.CursorToStringConverter);
- method public void setStringConversionColumn(int);
- method public void setViewBinder(android.support.v4.widget.SimpleCursorAdapter.ViewBinder);
- method public void setViewImage(android.widget.ImageView, java.lang.String);
- method public void setViewText(android.widget.TextView, java.lang.String);
- }
-
- public static abstract interface SimpleCursorAdapter.CursorToStringConverter {
- method public abstract java.lang.CharSequence convertToString(android.database.Cursor);
- }
-
- public static abstract interface SimpleCursorAdapter.ViewBinder {
- method public abstract boolean setViewValue(android.view.View, android.database.Cursor, int);
- }
-
public deprecated class Space extends android.view.View {
ctor public deprecated Space(android.content.Context, android.util.AttributeSet, int);
ctor public deprecated Space(android.content.Context, android.util.AttributeSet);
diff --git a/core-ui/build.gradle b/core-ui/build.gradle
index dc0c81e..12f5525 100644
--- a/core-ui/build.gradle
+++ b/core-ui/build.gradle
@@ -18,6 +18,7 @@
api(project(":interpolator"))
api(project(":swiperefreshlayout"))
api(project(":asynclayoutinflater"))
+ api(project(":cursoradapter"))
androidTestImplementation(TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
diff --git a/core-ui/src/androidTest/AndroidManifest.xml b/core-ui/src/androidTest/AndroidManifest.xml
deleted file mode 100644
index cb53f76..0000000
--- a/core-ui/src/androidTest/AndroidManifest.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2015 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.
- -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.support.coreui.test">
- <uses-sdk android:targetSdkVersion="${target-sdk-version}"/>
-
- <uses-permission android:name="android.permission.VIBRATE"/>
- <uses-permission android:name="android.permission.WAKE_LOCK"/>
- <uses-permission android:name="android.permission.READ_CONTACTS"/>
- <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
-
- <application
- android:supportsRtl="true"
- android:theme="@style/TestActivityTheme">
- <activity android:name="android.support.v4.widget.ExploreByTouchHelperTestActivity"/>
-
- <activity android:name="android.support.v4.widget.ContentLoadingProgressBarActivity"/>
-
- <activity android:name="android.support.design.widget.CoordinatorLayoutActivity"/>
-
- <activity android:name="android.support.design.widget.DynamicCoordinatorLayoutActivity"/>
-
- </application>
-
-</manifest>
diff --git a/core-ui/src/androidTest/java/android/support/v4/BaseInstrumentationTestCase.java b/core-ui/src/androidTest/java/android/support/v4/BaseInstrumentationTestCase.java
deleted file mode 100644
index 5f9ce85..0000000
--- a/core-ui/src/androidTest/java/android/support/v4/BaseInstrumentationTestCase.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2016 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.
- */
-
-package android.support.v4;
-
-import android.app.Activity;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
-import org.junit.Rule;
-import org.junit.runner.RunWith;
-
-@RunWith(AndroidJUnit4.class)
-public abstract class BaseInstrumentationTestCase<A extends Activity> {
- @Rule
- public final ActivityTestRule<A> mActivityTestRule;
-
- protected BaseInstrumentationTestCase(Class<A> activityClass) {
- mActivityTestRule = new ActivityTestRule<A>(activityClass);
- }
-}
diff --git a/core-ui/src/androidTest/java/android/support/v4/BaseTestActivity.java b/core-ui/src/androidTest/java/android/support/v4/BaseTestActivity.java
deleted file mode 100755
index e0682ce..0000000
--- a/core-ui/src/androidTest/java/android/support/v4/BaseTestActivity.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2016 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.
- */
-
-package android.support.v4;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.view.WindowManager;
-
-public abstract class BaseTestActivity extends Activity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
- final int contentView = getContentViewLayoutResId();
- if (contentView > 0) {
- setContentView(contentView);
- }
- onContentViewSet();
- getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
- }
-
- protected abstract int getContentViewLayoutResId();
-
- protected void onContentViewSet() {}
-}
diff --git a/core-ui/src/androidTest/java/android/support/v4/testutils/TestUtils.java b/core-ui/src/androidTest/java/android/support/v4/testutils/TestUtils.java
deleted file mode 100644
index 1f82dd0..0000000
--- a/core-ui/src/androidTest/java/android/support/v4/testutils/TestUtils.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2015 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.
- */
-
-
-package android.support.v4.testutils;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
-import android.support.annotation.ColorInt;
-import android.support.annotation.NonNull;
-
-public class TestUtils {
- /**
- * Checks whether all the pixels in the specified drawable are of the same specified color.
- * If the passed <code>Drawable</code> does not have positive intrinsic dimensions set, this
- * method will throw an <code>IllegalArgumentException</code>. If there is a color mismatch,
- * this method will call <code>Assert.fail</code> with detailed description of the mismatch.
- */
- public static void assertAllPixelsOfColor(String failMessagePrefix, @NonNull Drawable drawable,
- @ColorInt int color) {
- int drawableWidth = drawable.getIntrinsicWidth();
- int drawableHeight = drawable.getIntrinsicHeight();
-
- if ((drawableWidth <= 0) || (drawableHeight <= 0)) {
- throw new IllegalArgumentException("Drawable must be configured to have non-zero size");
- }
-
- assertAllPixelsOfColor(failMessagePrefix, drawable, drawableWidth, drawableHeight, color,
- false);
- }
-
- /**
- * Checks whether all the pixels in the specified drawable are of the same specified color.
- *
- * In case there is a color mismatch, the behavior of this method depends on the
- * <code>throwExceptionIfFails</code> parameter. If it is <code>true</code>, this method will
- * throw an <code>Exception</code> describing the mismatch. Otherwise this method will call
- * <code>Assert.fail</code> with detailed description of the mismatch.
- */
- public static void assertAllPixelsOfColor(String failMessagePrefix, @NonNull Drawable drawable,
- int drawableWidth, int drawableHeight, @ColorInt int color,
- boolean throwExceptionIfFails) {
- // Create a bitmap
- Bitmap bitmap = Bitmap.createBitmap(drawableWidth, drawableHeight, Bitmap.Config.ARGB_8888);
- // Create a canvas that wraps the bitmap
- Canvas canvas = new Canvas(bitmap);
- // Configure the drawable to have bounds that match its intrinsic size
- drawable.setBounds(0, 0, drawableWidth, drawableHeight);
- // And ask the drawable to draw itself to the canvas / bitmap
- drawable.draw(canvas);
-
- try {
- int[] rowPixels = new int[drawableWidth];
- for (int row = 0; row < drawableHeight; row++) {
- bitmap.getPixels(rowPixels, 0, drawableWidth, 0, row, drawableWidth, 1);
- for (int column = 0; column < drawableWidth; column++) {
- if (rowPixels[column] != color) {
- String mismatchDescription = failMessagePrefix
- + ": expected all drawable colors to be ["
- + Color.red(color) + "," + Color.green(color) + ","
- + Color.blue(color)
- + "] but at position (" + row + "," + column + ") found ["
- + Color.red(rowPixels[column]) + ","
- + Color.green(rowPixels[column]) + ","
- + Color.blue(rowPixels[column]) + "]";
- if (throwExceptionIfFails) {
- throw new RuntimeException(mismatchDescription);
- } else {
- fail(mismatchDescription);
- }
- }
- }
- }
- } finally {
- bitmap.recycle();
- }
- }
-
- /**
- * Checks whether the specified rectangle matches the specified left / top / right /
- * bottom bounds.
- */
- public static void assertRectangleBounds(String failMessagePrefix, @NonNull Rect rectangle,
- int left, int top, int right, int bottom) {
- assertEquals(failMessagePrefix + " left", rectangle.left, left);
- assertEquals(failMessagePrefix + " top", rectangle.top, top);
- assertEquals(failMessagePrefix + " right", rectangle.right, right);
- assertEquals(failMessagePrefix + " bottom", rectangle.bottom, bottom);
- }
-}
\ No newline at end of file
diff --git a/core-ui/src/androidTest/res/anim/fade_in.xml b/core-ui/src/androidTest/res/anim/fade_in.xml
deleted file mode 100644
index 92d5bbe..0000000
--- a/core-ui/src/androidTest/res/anim/fade_in.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<alpha xmlns:android="http://schemas.android.com/apk/res/android"
- android:duration="300"
- android:fromAlpha="0.0"
- android:toAlpha="1.0"/>
diff --git a/core-ui/src/androidTest/res/anim/fade_out.xml b/core-ui/src/androidTest/res/anim/fade_out.xml
deleted file mode 100644
index bc5a2ab..0000000
--- a/core-ui/src/androidTest/res/anim/fade_out.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, 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.
-*/
--->
-
-<alpha xmlns:android="http://schemas.android.com/apk/res/android"
- android:duration="300"
- android:fromAlpha="1.0"
- android:toAlpha="0.0"/>
diff --git a/core-ui/src/androidTest/res/anim/long_fade_in.xml b/core-ui/src/androidTest/res/anim/long_fade_in.xml
deleted file mode 100644
index 5d6f496..0000000
--- a/core-ui/src/androidTest/res/anim/long_fade_in.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<alpha xmlns:android="http://schemas.android.com/apk/res/android"
- android:interpolator="@android:interpolator/decelerate_quad"
- android:fromAlpha="0.0" android:toAlpha="1.0"
- android:duration="5000" />
diff --git a/core-ui/src/androidTest/res/anim/long_fade_out.xml b/core-ui/src/androidTest/res/anim/long_fade_out.xml
deleted file mode 100644
index fe9fc6a..0000000
--- a/core-ui/src/androidTest/res/anim/long_fade_out.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<alpha xmlns:android="http://schemas.android.com/apk/res/android"
- android:interpolator="@android:interpolator/decelerate_quad"
- android:fromAlpha="1.0" android:toAlpha="0.0"
- android:duration="5000" />
diff --git a/core-ui/src/androidTest/res/layout/activity_content.xml b/core-ui/src/androidTest/res/layout/activity_content.xml
deleted file mode 100644
index 8870e60..0000000
--- a/core-ui/src/androidTest/res/layout/activity_content.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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:id="@+id/content"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
diff --git a/core-ui/src/androidTest/res/layout/fragment_a.xml b/core-ui/src/androidTest/res/layout/fragment_a.xml
deleted file mode 100644
index 38e0423..0000000
--- a/core-ui/src/androidTest/res/layout/fragment_a.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 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="match_parent"
- android:orientation="vertical">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/textA"
- android:text="@string/hello"/>
-</LinearLayout>
diff --git a/core-ui/src/androidTest/res/layout/fragment_b.xml b/core-ui/src/androidTest/res/layout/fragment_b.xml
deleted file mode 100644
index d8ed961..0000000
--- a/core-ui/src/androidTest/res/layout/fragment_b.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 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="match_parent"
- android:orientation="vertical">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/textB"
- android:text="@string/hello"/>
-</LinearLayout>
diff --git a/core-ui/src/androidTest/res/layout/fragment_c.xml b/core-ui/src/androidTest/res/layout/fragment_c.xml
deleted file mode 100644
index ed3c753..0000000
--- a/core-ui/src/androidTest/res/layout/fragment_c.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 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="match_parent"
- android:orientation="vertical">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/textC"
- android:text="@string/hello"/>
-</LinearLayout>
diff --git a/core-ui/src/androidTest/res/layout/fragment_end.xml b/core-ui/src/androidTest/res/layout/fragment_end.xml
deleted file mode 100644
index aa3d9e8..0000000
--- a/core-ui/src/androidTest/res/layout/fragment_end.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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="match_parent"
- android:orientation="vertical">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:transitionName="destination"
- android:id="@+id/hello"
- android:text="@string/hello"/>
- <View android:layout_width="10dp"
- android:layout_height="10dp"
- android:background="#0F0"
- android:id="@+id/greenSquare"/>
- <View android:layout_width="10dp"
- android:layout_height="10dp"
- android:background="#F00"
- android:id="@+id/redSquare"/>
-</LinearLayout>
diff --git a/core-ui/src/androidTest/res/layout/fragment_middle.xml b/core-ui/src/androidTest/res/layout/fragment_middle.xml
deleted file mode 100644
index 7d1409b..0000000
--- a/core-ui/src/androidTest/res/layout/fragment_middle.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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="match_parent"
- android:orientation="vertical">
- <View android:layout_width="10dp"
- android:layout_height="10dp"
- android:background="#00F"
- android:id="@+id/blueSquare"/>
- <View android:layout_width="10dp"
- android:layout_height="10dp"
- android:background="#FF0"
- android:id="@+id/yellowSquare"/>
-</LinearLayout>
diff --git a/core-ui/src/androidTest/res/layout/fragment_start.xml b/core-ui/src/androidTest/res/layout/fragment_start.xml
deleted file mode 100644
index 793e9b5..0000000
--- a/core-ui/src/androidTest/res/layout/fragment_start.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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="match_parent"
- android:orientation="vertical">
- <View android:layout_width="10dp"
- android:layout_height="10dp"
- android:background="#0F0"
- android:id="@+id/greenSquare"/>
- <View android:layout_width="10dp"
- android:layout_height="10dp"
- android:background="#F00"
- android:id="@+id/redSquare"/>
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:transitionName="source"
- android:id="@+id/hello"
- android:text="@string/hello"/>
-</LinearLayout>
diff --git a/core-ui/src/androidTest/res/layout/strict_view_fragment.xml b/core-ui/src/androidTest/res/layout/strict_view_fragment.xml
deleted file mode 100644
index 324f8d0..0000000
--- a/core-ui/src/androidTest/res/layout/strict_view_fragment.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-* Copyright 2016, 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.
-*/
--->
-<TextView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:id="@+id/text1" />
diff --git a/core-ui/src/androidTest/res/transition/fade.xml b/core-ui/src/androidTest/res/transition/fade.xml
deleted file mode 100644
index 617f70e..0000000
--- a/core-ui/src/androidTest/res/transition/fade.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 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.
--->
-<fade xmlns:android="http://schemas.android.com/apk/res/android"/>
diff --git a/core-ui/src/androidTest/res/values/colors.xml b/core-ui/src/androidTest/res/values/colors.xml
deleted file mode 100644
index 3c7bf7c..0000000
--- a/core-ui/src/androidTest/res/values/colors.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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.
--->
-<resources>
- <color name="text_color">#FF8090</color>
-
- <color name="test_red">#FF6030</color>
- <color name="test_green">#50E080</color>
- <color name="test_blue">#3050CF</color>
- <color name="test_yellow">#F0F000</color>
-</resources>
diff --git a/core-ui/src/androidTest/res/values/dimens.xml b/core-ui/src/androidTest/res/values/dimens.xml
deleted file mode 100644
index d473645..0000000
--- a/core-ui/src/androidTest/res/values/dimens.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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.
--->
-<resources>
- <dimen name="text_medium_size">20sp</dimen>
-</resources>
\ No newline at end of file
diff --git a/core-ui/src/androidTest/res/values/strings.xml b/core-ui/src/androidTest/res/values/strings.xml
deleted file mode 100644
index 100ae69..0000000
--- a/core-ui/src/androidTest/res/values/strings.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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.
--->
-<resources>
- <string name="hello">Hello World</string>
- <string name="button">Button</string>
-</resources>
\ No newline at end of file
diff --git a/core-ui/src/androidTest/res/values/styles.xml b/core-ui/src/androidTest/res/values/styles.xml
deleted file mode 100644
index 047e2d0..0000000
--- a/core-ui/src/androidTest/res/values/styles.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2015 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.
--->
-<resources>
- <style name="TestActivityTheme" parent="android:Theme.Holo">
- <item name="android:windowAnimationStyle">@null</item>
- </style>
-</resources>
\ No newline at end of file
diff --git a/core-utils/api/27.1.0.ignore b/core-utils/api/27.1.0.ignore
index 9e7875d..a87a3ad 100644
--- a/core-utils/api/27.1.0.ignore
+++ b/core-utils/api/27.1.0.ignore
@@ -1,9 +1,16 @@
+96e4e09
a557a52
11d000b
+1aaa4c2
b240d34
0fb487a
8c14ef6
34b446e
8588484
+6814c90
+52fa9e6
+8fa5cd3
+b94ed02
+5797fb2
0261292
d663798
diff --git a/core-utils/api/current.txt b/core-utils/api/current.txt
index 119b43c..3880c59 100644
--- a/core-utils/api/current.txt
+++ b/core-utils/api/current.txt
@@ -1,107 +1,5 @@
-package android.support.v4.app {
-
- public class AppLaunchChecker {
- ctor public AppLaunchChecker();
- method public static boolean hasStartedFromLauncher(android.content.Context);
- method public static void onActivityCreate(android.app.Activity);
- }
-
- public class FrameMetricsAggregator {
- ctor public FrameMetricsAggregator();
- ctor public FrameMetricsAggregator(int);
- method public void add(android.app.Activity);
- method public android.util.SparseIntArray[] getMetrics();
- method public android.util.SparseIntArray[] remove(android.app.Activity);
- method public android.util.SparseIntArray[] reset();
- method public android.util.SparseIntArray[] stop();
- field public static final int ANIMATION_DURATION = 256; // 0x100
- field public static final int ANIMATION_INDEX = 8; // 0x8
- field public static final int COMMAND_DURATION = 32; // 0x20
- field public static final int COMMAND_INDEX = 5; // 0x5
- field public static final int DELAY_DURATION = 128; // 0x80
- field public static final int DELAY_INDEX = 7; // 0x7
- field public static final int DRAW_DURATION = 8; // 0x8
- field public static final int DRAW_INDEX = 3; // 0x3
- field public static final int EVERY_DURATION = 511; // 0x1ff
- field public static final int INPUT_DURATION = 2; // 0x2
- field public static final int INPUT_INDEX = 1; // 0x1
- field public static final int LAYOUT_MEASURE_DURATION = 4; // 0x4
- field public static final int LAYOUT_MEASURE_INDEX = 2; // 0x2
- field public static final int SWAP_DURATION = 64; // 0x40
- field public static final int SWAP_INDEX = 6; // 0x6
- field public static final int SYNC_DURATION = 16; // 0x10
- field public static final int SYNC_INDEX = 4; // 0x4
- field public static final int TOTAL_DURATION = 1; // 0x1
- field public static final int TOTAL_INDEX = 0; // 0x0
- }
-
- public final class NavUtils {
- method public static android.content.Intent getParentActivityIntent(android.app.Activity);
- method public static android.content.Intent getParentActivityIntent(android.content.Context, java.lang.Class<?>) throws android.content.pm.PackageManager.NameNotFoundException;
- method public static android.content.Intent getParentActivityIntent(android.content.Context, android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
- method public static java.lang.String getParentActivityName(android.app.Activity);
- method public static java.lang.String getParentActivityName(android.content.Context, android.content.ComponentName) throws android.content.pm.PackageManager.NameNotFoundException;
- method public static void navigateUpFromSameTask(android.app.Activity);
- method public static void navigateUpTo(android.app.Activity, android.content.Intent);
- method public static boolean shouldUpRecreateTask(android.app.Activity, android.content.Intent);
- field public static final java.lang.String PARENT_ACTIVITY = "android.support.PARENT_ACTIVITY";
- }
-
- public final class TaskStackBuilder implements java.lang.Iterable {
- method public android.support.v4.app.TaskStackBuilder addNextIntent(android.content.Intent);
- method public android.support.v4.app.TaskStackBuilder addNextIntentWithParentStack(android.content.Intent);
- method public android.support.v4.app.TaskStackBuilder addParentStack(android.app.Activity);
- method public android.support.v4.app.TaskStackBuilder addParentStack(java.lang.Class<?>);
- method public android.support.v4.app.TaskStackBuilder addParentStack(android.content.ComponentName);
- method public static android.support.v4.app.TaskStackBuilder create(android.content.Context);
- method public android.content.Intent editIntentAt(int);
- method public static deprecated android.support.v4.app.TaskStackBuilder from(android.content.Context);
- method public deprecated android.content.Intent getIntent(int);
- method public int getIntentCount();
- method public android.content.Intent[] getIntents();
- method public android.app.PendingIntent getPendingIntent(int, int);
- method public android.app.PendingIntent getPendingIntent(int, int, android.os.Bundle);
- method public deprecated java.util.Iterator<android.content.Intent> iterator();
- method public void startActivities();
- method public void startActivities(android.os.Bundle);
- }
-
- public static abstract interface TaskStackBuilder.SupportParentable {
- method public abstract android.content.Intent getSupportParentActivityIntent();
- }
-
-}
-
package android.support.v4.content {
- public class FileProvider extends android.content.ContentProvider {
- ctor public FileProvider();
- method public int delete(android.net.Uri, java.lang.String, java.lang.String[]);
- method public java.lang.String getType(android.net.Uri);
- method public static android.net.Uri getUriForFile(android.content.Context, java.lang.String, java.io.File);
- method public android.net.Uri insert(android.net.Uri, android.content.ContentValues);
- method public boolean onCreate();
- method public android.database.Cursor query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
- method public int update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]);
- }
-
- public final class MimeTypeFilter {
- method public static boolean matches(java.lang.String, java.lang.String);
- method public static java.lang.String matches(java.lang.String, java.lang.String[]);
- method public static java.lang.String matches(java.lang.String[], java.lang.String);
- method public static java.lang.String[] matchesMany(java.lang.String[], java.lang.String);
- }
-
- public final class PermissionChecker {
- method public static int checkCallingOrSelfPermission(android.content.Context, java.lang.String);
- method public static int checkCallingPermission(android.content.Context, java.lang.String, java.lang.String);
- method public static int checkPermission(android.content.Context, java.lang.String, int, int, java.lang.String);
- method public static int checkSelfPermission(android.content.Context, java.lang.String);
- field public static final int PERMISSION_DENIED = -1; // 0xffffffff
- field public static final int PERMISSION_DENIED_APP_OP = -2; // 0xfffffffe
- field public static final int PERMISSION_GRANTED = 0; // 0x0
- }
-
public abstract deprecated class WakefulBroadcastReceiver extends android.content.BroadcastReceiver {
ctor public WakefulBroadcastReceiver();
method public static boolean completeWakefulIntent(android.content.Intent);
@@ -110,73 +8,3 @@
}
-package android.support.v4.graphics {
-
- public final class ColorUtils {
- method public static int HSLToColor(float[]);
- method public static int LABToColor(double, double, double);
- method public static void LABToXYZ(double, double, double, double[]);
- method public static void RGBToHSL(int, int, int, float[]);
- method public static void RGBToLAB(int, int, int, double[]);
- method public static void RGBToXYZ(int, int, int, double[]);
- method public static int XYZToColor(double, double, double);
- method public static void XYZToLAB(double, double, double, double[]);
- method public static int blendARGB(int, int, float);
- method public static void blendHSL(float[], float[], float, float[]);
- method public static void blendLAB(double[], double[], double, double[]);
- method public static double calculateContrast(int, int);
- method public static double calculateLuminance(int);
- method public static int calculateMinimumAlpha(int, int, float);
- method public static void colorToHSL(int, float[]);
- method public static void colorToLAB(int, double[]);
- method public static void colorToXYZ(int, double[]);
- method public static int compositeColors(int, int);
- method public static double distanceEuclidean(double[], double[]);
- method public static int setAlphaComponent(int, int);
- }
-
-}
-
-package android.support.v4.graphics.drawable {
-
- public abstract class RoundedBitmapDrawable extends android.graphics.drawable.Drawable {
- method public void draw(android.graphics.Canvas);
- method public final android.graphics.Bitmap getBitmap();
- method public float getCornerRadius();
- method public int getGravity();
- method public int getOpacity();
- method public final android.graphics.Paint getPaint();
- method public boolean hasAntiAlias();
- method public boolean hasMipMap();
- method public boolean isCircular();
- method public void setAlpha(int);
- method public void setAntiAlias(boolean);
- method public void setCircular(boolean);
- method public void setColorFilter(android.graphics.ColorFilter);
- method public void setCornerRadius(float);
- method public void setDither(boolean);
- method public void setGravity(int);
- method public void setMipMap(boolean);
- method public void setTargetDensity(android.graphics.Canvas);
- method public void setTargetDensity(android.util.DisplayMetrics);
- method public void setTargetDensity(int);
- }
-
- public final class RoundedBitmapDrawableFactory {
- method public static android.support.v4.graphics.drawable.RoundedBitmapDrawable create(android.content.res.Resources, android.graphics.Bitmap);
- method public static android.support.v4.graphics.drawable.RoundedBitmapDrawable create(android.content.res.Resources, java.lang.String);
- method public static android.support.v4.graphics.drawable.RoundedBitmapDrawable create(android.content.res.Resources, java.io.InputStream);
- }
-
-}
-
-package android.support.v4.math {
-
- public class MathUtils {
- method public static float clamp(float, float, float);
- method public static double clamp(double, double, double);
- method public static int clamp(int, int, int);
- }
-
-}
-
diff --git a/core-utils/src/androidTest/AndroidManifest.xml b/core-utils/src/androidTest/AndroidManifest.xml
deleted file mode 100644
index e3f1097..0000000
--- a/core-utils/src/androidTest/AndroidManifest.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2015 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.
- -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.support.coreutils.test">
- <uses-sdk android:targetSdkVersion="${target-sdk-version}"/>
-
- <uses-permission android:name="android.permission.VIBRATE"/>
- <uses-permission android:name="android.permission.WAKE_LOCK"/>
- <uses-permission android:name="android.permission.READ_CONTACTS"/>
- <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
-
- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
-
- <application>
- <activity android:name="android.support.v4.widget.test.TextViewTestActivity"/>
- <activity android:name="android.support.v4.app.FrameMetricsActivity"/>
- <activity android:name="android.support.v4.app.FrameMetricsSubActivity"/>
- <activity android:name="android.support.v4.widget.TestActivity"/>
- <provider
- android:name="android.support.v4.content.FileProvider"
- android:authorities="moocow"
- android:exported="false"
- android:grantUriPermissions="true">
- <meta-data
- android:name="android.support.FILE_PROVIDER_PATHS"
- android:resource="@xml/paths"/>
- </provider>
- </application>
-
-</manifest>
diff --git a/cursoradapter/api/current.txt b/cursoradapter/api/current.txt
new file mode 100644
index 0000000..07f7287
--- /dev/null
+++ b/cursoradapter/api/current.txt
@@ -0,0 +1,61 @@
+package android.support.v4.widget {
+
+ public abstract class CursorAdapter extends android.widget.BaseAdapter implements android.widget.Filterable {
+ ctor public deprecated CursorAdapter(android.content.Context, android.database.Cursor);
+ ctor public CursorAdapter(android.content.Context, android.database.Cursor, boolean);
+ ctor public CursorAdapter(android.content.Context, android.database.Cursor, int);
+ method public abstract void bindView(android.view.View, android.content.Context, android.database.Cursor);
+ method public void changeCursor(android.database.Cursor);
+ method public java.lang.CharSequence convertToString(android.database.Cursor);
+ method public int getCount();
+ method public android.database.Cursor getCursor();
+ method public android.widget.Filter getFilter();
+ method public android.widget.FilterQueryProvider getFilterQueryProvider();
+ method public java.lang.Object getItem(int);
+ method public long getItemId(int);
+ method public android.view.View getView(int, android.view.View, android.view.ViewGroup);
+ method protected deprecated void init(android.content.Context, android.database.Cursor, boolean);
+ method public android.view.View newDropDownView(android.content.Context, android.database.Cursor, android.view.ViewGroup);
+ method public abstract android.view.View newView(android.content.Context, android.database.Cursor, android.view.ViewGroup);
+ method protected void onContentChanged();
+ method public android.database.Cursor runQueryOnBackgroundThread(java.lang.CharSequence);
+ method public void setFilterQueryProvider(android.widget.FilterQueryProvider);
+ method public android.database.Cursor swapCursor(android.database.Cursor);
+ field public static final deprecated int FLAG_AUTO_REQUERY = 1; // 0x1
+ field public static final int FLAG_REGISTER_CONTENT_OBSERVER = 2; // 0x2
+ }
+
+ public abstract class ResourceCursorAdapter extends android.support.v4.widget.CursorAdapter {
+ ctor public deprecated ResourceCursorAdapter(android.content.Context, int, android.database.Cursor);
+ ctor public deprecated ResourceCursorAdapter(android.content.Context, int, android.database.Cursor, boolean);
+ ctor public ResourceCursorAdapter(android.content.Context, int, android.database.Cursor, int);
+ method public android.view.View newView(android.content.Context, android.database.Cursor, android.view.ViewGroup);
+ method public void setDropDownViewResource(int);
+ method public void setViewResource(int);
+ }
+
+ public class SimpleCursorAdapter extends android.support.v4.widget.ResourceCursorAdapter {
+ ctor public deprecated SimpleCursorAdapter(android.content.Context, int, android.database.Cursor, java.lang.String[], int[]);
+ ctor public SimpleCursorAdapter(android.content.Context, int, android.database.Cursor, java.lang.String[], int[], int);
+ method public void bindView(android.view.View, android.content.Context, android.database.Cursor);
+ method public void changeCursorAndColumns(android.database.Cursor, java.lang.String[], int[]);
+ method public android.support.v4.widget.SimpleCursorAdapter.CursorToStringConverter getCursorToStringConverter();
+ method public int getStringConversionColumn();
+ method public android.support.v4.widget.SimpleCursorAdapter.ViewBinder getViewBinder();
+ method public void setCursorToStringConverter(android.support.v4.widget.SimpleCursorAdapter.CursorToStringConverter);
+ method public void setStringConversionColumn(int);
+ method public void setViewBinder(android.support.v4.widget.SimpleCursorAdapter.ViewBinder);
+ method public void setViewImage(android.widget.ImageView, java.lang.String);
+ method public void setViewText(android.widget.TextView, java.lang.String);
+ }
+
+ public static abstract interface SimpleCursorAdapter.CursorToStringConverter {
+ method public abstract java.lang.CharSequence convertToString(android.database.Cursor);
+ }
+
+ public static abstract interface SimpleCursorAdapter.ViewBinder {
+ method public abstract boolean setViewValue(android.view.View, android.database.Cursor, int);
+ }
+
+}
+
diff --git a/cursoradapter/build.gradle b/cursoradapter/build.gradle
new file mode 100644
index 0000000..d08a8bc
--- /dev/null
+++ b/cursoradapter/build.gradle
@@ -0,0 +1,19 @@
+import android.support.LibraryGroups
+import android.support.LibraryVersions
+
+plugins {
+ id("SupportAndroidLibraryPlugin")
+}
+
+dependencies {
+ api(project(":support-annotations"))
+}
+
+supportLibrary {
+ name = "Android Support Library Cursor Adapter"
+ publish = true
+ mavenVersion = LibraryVersions.SUPPORT_LIBRARY
+ mavenGroup = LibraryGroups.SUPPORT
+ inceptionYear = "2018"
+ description = "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 14 or later."
+}
diff --git a/core-ui/src/androidTest/res/transition/change_bounds.xml b/cursoradapter/src/main/AndroidManifest.xml
similarity index 84%
rename from core-ui/src/androidTest/res/transition/change_bounds.xml
rename to cursoradapter/src/main/AndroidManifest.xml
index 766bcea..6965f79 100644
--- a/core-ui/src/androidTest/res/transition/change_bounds.xml
+++ b/cursoradapter/src/main/AndroidManifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<!-- Copyright (C) 2014 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.
@@ -13,4 +13,4 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<changeBounds/>
+<manifest package="android.support.cursoradapter"/>
diff --git a/core-ui/src/main/java/android/support/v4/widget/CursorAdapter.java b/cursoradapter/src/main/java/android/support/v4/widget/CursorAdapter.java
similarity index 100%
rename from core-ui/src/main/java/android/support/v4/widget/CursorAdapter.java
rename to cursoradapter/src/main/java/android/support/v4/widget/CursorAdapter.java
diff --git a/core-ui/src/main/java/android/support/v4/widget/CursorFilter.java b/cursoradapter/src/main/java/android/support/v4/widget/CursorFilter.java
similarity index 100%
rename from core-ui/src/main/java/android/support/v4/widget/CursorFilter.java
rename to cursoradapter/src/main/java/android/support/v4/widget/CursorFilter.java
diff --git a/core-ui/src/main/java/android/support/v4/widget/ResourceCursorAdapter.java b/cursoradapter/src/main/java/android/support/v4/widget/ResourceCursorAdapter.java
similarity index 99%
rename from core-ui/src/main/java/android/support/v4/widget/ResourceCursorAdapter.java
rename to cursoradapter/src/main/java/android/support/v4/widget/ResourceCursorAdapter.java
index 8a0136a..57051ca 100644
--- a/core-ui/src/main/java/android/support/v4/widget/ResourceCursorAdapter.java
+++ b/cursoradapter/src/main/java/android/support/v4/widget/ResourceCursorAdapter.java
@@ -18,9 +18,9 @@
import android.content.Context;
import android.database.Cursor;
+import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.view.LayoutInflater;
/**
* Static library support version of the framework's {@link android.widget.ResourceCursorAdapter}.
diff --git a/core-ui/src/main/java/android/support/v4/widget/SimpleCursorAdapter.java b/cursoradapter/src/main/java/android/support/v4/widget/SimpleCursorAdapter.java
similarity index 100%
rename from core-ui/src/main/java/android/support/v4/widget/SimpleCursorAdapter.java
rename to cursoradapter/src/main/java/android/support/v4/widget/SimpleCursorAdapter.java
diff --git a/settings.gradle b/settings.gradle
index f9c3769..06b1c32 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -40,6 +40,7 @@
includeProject(":cardview-v7", "v7/cardview")
includeProject(":collections", "collections")
includeProject(":coordinatorlayout", "coordinatorlayout")
+includeProject(":cursoradapter", "cursoradapter")
includeProject(":customtabs", "customtabs")
includeProject(":customview", "customview")
includeProject(":documentfile", "documentfile")
diff --git a/v7/recyclerview/src/main/java/android/support/v7/widget/RecyclerView.java b/v7/recyclerview/src/main/java/android/support/v7/widget/RecyclerView.java
index 327e4cd..d7cc9b9 100644
--- a/v7/recyclerview/src/main/java/android/support/v7/widget/RecyclerView.java
+++ b/v7/recyclerview/src/main/java/android/support/v7/widget/RecyclerView.java
@@ -41,6 +41,7 @@
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
+import android.support.annotation.Px;
import android.support.annotation.RestrictTo;
import android.support.annotation.VisibleForTesting;
import android.support.v4.os.TraceCompat;
@@ -588,15 +589,15 @@
}
};
- public RecyclerView(Context context) {
+ public RecyclerView(@NonNull Context context) {
this(context, null);
}
- public RecyclerView(Context context, @Nullable AttributeSet attrs) {
+ public RecyclerView(@NonNull Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
- public RecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle) {
+ public RecyclerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
if (attrs != null) {
TypedArray a = context.obtainStyledAttributes(attrs, CLIP_TO_PADDING_ATTR, defStyle, 0);
@@ -689,6 +690,7 @@
* Returns the accessibility delegate compatibility implementation used by the RecyclerView.
* @return An instance of AccessibilityDelegateCompat used by RecyclerView
*/
+ @Nullable
public RecyclerViewAccessibilityDelegate getCompatAccessibilityDelegate() {
return mAccessibilityDelegate;
}
@@ -698,7 +700,7 @@
* @param accessibilityDelegate The accessibility delegate to be used by RecyclerView.
*/
public void setAccessibilityDelegateCompat(
- RecyclerViewAccessibilityDelegate accessibilityDelegate) {
+ @Nullable RecyclerViewAccessibilityDelegate accessibilityDelegate) {
mAccessibilityDelegate = accessibilityDelegate;
ViewCompat.setAccessibilityDelegate(this, mAccessibilityDelegate);
}
@@ -1067,7 +1069,7 @@
* this to false.
* @see #setAdapter(Adapter)
*/
- public void swapAdapter(Adapter adapter, boolean removeAndRecycleExistingViews) {
+ public void swapAdapter(@Nullable Adapter adapter, boolean removeAndRecycleExistingViews) {
// bail out if layout is frozen
setLayoutFrozen(false);
setAdapterInternal(adapter, true, removeAndRecycleExistingViews);
@@ -1083,7 +1085,7 @@
* @param adapter The new adapter to set, or null to set no adapter.
* @see #swapAdapter(Adapter, boolean)
*/
- public void setAdapter(Adapter adapter) {
+ public void setAdapter(@Nullable Adapter adapter) {
// bail out if layout is frozen
setLayoutFrozen(false);
setAdapterInternal(adapter, false, true);
@@ -1120,7 +1122,7 @@
* @param removeAndRecycleViews If true, we'll remove and recycle all existing views. If
* compatibleWithPrevious is false, this parameter is ignored.
*/
- private void setAdapterInternal(Adapter adapter, boolean compatibleWithPrevious,
+ private void setAdapterInternal(@Nullable Adapter adapter, boolean compatibleWithPrevious,
boolean removeAndRecycleViews) {
if (mAdapter != null) {
mAdapter.unregisterAdapterDataObserver(mObserver);
@@ -1149,6 +1151,7 @@
* @return The previously set adapter
* @see #setAdapter(Adapter)
*/
+ @Nullable
public Adapter getAdapter() {
return mAdapter;
}
@@ -1163,7 +1166,7 @@
*
* @param listener Listener to register, or null to clear
*/
- public void setRecyclerListener(RecyclerListener listener) {
+ public void setRecyclerListener(@Nullable RecyclerListener listener) {
mRecyclerListener = listener;
}
@@ -1195,7 +1198,8 @@
*
* @param listener Listener to register
*/
- public void addOnChildAttachStateChangeListener(OnChildAttachStateChangeListener listener) {
+ public void addOnChildAttachStateChangeListener(
+ @NonNull OnChildAttachStateChangeListener listener) {
if (mOnChildAttachStateListeners == null) {
mOnChildAttachStateListeners = new ArrayList<>();
}
@@ -1207,7 +1211,8 @@
*
* @param listener Listener to unregister
*/
- public void removeOnChildAttachStateChangeListener(OnChildAttachStateChangeListener listener) {
+ public void removeOnChildAttachStateChangeListener(
+ @NonNull OnChildAttachStateChangeListener listener) {
if (mOnChildAttachStateListeners == null) {
return;
}
@@ -1236,7 +1241,7 @@
*
* @param layout LayoutManager to use
*/
- public void setLayoutManager(LayoutManager layout) {
+ public void setLayoutManager(@Nullable LayoutManager layout) {
if (layout == mLayout) {
return;
}
@@ -1394,6 +1399,7 @@
*
* @return The currently bound LayoutManager
*/
+ @Nullable
public LayoutManager getLayoutManager() {
return mLayout;
}
@@ -1406,6 +1412,7 @@
* @return The pool used to store recycled item views for reuse.
* @see #setRecycledViewPool(RecycledViewPool)
*/
+ @NonNull
public RecycledViewPool getRecycledViewPool() {
return mRecycler.getRecycledViewPool();
}
@@ -1418,7 +1425,7 @@
*
* @param pool Pool to set. If this parameter is null a new pool will be created and used.
*/
- public void setRecycledViewPool(RecycledViewPool pool) {
+ public void setRecycledViewPool(@Nullable RecycledViewPool pool) {
mRecycler.setRecycledViewPool(pool);
}
@@ -1429,7 +1436,7 @@
*
* @see ViewCacheExtension#getViewForPositionAndType(Recycler, int, int)
*/
- public void setViewCacheExtension(ViewCacheExtension extension) {
+ public void setViewCacheExtension(@Nullable ViewCacheExtension extension) {
mRecycler.setViewCacheExtension(extension);
}
@@ -1487,7 +1494,7 @@
* @param index Position in the decoration chain to insert this decoration at. If this value
* is negative the decoration will be added at the end.
*/
- public void addItemDecoration(ItemDecoration decor, int index) {
+ public void addItemDecoration(@NonNull ItemDecoration decor, int index) {
if (mLayout != null) {
mLayout.assertNotInLayoutOrScroll("Cannot add item decoration during a scroll or"
+ " layout");
@@ -1516,7 +1523,7 @@
*
* @param decor Decoration to add
*/
- public void addItemDecoration(ItemDecoration decor) {
+ public void addItemDecoration(@NonNull ItemDecoration decor) {
addItemDecoration(decor, -1);
}
@@ -1524,8 +1531,10 @@
* Returns an {@link ItemDecoration} previously added to this RecyclerView.
*
* @param index The index position of the desired ItemDecoration.
- * @return the ItemDecoration at index position, or null if invalid index.
+ * @return the ItemDecoration at index position
+ * @throws IndexOutOfBoundsException on invalid index
*/
+ @NonNull
public ItemDecoration getItemDecorationAt(int index) {
final int size = getItemDecorationCount();
if (index < 0 || index >= size) {
@@ -1567,7 +1576,7 @@
* @param decor Decoration to remove
* @see #addItemDecoration(ItemDecoration)
*/
- public void removeItemDecoration(ItemDecoration decor) {
+ public void removeItemDecoration(@NonNull ItemDecoration decor) {
if (mLayout != null) {
mLayout.assertNotInLayoutOrScroll("Cannot remove item decoration during a scroll or"
+ " layout");
@@ -1592,7 +1601,8 @@
* @param childDrawingOrderCallback The ChildDrawingOrderCallback to be used by the drawing
* system.
*/
- public void setChildDrawingOrderCallback(ChildDrawingOrderCallback childDrawingOrderCallback) {
+ public void setChildDrawingOrderCallback(
+ @Nullable ChildDrawingOrderCallback childDrawingOrderCallback) {
if (childDrawingOrderCallback == mChildDrawingOrderCallback) {
return;
}
@@ -1609,7 +1619,7 @@
* {@link #removeOnScrollListener(OnScrollListener)}
*/
@Deprecated
- public void setOnScrollListener(OnScrollListener listener) {
+ public void setOnScrollListener(@Nullable OnScrollListener listener) {
mScrollListener = listener;
}
@@ -1620,9 +1630,9 @@
* Other components that take ownership of a view may call {@link #clearOnScrollListeners()}
* to remove all attached listeners.</p>
*
- * @param listener listener to set or null to clear
+ * @param listener listener to set
*/
- public void addOnScrollListener(OnScrollListener listener) {
+ public void addOnScrollListener(@NonNull OnScrollListener listener) {
if (mScrollListeners == null) {
mScrollListeners = new ArrayList<>();
}
@@ -1634,7 +1644,7 @@
*
* @param listener listener to set or null to clear
*/
- public void removeOnScrollListener(OnScrollListener listener) {
+ public void removeOnScrollListener(@NonNull OnScrollListener listener) {
if (mScrollListeners != null) {
mScrollListeners.remove(listener);
}
@@ -2151,7 +2161,7 @@
* @param dx Pixels to scroll horizontally
* @param dy Pixels to scroll vertically
*/
- public void smoothScrollBy(int dx, int dy) {
+ public void smoothScrollBy(@Px int dx, @Px int dy) {
smoothScrollBy(dx, dy, null);
}
@@ -2163,7 +2173,7 @@
* @param interpolator {@link Interpolator} to be used for scrolling. If it is
* {@code null}, RecyclerView is going to use the default interpolator.
*/
- public void smoothScrollBy(int dx, int dy, Interpolator interpolator) {
+ public void smoothScrollBy(@Px int dx, @Px int dy, @Nullable Interpolator interpolator) {
if (mLayout == null) {
Log.e(TAG, "Cannot smooth scroll without a LayoutManager set. "
+ "Call setLayoutManager with a non-null argument.");
@@ -2462,6 +2472,7 @@
* @return The previously set {@link EdgeEffectFactory}
* @see #setEdgeEffectFactory(EdgeEffectFactory)
*/
+ @NonNull
public EdgeEffectFactory getEdgeEffectFactory() {
return mEdgeEffectFactory;
}
@@ -2828,7 +2839,7 @@
* @param listener Listener to add
* @see SimpleOnItemTouchListener
*/
- public void addOnItemTouchListener(OnItemTouchListener listener) {
+ public void addOnItemTouchListener(@NonNull OnItemTouchListener listener) {
mOnItemTouchListeners.add(listener);
}
@@ -2837,7 +2848,7 @@
*
* @param listener Listener to remove
*/
- public void removeOnItemTouchListener(OnItemTouchListener listener) {
+ public void removeOnItemTouchListener(@NonNull OnItemTouchListener listener) {
mOnItemTouchListeners.remove(listener);
if (mActiveOnItemTouchListener == listener) {
mActiveOnItemTouchListener = null;
@@ -3353,7 +3364,7 @@
* @param animator The ItemAnimator being set. If null, no animations will occur
* when changes occur to the items in this RecyclerView.
*/
- public void setItemAnimator(ItemAnimator animator) {
+ public void setItemAnimator(@Nullable ItemAnimator animator) {
if (mItemAnimator != null) {
mItemAnimator.endAnimations();
mItemAnimator.setListener(null);
@@ -3465,6 +3476,7 @@
* @return ItemAnimator The current ItemAnimator. If null, no animations will occur
* when changes occur to the items in this RecyclerView.
*/
+ @Nullable
public ItemAnimator getItemAnimator() {
return mItemAnimator;
}
@@ -4547,7 +4559,7 @@
* @param child Child View to query
* @return Adapter position corresponding to the given view or {@link #NO_POSITION}
*/
- public int getChildAdapterPosition(View child) {
+ public int getChildAdapterPosition(@NonNull View child) {
final ViewHolder holder = getChildViewHolderInt(child);
return holder != null ? holder.getAdapterPosition() : NO_POSITION;
}
@@ -4562,7 +4574,7 @@
* @return Adapter position of the given View as of last layout pass or {@link #NO_POSITION} if
* the View is representing a removed item.
*/
- public int getChildLayoutPosition(View child) {
+ public int getChildLayoutPosition(@NonNull View child) {
final ViewHolder holder = getChildViewHolderInt(child);
return holder != null ? holder.getLayoutPosition() : NO_POSITION;
}
@@ -4573,7 +4585,7 @@
* @param child Child View to query
* @return Item id corresponding to the given view or {@link #NO_ID}
*/
- public long getChildItemId(View child) {
+ public long getChildItemId(@NonNull View child) {
if (mAdapter == null || !mAdapter.hasStableIds()) {
return NO_ID;
}
@@ -4717,6 +4729,7 @@
* @param y Vertical position in pixels to search
* @return The child view under (x, y) or null if no matching child is found
*/
+ @Nullable
public View findChildViewUnder(float x, float y) {
final int count = mChildHelper.getChildCount();
for (int i = count - 1; i >= 0; i--) {
@@ -4744,7 +4757,7 @@
*
* @param dy Vertical pixel offset to apply to the bounds of all child views
*/
- public void offsetChildrenVertical(int dy) {
+ public void offsetChildrenVertical(@Px int dy) {
final int childCount = mChildHelper.getChildCount();
for (int i = 0; i < childCount; i++) {
mChildHelper.getChildAt(i).offsetTopAndBottom(dy);
@@ -4761,7 +4774,7 @@
*
* @param child Child view that is now attached to this RecyclerView and its associated window
*/
- public void onChildAttachedToWindow(View child) {
+ public void onChildAttachedToWindow(@NonNull View child) {
}
/**
@@ -4773,7 +4786,7 @@
*
* @param child Child view that is now detached from this RecyclerView and its associated window
*/
- public void onChildDetachedFromWindow(View child) {
+ public void onChildDetachedFromWindow(@NonNull View child) {
}
/**
@@ -4782,7 +4795,7 @@
*
* @param dx Horizontal pixel offset to apply to the bounds of all child views
*/
- public void offsetChildrenHorizontal(int dx) {
+ public void offsetChildrenHorizontal(@Px int dx) {
final int childCount = mChildHelper.getChildCount();
for (int i = 0; i < childCount; i++) {
mChildHelper.getChildAt(i).offsetLeftAndRight(dx);
@@ -4796,7 +4809,7 @@
* @param outBounds A rect that will receive the bounds of the element including its
* decoration and margins.
*/
- public void getDecoratedBoundsWithMargins(View view, Rect outBounds) {
+ public void getDecoratedBoundsWithMargins(@NonNull View view, @NonNull Rect outBounds) {
getDecoratedBoundsWithMarginsInt(view, outBounds);
}
@@ -4854,7 +4867,7 @@
* @param dx horizontal distance scrolled in pixels
* @param dy vertical distance scrolled in pixels
*/
- public void onScrolled(int dx, int dy) {
+ public void onScrolled(@Px int dx, @Px int dy) {
// Do nothing
}
@@ -5281,7 +5294,7 @@
/**
* Create a new EdgeEffect for the provided direction.
*/
- protected @NonNull EdgeEffect createEdgeEffect(RecyclerView view,
+ protected @NonNull EdgeEffect createEdgeEffect(@NonNull RecyclerView view,
@EdgeDirection int direction) {
return new EdgeEffect(view.getContext());
}
@@ -5605,6 +5618,7 @@
*
* @return List of ViewHolders in the scrap list.
*/
+ @NonNull
public List<ViewHolder> getScrapList() {
return mUnmodifiableAttachedScrap;
}
@@ -5656,7 +5670,7 @@
* bind the holder.
* @return
*/
- private boolean tryBindViewHolderByDeadline(ViewHolder holder, int offsetPosition,
+ private boolean tryBindViewHolderByDeadline(@NonNull ViewHolder holder, int offsetPosition,
int position, long deadlineNs) {
holder.mOwnerRecyclerView = RecyclerView.this;
final int viewType = holder.getItemViewType();
@@ -5691,7 +5705,7 @@
* @param view The view to update.
* @param position The position of the item to bind to this View.
*/
- public void bindViewToPosition(View view, int position) {
+ public void bindViewToPosition(@NonNull View view, int position) {
ViewHolder holder = getChildViewHolderInt(view);
if (holder == null) {
throw new IllegalArgumentException("The view does not have a ViewHolder. You cannot"
@@ -5766,6 +5780,7 @@
* @param position Position to obtain a view for
* @return A view representing the data at <code>position</code> from <code>adapter</code>
*/
+ @NonNull
public View getViewForPosition(int position) {
return getViewForPosition(position, false);
}
@@ -6004,7 +6019,7 @@
* @param view Removed view for recycling
* @see LayoutManager#removeAndRecycleView(View, Recycler)
*/
- public void recycleView(View view) {
+ public void recycleView(@NonNull View view) {
// This public recycle method tries to make view recycle-able since layout manager
// intended to recycle this view (e.g. even if it is in scrap or change cache)
ViewHolder holder = getChildViewHolderInt(view);
@@ -6600,7 +6615,9 @@
* @return A View that is bound to the given position or NULL if there is no View to re-use
* @see LayoutManager#ignoreView(View)
*/
- public abstract View getViewForPositionAndType(Recycler recycler, int position, int type);
+ @Nullable
+ public abstract View getViewForPositionAndType(@NonNull Recycler recycler, int position,
+ int type);
}
/**
@@ -6701,6 +6718,7 @@
*
* @see #onCreateViewHolder(ViewGroup, int)
*/
+ @NonNull
public final VH createViewHolder(@NonNull ViewGroup parent, int viewType) {
try {
TraceCompat.beginSection(TRACE_CREATE_VIEW_TAG);
@@ -10492,7 +10510,7 @@
* @param newState The updated scroll state. One of {@link #SCROLL_STATE_IDLE},
* {@link #SCROLL_STATE_DRAGGING} or {@link #SCROLL_STATE_SETTLING}.
*/
- public void onScrollStateChanged(RecyclerView recyclerView, int newState){}
+ public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState){}
/**
* Callback method to be invoked when the RecyclerView has been scrolled. This will be
@@ -10505,7 +10523,7 @@
* @param dx The amount of horizontal scroll.
* @param dy The amount of vertical scroll.
*/
- public void onScrolled(RecyclerView recyclerView, int dx, int dy){}
+ public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy){}
}
/**
@@ -10706,7 +10724,7 @@
*/
RecyclerView mOwnerRecyclerView;
- public ViewHolder(View itemView) {
+ public ViewHolder(@NonNull View itemView) {
if (itemView == null) {
throw new IllegalArgumentException("itemView may not be null");
}
@@ -11623,7 +11641,8 @@
* @param action If you want to trigger a new smooth scroll and cancel the previous one,
* update this object.
*/
- protected abstract void onSeekTargetStep(int dx, int dy, State state, Action action);
+ protected abstract void onSeekTargetStep(@Px int dx, @Px int dy, State state,
+ Action action);
/**
* Called when the target position is laid out. This is the last callback SmoothScroller
@@ -11663,7 +11682,7 @@
* @param dx Pixels to scroll horizontally
* @param dy Pixels to scroll vertically
*/
- public Action(int dx, int dy) {
+ public Action(@Px int dx, @Px int dy) {
this(dx, dy, UNDEFINED_DURATION, null);
}
@@ -11672,7 +11691,7 @@
* @param dy Pixels to scroll vertically
* @param duration Duration of the animation in milliseconds
*/
- public Action(int dx, int dy, int duration) {
+ public Action(@Px int dx, @Px int dy, int duration) {
this(dx, dy, duration, null);
}
@@ -11683,7 +11702,8 @@
* @param interpolator Interpolator to be used when calculating scroll position in each
* animation step
*/
- public Action(int dx, int dy, int duration, Interpolator interpolator) {
+ public Action(@Px int dx, @Px int dy, int duration,
+ @Nullable Interpolator interpolator) {
mDx = dx;
mDy = dy;
mDuration = duration;
@@ -11755,20 +11775,22 @@
}
}
+ @Px
public int getDx() {
return mDx;
}
- public void setDx(int dx) {
+ public void setDx(@Px int dx) {
mChanged = true;
mDx = dx;
}
+ @Px
public int getDy() {
return mDy;
}
- public void setDy(int dy) {
+ public void setDy(@Px int dy) {
mChanged = true;
mDy = dy;
}
@@ -11782,6 +11804,7 @@
mDuration = duration;
}
+ @Nullable
public Interpolator getInterpolator() {
return mInterpolator;
}
@@ -11792,7 +11815,7 @@
* also set the duration.
* @see #setDuration(int)
*/
- public void setInterpolator(Interpolator interpolator) {
+ public void setInterpolator(@Nullable Interpolator interpolator) {
mChanged = true;
mInterpolator = interpolator;
}
@@ -11805,7 +11828,8 @@
* @param interpolator Interpolator to be used when calculating scroll position in each
* animation step
*/
- public void update(int dx, int dy, int duration, Interpolator interpolator) {
+ public void update(@Px int dx, @Px int dy, int duration,
+ @Nullable Interpolator interpolator) {
mDx = dx;
mDy = dy;
mDuration = duration;