Merge branch 'master' into kioskmode

Now having the back button in the credits screen and some minor bugfixes
This commit is contained in:
Ruben 2017-09-20 09:01:48 +02:00
commit 25b2e09f5e
10 changed files with 55 additions and 23 deletions

View File

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

View File

@ -59,7 +59,11 @@
android:name=".CreditsActivity" android:name=".CreditsActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:configChanges="orientation" 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 <activity
android:name=".ReviewActivity" android:name=".ReviewActivity"
android:launchMode="singleTop" android:launchMode="singleTop"

View File

@ -8,6 +8,7 @@ import android.net.Uri;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View; import android.view.View;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.LinearLayout; import android.widget.LinearLayout;
@ -15,21 +16,19 @@ import android.widget.TextView;
public class CreditsActivity extends AppCompatActivity { public class CreditsActivity extends AppCompatActivity {
final static String LOG_TAG = "EmotionHero-Credits";
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); 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); 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"); Typeface font = Typeface.createFromAsset(getAssets(), "unifont-9.0.02.ttf");
TextView textView = (TextView) findViewById(R.id.textView); TextView textView = (TextView) findViewById(R.id.textView);
TextView affectivaPower = (TextView) findViewById(R.id.affectivaPower); TextView affectivaPower = (TextView) findViewById(R.id.affectivaPower);

View File

@ -96,6 +96,7 @@ public class IntroActivity extends AppCompatActivity {
startActivity(intent); startActivity(intent);
//disable distracting transition when going to menu //disable distracting transition when going to menu
IntroActivity.this.overridePendingTransition(0, 0); IntroActivity.this.overridePendingTransition(0, 0);
finish();
} }
/** /**

View File

@ -256,8 +256,6 @@ public class MirrorMenuActivity extends AppCompatActivity implements Detector.Im
showSettings(); showSettings();
} }
// all setup, see wheter we immediately continue to intro: // all setup, see wheter we immediately continue to intro:
boolean showIntro = getIntent().getBooleanExtra(INTENT_EXTRA_SHOW_INTRO, false); boolean showIntro = getIntent().getBooleanExtra(INTENT_EXTRA_SHOW_INTRO, false);
if(showIntro) { if(showIntro) {

View File

@ -163,7 +163,7 @@ public class ProgressActivity extends AppCompatActivity {
achievementTextParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE); achievementTextParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
achievementTextParams.addRule(RelativeLayout.BELOW, scoreText.getId()); achievementTextParams.addRule(RelativeLayout.BELOW, scoreText.getId());
achievementText.setLayoutParams(achievementTextParams); achievementText.setLayoutParams(achievementTextParams);
achievementText.setTextSize(getResources().getDimensionPixelSize(R.dimen.highscore_textsize)); achievementText.setTextSize(getResources().getDimensionPixelSize(R.dimen.progress_achievements));
achievementText.setOnClickListener(toHighScoreClick); achievementText.setOnClickListener(toHighScoreClick);
lvlLayout.addView(achievementText); lvlLayout.addView(achievementText);

View File

@ -5,16 +5,40 @@
android:id="@+id/activity_credits" android:id="@+id/activity_credits"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="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"> 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 <ScrollView
android:id="@+id/creditsLayout" android:id="@+id/creditsLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_below="@+id/appbar"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
> >
<LinearLayout <LinearLayout
@ -70,7 +94,11 @@
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:cropToPadding="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 <TextView
android:text="Font used: Unifont CSUR - GPL." android:text="Font used: Unifont CSUR - GPL."
android:layout_width="match_parent" android:layout_width="match_parent"
@ -105,7 +133,9 @@
android:id="@+id/logoEmotionHero" android:id="@+id/logoEmotionHero"
android:cropToPadding="false" android:cropToPadding="false"
android:adjustViewBounds="true" 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_alignParentTop="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"

View File

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

View File

@ -5,7 +5,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { 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 // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // 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 distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists 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