Retrieving List Size

How to understand the number of lines that will be displayed on the screen for this list? I'm trying to say, since you see that the columns are aligned, and that is what I don't want. I want to know how many rows a user phone can see, which will make my list of time tables suitable.

Also how can I remove the panel from above? I do not know what it's called, so I could not find it.

Myapp

+5
source share
1 answer

There may be some other ordinary way to do this for the first part, but that’s how I approach it.

First find the height of the screen using

Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int height = size.y;

mListView.getCount(). , , .

TitleBar, , AndroidManifest.xml:

<activity android:name=".ActivityName"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
</activity>
+3

All Articles