This is post # 5 of the series dedicated to exploring JavaScript and its building components. In the process of identifying and describing…
Source: How JavaScript works: Deep dive into WebSockets and HTTP/2 with SSE + how to pick the right path
This is post # 5 of the series dedicated to exploring JavaScript and its building components. In the process of identifying and describing…
Source: How JavaScript works: Deep dive into WebSockets and HTTP/2 with SSE + how to pick the right path
in case you have the need to log.i the selected item of an listview this snippet could help:
[java]
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
CheckedTextView checkedTextView = (CheckedTextView) view;
String itemClicked = (String) listView.getAdapter().getItem(i);
if (checkedTextView.isChecked()) {
Log.i("Info :", itemClicked + " is checked");
Toast.makeText(UsersActivity.this, itemClicked + " is checked", Toast.LENGTH_SHORT).show();
} else {
Log.i("Info :", itemClicked + " is NOT Checked");
Toast.makeText(UsersActivity.this, itemClicked + " is NOT checked", Toast.LENGTH_SHORT).show();
}
}
[/java]