Skip to content

Instantly share code, notes, and snippets.

@sli
Created April 1, 2012 01:08
Show Gist options
  • Select an option

  • Save sli/2270248 to your computer and use it in GitHub Desktop.

Select an option

Save sli/2270248 to your computer and use it in GitHub Desktop.
I hate OCL.
package com.signedlongint.tropiary;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class TropiaryStart extends Activity implements View.OnClickListener {
Button bSearch, bSaved, bRandom;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initialize();
setContentView(R.layout.main);
}
private void initialize() {
bSearch = (Button) findViewById(R.id.bSearch);
bSaved = (Button) findViewById(R.id.bSaved);
bRandom = (Button) findViewById(R.id.bRandom);
bSearch.setOnClickListener(this);
bSaved.setOnClickListener(this);
bRandom.setOnClickListener(this);
}
public void onClick(View v) {
switch (v.getId()) {
case R.id.bSearch:
break;
case R.id.bSaved:
break;
case R.id.bRandom:
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment