Saturday, November 8, 2008

List with custom or no separator

My achievement today ( OK, it's just a small one )

I wanted to have no separator in my list activity...

After some moment parsing all the documentation in every possible way, here what I found :

public class ScorePage extends ListActivity
{

Score mScore;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);

this.getListView().setDivider( null );
this.getListView().setDividerHeight(0);
}


By the way, is the DividerHeight set necessary ?
I added it because of a very stressful comment on the SetDivider method...

(One test later )

It is by no way necessary !!
But I find that adding a non zero height was what I was wanting for, ie adding a blank space between two entries !


Next step tomorrow !

Starting point

This is the first message...

As usual ( ? ), it doesn't have any purpose, but essentially to verify that the text I'm writing right now will appear somewhere on the Internet !

So I will just introduce myself :
I'm a (professional) game developer, so quite an expert of C++ trickery, essentially on Xbox360 and PS3 ( though I also worked on Wii, PS2 and GC ), and, obviously, on PC.

This is the diary of the creation, in my spare time ( essentially my nights, when wife and kids are sleeping ), of a casual game on Google Android phones !

I'm discovering java, the mobile world, eclipse, and the Google world !