コード例 #1
0
 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);
 }
コード例 #2
0
 @Override
 public void run() {
   scoreCounter.setVisibility(View.GONE);
 }
コード例 #3
0
 @Override
 public void run() {
   scoreCounter.setScoreProlonged(prefs.getScore());
   scoreCounter.setVisibility(View.VISIBLE);
 }