package com.magneticbear.scala1;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Favourites extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_favourites);
        setupButtons();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_favourites, menu);
        return true;
    }
    
    public void setupButtons()
    {
    	final Button rocker_events   = (Button)findViewById(R.id.rocker_events);
    	final Button rocker_speakers = (Button)findViewById(R.id.rocker_speakers);
    
    	rocker_events.setOnClickListener(new OnClickListener() 
    	{
			@Override
			public void onClick(View v) 
			{
				rocker_events.setBackgroundResource(R.drawable.fav_tab_left_down);
				rocker_speakers.setBackgroundResource(R.drawable.fav_tab_right_up);
			}
		});
    	rocker_speakers.setOnClickListener(new OnClickListener() 
    	{	
			@Override
			public void onClick(View v) 
			{
				rocker_events.setBackgroundResource(R.drawable.fav_tab_left_up);
				rocker_speakers.setBackgroundResource(R.drawable.fav_tab_right_down);
			}
		});
    }
}

@@ -205,16 +205,48 @@
 .Button;
+%0Aimport android.widget.ListView;
 %0A%0Apublic
@@ -473,16 +473,39 @@
 tons();%0A
+        show_events();%0A
     %7D%0A%0A 
@@ -1131,16 +1131,35 @@
 ht_up);%0A
+%09%09%09%09show_events();%0A
 %09%09%09%7D%0A%09%09%7D
@@ -1432,20 +1432,650 @@
 %0A%09%09%09
-%7D%0A%09%09%7D);%0A    %7D%0A%7D
+%09show_speakers();%0A%09%09%09%7D%0A%09%09%7D);%0A    %7D%0A    %0A    public void show_events()%0A    %7B%0A    %09UserData.load_or_create();%0A    %09Struct_Event_Adapter adapter = new Struct_Event_Adapter(getBaseContext(), R.id.struct_event_adapter_row_title, UserData.fav_events);%0A    %09((ListView)findViewById(R.id.favourites_list)).setAdapter(adapter);%0A    %09%0A    %7D%0A    public void show_speakers()%0A    %7B%0A    %09UserData.load_or_create();%0A     %09Struct_Speaker_Adapter adapter = new Struct_Speaker_Adapter(getBaseContext(), R.id.struct_speaker_adapter_row_title, UserData.fav_speakers);%0A     %09((ListView)findViewById(R.id.favourites_list)).setAdapter(adapter);%0A    %7D%0A%7D%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A
 %0A

debug checkpoint