Skip to content
This repository was archived by the owner on Aug 13, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
android:supportsRtl="true"
android:theme="@style/Theme.Frogger2340Project"
tools:targetApi="31">
<activity
android:name=".GameScreen"
android:exported="false" />
<activity
android:name=".PlayerConfig"
android:exported="false" />
Expand Down
14 changes: 14 additions & 0 deletions app/src/main/java/com/example/frogger2340project/GameScreen.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.example.frogger2340project;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

public class GameScreen extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_game_screen);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.content.Intent;
import android.os.Bundle;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.view.View;
import android.widget.Button;
Expand Down
Binary file added app/src/main/res/drawable/animated_frog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/font/kenney_blocks.ttf
Binary file not shown.
9 changes: 9 additions & 0 deletions app/src/main/res/layout/activity_game_screen.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".GameScreen">

</androidx.constraintlayout.widget.ConstraintLayout>
31 changes: 16 additions & 15 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

tools:context=".MainActivity"
android:orientation="vertical"
android:background="#e7ffcc"
android:gravity="center">
<TextView
android:id="@+id/startText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FROGGER"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

android:fontFamily="@font/kenney_blocks"
android:textSize="32sp"/>
<ImageView
android:id="@+id/homeFrog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/animated_frog"/>
<Button
android:id="@+id/startButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:onClick="onStartGameClick"
android:text="Start Game"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/startText"
app:layout_constraintVertical_bias="0.0" />
android:fontFamily="@font/kenney_blocks"
android:backgroundTint="#006400"
/>

</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>