, , -.
CSS .
onTouchListener, -
TextView Webview:
<WebView
android:id="@+id/noticetit"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
:
WebView webView = (WebView) findViewById(R.id.noticetit);
private void setWebView() {
String htmlcss = "<html lang=\"he\"><head><meta charset=\"utf-8\" />"
+ "<style type=\"text/css\">.rtl {direction: rtl;color:black;font:20px arial;}</style></head>"
+ "<body class=\"rtl\"><div class=\"rtl\">" + webView
+ "</div></body></html>";
webView.loadDataWithBaseURL(null, htmlcss, "text/html", "utf-8", null);
webView.setOnTouchListener(new OnTouchListener() {
// Removed @Override
public boolean onTouch(View v, MotionEvent event) {
if (v.getId() == R.id.maintitle
&& event.getAction() == MotionEvent.ACTION_DOWN) {
//Put your code here
}
return false;
}
});
}
, !