Add 'previous' menu to Credits menu

This commit is contained in:
Ruben 2017-09-20 08:38:15 +02:00
parent f5f38393b0
commit c96c735ca4
9 changed files with 56 additions and 24 deletions

View File

@ -37,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@ -4,12 +4,12 @@ android {
signingConfigs {
}
compileSdkVersion 24
buildToolsVersion '23.0.3'
buildToolsVersion '25.0.0'
defaultConfig {
applicationId 'com.rubenvandeven.emotion_hero'
minSdkVersion 16
targetSdkVersion 24
versionCode 10
versionCode 11
versionName '1.2'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

View File

@ -53,7 +53,11 @@
android:name=".CreditsActivity"
android:screenOrientation="portrait"
android:configChanges="orientation"
android:theme="@style/FullscreenTheme" />
android:theme="@style/FullscreenTheme">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.rubenvandeven.emotionhero.MirrorMenuActivity" />
</activity>
<activity
android:name=".ReviewActivity"
android:launchMode="singleTop"

View File

@ -6,6 +6,7 @@ import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
import android.widget.LinearLayout;
@ -13,21 +14,19 @@ import android.widget.TextView;
public class CreditsActivity extends AppCompatActivity {
final static String LOG_TAG = "EmotionHero-Credits";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
if(getSupportActionBar() != null) {
getSupportActionBar().hide();
}
// TODO: verander naar MET toolbar voor 'terug'
// Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
// setSupportActionBar(toolbar);
// getSupportActionBar().setDisplayHomeAsUpEnabled(true);
// getSupportActionBar().setTitle("Credits");
setContentView(R.layout.activity_credits);
Toolbar toolbar = (Toolbar) findViewById(R.id.credits_toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle("Credits");
Typeface font = Typeface.createFromAsset(getAssets(), "unifont-9.0.02.ttf");
TextView textView = (TextView) findViewById(R.id.textView);
TextView affectivaPower = (TextView) findViewById(R.id.affectivaPower);
@ -40,7 +39,6 @@ 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) {
@ -86,6 +84,6 @@ public class CreditsActivity extends AppCompatActivity {
i.setData(Uri.parse(url));
startActivity(i);
}
});*/
});
}
}

View File

@ -161,7 +161,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.setTextSize(getResources().getDimensionPixelSize(R.dimen.progress_achievements));
achievementText.setOnClickListener(toHighScoreClick);
lvlLayout.addView(achievementText);

View File

@ -5,16 +5,40 @@
android:id="@+id/activity_credits"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
tools:context="com.rubenvandeven.emotionhero.CreditsActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/appbar_padding_top"
android:theme="@style/AppTheme.AppBarOverlay"
android:layout_marginBottom="10dp"
>
<android.support.v7.widget.Toolbar
android:id="@+id/credits_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppTheme.PopupOverlay"
app:titleTextColor="@color/textHighlight">
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
<ScrollView
android:id="@+id/creditsLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/appbar"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
>
<LinearLayout
@ -70,7 +94,11 @@
android:layout_centerHorizontal="true"
android:adjustViewBounds="true"
android:cropToPadding="true"
android:layout_marginBottom="@dimen/fab_margin" />
android:layout_marginBottom="@dimen/fab_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
/>
<TextView
android:text="Font used: Unifont CSUR - GPL."
android:layout_width="match_parent"
@ -105,7 +133,9 @@
android:id="@+id/logoEmotionHero"
android:cropToPadding="false"
android:adjustViewBounds="true"
android:layout_marginTop="58dp"
android:layout_marginTop="75dp"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"

View File

@ -8,8 +8,8 @@
<dimen name="gametitle_textsize">14sp</dimen>
<dimen name="progress_score">17sp</dimen>
<dimen name="progress_play">17sp</dimen>
<dimen name="progress_achievements">11sp</dimen>
<dimen name="scenario_scorevalue">20sp</dimen>
<dimen name="scenario_emolabel">20sp</dimen>
<dimen name="review_header">17sp</dimen>
</resources>

View File

@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View File

@ -1,6 +1,6 @@
#Mon Dec 28 10:00:20 PST 2015
#Wed Sep 13 13:41:16 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip