A set of rules for authoring public APIs in Java and Kotlin with the intent that the code will feel idiomatic when consumed from the other language.
Category: IT
Architectures of Android applications
update 14/05/2018
About MVVM and Kotlin in architecting-android-reloaded (github)
https://medium.com/@bvmaks/architectures-of-android-applications-244a083bf132
Forms & Controls
Model View Controller
Model View Presenter
Model View ViewModel
Model View Intent
Comparative Analysis
Google I/O 2018
LinkifyCompat, get Urls
[code language=”java”]
import android.support.v4.text.util.LinkifyCompat;
@Nullable
public void find(@NonNull String text) {
List<String> urls = getLinkifiedUrls(text);
for (String url : urls) {
//
}
}
private List<String> getLinkifiedUrls(String text) {
SpannableString ss = new SpannableString(text);
LinkifyCompat.addLinks(ss, Linkify.WEB_URLS);
URLSpan[] urls = ss.getSpans(0, ss.length(), URLSpan.class);
ArrayList<String> result = new ArrayList<>();
for (URLSpan url : urls) {
result.add(url.getURL());
}
return result;
}
[/code]