Android UI is too complicated to work with, sometimes, you can easily get things done with javascript and HTML with a fair share of CSS.

In the next image, you can see how I used Javascript Datatables inside android Activity:

Android Activity with Javascript Datatables. link to google play here

All the HTML and Javascript content is loaded from Asset File, this file is edited by the javascript and then loaded into Android WebView.

The next snippet enable running javascript inside the webview:

WebView lWebView = (WebView)findViewById(;

After that, I read the html page from the asset files and inject the json data to be presented:

InputStream is = getApplicationContext().getAssets().open("logs_template.html");
Reader r = new InputStreamReader(is);
String details = CharStreams.toString(r);
String logsRecords = logsToHTML();
String summary = generateSummary();
details = details.replace("LOGS_HERE",logsRecords );
details = details.replace("SUMMARY_HERE",summary );

The data can be loaded into the WebView by simply load the manipulated String:

lWebView.loadData(details, "text/html",  "utf-8");
lWebView.setWebChromeClient(new WebChromeClient());

The javascript can be a powerful part of android when it can interact with Java. The next link provides examples for that.

The HTML file’s content that i load can be found on my github.

Link to google play: here