better texts

This commit is contained in:
Ruben 2017-09-08 09:55:25 +02:00
parent 3974b59919
commit 866c6fa4ae
5 changed files with 20 additions and 9 deletions

View file

@ -35,6 +35,7 @@ public class CreditsActivity extends AppCompatActivity {
moreInfo.setTypeface(font);
mySite.setTypeface(font);
/* BLOCK FOR KIOSK-MODE
findViewById(R.id.logoArquivo).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@ -80,7 +81,7 @@ public class CreditsActivity extends AppCompatActivity {
i.setData(Uri.parse(url));
startActivity(i);
}
});
});*/
}
/**

View file

@ -432,7 +432,7 @@ public class GamingActivity extends AppCompatActivity implements Detector.ImageL
GameOpenHelper gameHelper = new GameOpenHelper(getApplicationContext());
gameHelper.insertGame(currentScenario.game);
Log.d(LOG_TAG, "WHYYYY won't it work?!!! ;-)");
Intent intent = new Intent(this, ReviewActivity.class);
intent.putExtra(ReviewActivity.INTENT_EXTRA_GAME_ID, currentScenario.game.id);
intent.putExtra(ReviewActivity.INTENT_EXTRA_FROM_GAME, true);

View file

@ -117,7 +117,7 @@ public class ProgressActivity extends AppCompatActivity {
TextView playText = new TextView(this);
String playString = hasAccess ? "play now!" : "locked";
playText.setText(playString);
playText.setTextSize(getResources().getDimensionPixelSize(R.dimen.highscore_textsize));
playText.setTextSize(getResources().getDimensionPixelSize(R.dimen.progress_play));
playText.setTextColor(getResources().getColor(hasAccess ? R.color.textPrimary : R.color.textSecondary));
RelativeLayout.LayoutParams playTextParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
playTextParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, RelativeLayout.TRUE);
@ -132,7 +132,7 @@ public class ProgressActivity extends AppCompatActivity {
String scoreString = String.format("%1$.2f", highscoreGame.score + highscoreGame.bonus);
scoreText.setText(scoreString);
scoreText.setTextColor(getResources().getColor(R.color.textPrimary));
scoreText.setTextSize(getResources().getDimensionPixelSize(R.dimen.highscore_textsize));
scoreText.setTextSize(getResources().getDimensionPixelSize(R.dimen.progress_score));
RelativeLayout.LayoutParams scoreTextParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
scoreTextParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
scoreTextParams.addRule(RelativeLayout.BELOW, titleText.getId());
@ -163,6 +163,7 @@ public class ProgressActivity extends AppCompatActivity {
achievementTextParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
achievementTextParams.addRule(RelativeLayout.BELOW, scoreText.getId());
achievementText.setLayoutParams(achievementTextParams);
achievementText.setTextSize(getResources().getDimensionPixelSize(R.dimen.highscore_textsize));
achievementText.setOnClickListener(toHighScoreClick);
lvlLayout.addView(achievementText);

View file

@ -103,19 +103,22 @@
android:id="@+id/overallScorePercText"
tools:text="30%"
android:textSize="33sp"
android:layout_alignBottom="@+id/scoreText"
android:layout_alignTop="@+id/scoreText"
android:textAlignment="center"
android:layout_centerInParent="false"
android:layout_centerVertical="false"
android:layout_marginTop="9sp"
android:textColor="@color/textHighlight"
android:layout_alignRight="@+id/imageView"
android:layout_alignEnd="@+id/imageView"
android:layout_alignLeft="@+id/imageView"
android:layout_alignStart="@+id/imageView" />
android:layout_alignStart="@+id/imageView"
android:layout_centerHorizontal="false" />
<TextView
android:text="overall position"
android:layout_marginTop="8dp"
android:layout_marginTop="8sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageView"
@ -139,6 +142,7 @@
android:layout_alignStart="@+id/overallScoreText"
android:layout_marginTop="16dp"
android:layout_marginBottom="5dp"
android:textSize="@dimen/review_header"
tools:visibility="visible"
android:visibility="gone" />
<RelativeLayout
@ -171,7 +175,6 @@
android:layout_alignParentEnd="true"
android:id="@+id/achievementArrow"
android:textColor="@color/textSecondary"
android:textSize="36sp"
android:layout_centerInParent="true" />
</RelativeLayout>
@ -185,6 +188,7 @@
android:layout_below="@+id/achievementLayout"
android:layout_alignLeft="@+id/overallScoreText"
android:layout_alignStart="@+id/overallScoreText"
android:textSize="@dimen/review_header"
android:layout_marginTop="16dp"
android:layout_marginBottom="5dp" />
@ -244,6 +248,7 @@
android:layout_below="@+id/improveLayout"
android:layout_alignLeft="@+id/overallScoreText"
android:layout_alignStart="@+id/overallScoreText"
android:textSize="@dimen/review_header"
android:layout_marginTop="16dp"
android:layout_marginBottom="5dp" />
@ -288,6 +293,7 @@
android:layout_below="@+id/retryLayout"
android:layout_alignLeft="@+id/overallScoreText"
android:layout_alignStart="@+id/overallScoreText"
android:textSize="@dimen/review_header"
android:layout_marginTop="16dp"
android:layout_marginBottom="5dp" />

View file

@ -4,9 +4,12 @@
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="fab_margin">16dp</dimen>
<dimen name="appbar_padding_top">8dp</dimen>
<dimen name="highscore_textsize">15sp</dimen>
<dimen name="gametitle_textsize">12sp</dimen>
<dimen name="highscore_textsize">13sp</dimen>
<dimen name="gametitle_textsize">14sp</dimen>
<dimen name="progress_score">17sp</dimen>
<dimen name="progress_play">17sp</dimen>
<dimen name="scenario_scorevalue">20sp</dimen>
<dimen name="scenario_emolabel">20sp</dimen>
<dimen name="review_header">17sp</dimen>
</resources>