use of org.odk.collect.android.views.CustomWebView in project collect by opendatakit.
the class SelectImageMapWidget method createLayout.
private void createLayout() {
readItems();
webView = new CustomWebView(getContext());
selectedAreasLabel = getAnswerTextView();
answerLayout.addView(webView);
answerLayout.addView(selectedAreasLabel);
// add a space to facilitate scrolling
int width = Math.round(getResources().getDisplayMetrics().widthPixels / getResources().getDisplayMetrics().density);
// 5% of the screen
int paddingInDp = width / 20;
final float scale = getResources().getDisplayMetrics().density;
int paddingInPx = (int) (paddingInDp * scale + 0.5f);
answerLayout.setPadding(0, 0, paddingInPx, 0);
addAnswerView(answerLayout);
setUpWebView();
}
Aggregations