Change layout from static to dynamic and add the ArrayAdapter