Compatibility for ClipboardManager, from API level 1.
Related post: 再谈 Android API 兼容性处理
ABOUT ME / 关注我: Github | twitter | 微博
public interface ClipboardManagerCompat {
void addPrimaryClipChangedListener(OnPrimaryClipChangedListener listener);
void removePrimaryClipChangedListener(OnPrimaryClipChangedListener listener);
CharSequence getText();
void setText(CharSequence text);
boolean hasText();
}
- Screen snapshot
Repositories:
allprojects {
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
jcenter()
}
}
Add to dependencies:
compile 'in.srain.cube:clipboard-manager-compat:1.0.3'
MIT