Import Android SDK Platform PI [4335822]
/google/data/ro/projects/android/fetch_artifact \
--bid 4335822 \
--target sdk_phone_armv7-win_sdk \
sdk-repo-linux-sources-4335822.zip
AndroidVersion.ApiLevel has been modified to appear as 28
Change-Id: Ic8f04be005a71c2b9abeaac754d8da8d6f9a2c32
diff --git a/android/text/Spannable.java b/android/text/Spannable.java
new file mode 100644
index 0000000..39b78eb
--- /dev/null
+++ b/android/text/Spannable.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2006 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.text;
+
+/**
+ * This is the interface for text to which markup objects can be
+ * attached and detached. Not all Spannable classes have mutable text;
+ * see {@link Editable} for that.
+ */
+public interface Spannable
+extends Spanned
+{
+ /**
+ * Attach the specified markup object to the range <code>start…end</code>
+ * of the text, or move the object to that range if it was already
+ * attached elsewhere. See {@link Spanned} for an explanation of
+ * what the flags mean. The object can be one that has meaning only
+ * within your application, or it can be one that the text system will
+ * use to affect text display or behavior. Some noteworthy ones are
+ * the subclasses of {@link android.text.style.CharacterStyle} and
+ * {@link android.text.style.ParagraphStyle}, and
+ * {@link android.text.TextWatcher} and
+ * {@link android.text.SpanWatcher}.
+ */
+ public void setSpan(Object what, int start, int end, int flags);
+
+ /**
+ * Remove the specified object from the range of text to which it
+ * was attached, if any. It is OK to remove an object that was never
+ * attached in the first place.
+ */
+ public void removeSpan(Object what);
+
+ /**
+ * Factory used by TextView to create new {@link Spannable Spannables}. You can subclass
+ * it to provide something other than {@link SpannableString}.
+ *
+ * @see android.widget.TextView#setSpannableFactory(Factory)
+ */
+ public static class Factory {
+ private static Spannable.Factory sInstance = new Spannable.Factory();
+
+ /**
+ * Returns the standard Spannable Factory.
+ */
+ public static Spannable.Factory getInstance() {
+ return sInstance;
+ }
+
+ /**
+ * Returns a new SpannableString from the specified CharSequence.
+ * You can override this to provide a different kind of Spannable.
+ */
+ public Spannable newSpannable(CharSequence source) {
+ return new SpannableString(source);
+ }
+ }
+}