From 866c6fa4aec808af13ca54146e3dd7125a427085 Mon Sep 17 00:00:00 2001 From: Ruben Date: Fri, 8 Sep 2017 09:55:25 +0200 Subject: [PATCH] better texts --- .../rubenvandeven/emotionhero/CreditsActivity.java | 3 ++- .../rubenvandeven/emotionhero/GamingActivity.java | 2 +- .../rubenvandeven/emotionhero/ProgressActivity.java | 5 +++-- app/src/main/res/layout/activity_review.xml | 12 +++++++++--- app/src/main/res/values/dimens.xml | 7 +++++-- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/rubenvandeven/emotionhero/CreditsActivity.java b/app/src/main/java/com/rubenvandeven/emotionhero/CreditsActivity.java index 31c1e4c..69e4610 100644 --- a/app/src/main/java/com/rubenvandeven/emotionhero/CreditsActivity.java +++ b/app/src/main/java/com/rubenvandeven/emotionhero/CreditsActivity.java @@ -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); } - }); + });*/ } /** diff --git a/app/src/main/java/com/rubenvandeven/emotionhero/GamingActivity.java b/app/src/main/java/com/rubenvandeven/emotionhero/GamingActivity.java index df5288c..fb8e709 100644 --- a/app/src/main/java/com/rubenvandeven/emotionhero/GamingActivity.java +++ b/app/src/main/java/com/rubenvandeven/emotionhero/GamingActivity.java @@ -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); diff --git a/app/src/main/java/com/rubenvandeven/emotionhero/ProgressActivity.java b/app/src/main/java/com/rubenvandeven/emotionhero/ProgressActivity.java index 2ec88e4..a1cf1aa 100644 --- a/app/src/main/java/com/rubenvandeven/emotionhero/ProgressActivity.java +++ b/app/src/main/java/com/rubenvandeven/emotionhero/ProgressActivity.java @@ -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); diff --git a/app/src/main/res/layout/activity_review.xml b/app/src/main/res/layout/activity_review.xml index c4f5edd..ab52ab2 100644 --- a/app/src/main/res/layout/activity_review.xml +++ b/app/src/main/res/layout/activity_review.xml @@ -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" /> @@ -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" /> diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index c143307..fc5e04c 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -4,9 +4,12 @@ 16dp 16dp 8dp - 15sp - 12sp + 13sp + 14sp + 17sp + 17sp 20sp 20sp + 17sp