| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.text; |
| 18 |
|
| 19 |
import android.os.Parcel; |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
public class Annotation implements ParcelableSpan { |
| 27 |
private final String mKey; |
| 28 |
private final String mValue; |
| 29 |
|
| 30 |
public Annotation(String key, String value) { |
| 31 |
mKey = key; |
| 32 |
mValue = value; |
| 33 |
} |
| 34 |
|
| 35 |
public Annotation(Parcel src) { |
| 36 |
mKey = src.readString(); |
| 37 |
mValue = src.readString(); |
| 38 |
} |
| 39 |
|
| 40 |
public int getSpanTypeId() { |
| 41 |
return getSpanTypeIdInternal(); |
| 42 |
} |
| 43 |
|
| 44 |
|
| 45 |
public int getSpanTypeIdInternal() { |
| 46 |
return TextUtils.ANNOTATION; |
| 47 |
} |
| 48 |
|
| 49 |
public int describeContents() { |
| 50 |
return 0; |
| 51 |
} |
| 52 |
|
| 53 |
public void writeToParcel(Parcel dest, int flags) { |
| 54 |
writeToParcelInternal(dest, flags); |
| 55 |
} |
| 56 |
|
| 57 |
|
| 58 |
public void writeToParcelInternal(Parcel dest, int flags) { |
| 59 |
dest.writeString(mKey); |
| 60 |
dest.writeString(mValue); |
| 61 |
} |
| 62 |
|
| 63 |
public String getKey() { |
| 64 |
return mKey; |
| 65 |
} |
| 66 |
|
| 67 |
public String getValue() { |
| 68 |
return mValue; |
| 69 |
} |
| 70 |
} |