Skip to content

Instantly share code, notes, and snippets.

View Phonbopit's full-sized avatar
👻
¯\_ (ツ) _/¯

Chai Phonbopit Phonbopit

👻
¯\_ (ツ) _/¯
View GitHub Profile
public class CustomAdapter extends ArrayAdapter<String> {
private final Context context;
private final String[] values;
public CustomAdapter(Context context, String[] values) {
super(context, R.layout.team_list, values);
this.context = context;
this.values = values;
}
public class ListViewActivity extends ListActivity {
String[] players = new String[]
{ "Leonel Messi",
"Zinedine Zidane",
"Diego Maradona",
"Marco Van Basten",
"Ronaldinho",
"Steven Gerrard",
"Cristiano Ronaldo",
@Phonbopit
Phonbopit / gist:5511500
Created May 3, 2013 17:16
Simple Random change text background
public class SimpleRandom extends javax.swing.JFrame {
Thread auto;
public SimpleRandom() {
initComponents();
auto = new Thread() {
@Override
public void run() {
while(true) {
try {
sleep(1000);