LCL-Android: Fixes a Java compilation error missed from the last commit and makes the ListView colors better

git-svn-id: trunk@37693 -
This commit is contained in:
sekelsenmat 2012-06-19 15:06:21 +00:00
parent fad008f0a0
commit d6534044c7

View File

@ -667,7 +667,7 @@ public class LCLActivity extends Activity implements SensorEventListener, Locati
//
public void LCLDoShowListViewDialog(String ATitle, String[] AItems, String[] ASubItems)
{
Dialog dialog = new Dialog(this);
final Dialog dialog = new Dialog(this);
ListView lListView = new ListView(this);
List<LCL_ListViewItem> listItems = new ArrayList<LCL_ListViewItem>();
@ -741,7 +741,7 @@ public class LCLActivity extends Activity implements SensorEventListener, Locati
{
private List<LCL_ListViewItem> Items;
// Colors to alternate
private int[] colors = new int[] { 0xffffffff, 0xff808080 };
private int[] colors = new int[] { 0xff292C29, 0xff424542 };
@SuppressWarnings("unchecked") public LCL_ListViewAdapter(
Context context,
@ -758,12 +758,16 @@ public class LCLActivity extends Activity implements SensorEventListener, Locati
{
View view = super.getView(position, convertView, parent);
//int colorPos = position % colors.length;
//view.setBackgroundColor(colors[colorPos]);
int colorPos = position % colors.length;
view.setBackgroundColor(colors[colorPos]);
return view;
}
}
// -------------------------------------------
// End of the helper classes of LCLDoShowListViewDialog
// -------------------------------------------
// -------------------------------------------
// Fields exported to the Pascal side for easier data communication
// -------------------------------------------