ListView listView = findViewById(R.id.my_listview); int dividerHeight = listView.getDividerHeight();In this example, we get a reference to a ListView with an ID of "my_listview", and then we get the height of its dividers in pixels using the getDividerHeight method. The value returned by this method is stored in the dividerHeight variable. This method is part of the android.widget.ListView package library.