void addScoreCounter() { int size = (int) (Metrics.squareButtonSize * Metrics.squareButtonScale); scoreCounter = new ScoreCounter(activity, size * 32 / 10, size); scoreCounter.setVisibility(View.GONE); scoreCounter.setScore(prefs.getScore()); RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); lp.addRule(RelativeLayout.ALIGN_PARENT_LEFT); lp.addRule(RelativeLayout.ALIGN_PARENT_TOP); layout.addView(scoreCounter.getView(), lp); }
@Override public void run() { scoreCounter.setVisibility(View.GONE); }
@Override public void run() { scoreCounter.setScoreProlonged(prefs.getScore()); scoreCounter.setVisibility(View.VISIBLE); }