private void agafarDades() { CO.tl = (TableLayout) findViewById(R.id.tl); agafarCaselles(); // CO.intentMax = // CO.miss = (TextView) findViewById(R.id.missatge); CO.missCorrectes = (TextView) findViewById(R.id.editAciertos); CO.cas1 = (TextView) findViewById(R.id.cas1); CO.name = (TextView) findViewById(R.id.titulo); // CO.miss.setTextColor(Color.WHITE); // CO.missCorrectes.setTextColor(Color.WHITE); CO.name.setTextColor(Color.WHITE); // CO.cas1.setTextColor(Color.WHITE); CO.p1 = "<buit>"; CO.p2 = "<buit>"; if (Parser.getActivitats().elementAt(CO.activitatActual).getName() != null) CO.name.setText(Parser.getActivitats().elementAt(CO.activitatActual).getName()); else CO.name.setText("Activitat JClic"); if (CO.rows == 1) CO.tl.setPadding(0, 100, 0, 0); else if (CO.rows == 2) { CO.tl.setPadding(0, 30, 0, 0); } else CO.tl.setPadding(0, 0, 0, 0); if (CO.colorBG != null) { CO.bg = Puzzle.agafarColor(CO.colorBG); } else CO.bg = Color.BLACK; if (CO.colorFG != null) { CO.fg = Puzzle.agafarColor(CO.colorFG); } else CO.fg = Color.WHITE; for (int i = 0; i < CO.vecCaselles.size(); i++) { if (CO.vecCaselles.elementAt(i) != null) { CO.vecCaselles.elementAt(i).setBackgroundColor(CO.bg); CO.vecCaselles.elementAt(i).setTextColor(CO.fg); CO.vecCaselles.elementAt(i).setPadding(10, 15, 10, 10); CO.vecCaselles.elementAt(i).setMaxLines(3); CO.vecCaselles.elementAt(i).setText(CO.entrada.elementAt(i)); if (CO.imatge != null) { CO.vecCaselles.elementAt(i).setBackgroundColor(Color.TRANSPARENT); CO.vecCaselles.elementAt(i).setTextColor(Color.TRANSPARENT); } reestructurarCaselles(CO.vecCaselles.elementAt(i)); } } bloquejarJoc(false); }