How to understand the number of rows that will be shown in the screen for that listview? What I try to tell is as you see the columns are leveled which is what I don't want. I want to know how many rows can user's phone see, which will make my time table list to fit it.
Also how can I remove the bar on top? I don't know what it is called, so couldn't search for it either.
For the first part, there might be some other conventional way of doing it, but this is how I would 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;
Then find the number of entries in your list by using mListView.getCount()
. Divide the total height available with the number of rows to get the height of each row.
For the second part of your question,
It is called the TitleBar and you can hide it by adding the following code in your AndroidManifest.xml
file :
<activity android:name=".ActivityName"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
</activity>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With