-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implementing an interface to get the variables from the gamefragment …
…over to createnewgameactivity somehow. Implementing the function for the listener only workings in maintabbedactivity even though I want it in the createnewgame one. If you take it out of the maintabbedactivity it will crash.
- Loading branch information
1 parent
d45d7d2
commit 8da03cf
Showing
7 changed files
with
149 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
heroku/src/main/java/kylemeyers22/heroku/CreateNewGameActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package kylemeyers22.heroku; | ||
|
||
|
||
import android.app.Activity; | ||
import android.app.Fragment; | ||
import android.app.FragmentTransaction; | ||
import android.os.Bundle; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.view.View; | ||
import android.widget.Button; | ||
|
||
|
||
public class CreateNewGameActivity extends AppCompatActivity{ | ||
private int teamOneId; | ||
private String teamOneName; | ||
|
||
private int teamTwoId; | ||
private String teamTwoName; | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) | ||
{ | ||
System.out.println("create the new game"); | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.create_game); | ||
|
||
|
||
System.out.println(teamOneId +" whoo " + teamOneName); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
heroku/src/main/java/kylemeyers22/heroku/utils/TeamVariables.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package kylemeyers22.heroku.utils; | ||
|
||
|
||
public class TeamVariables { | ||
private int teamOneId; | ||
private String teamOneName; | ||
|
||
private int teamTwoId; | ||
private String teamTwoName; | ||
|
||
public void setTeamOneId(int teamOneId) | ||
{ | ||
this.teamOneId = teamOneId; | ||
} | ||
|
||
public void setTeamTwoId(int teamTwoId) | ||
{ | ||
this.teamTwoId= teamTwoId; | ||
} | ||
|
||
public void setTeamOneName(String teamOneName) | ||
{ | ||
this.teamOneName = teamOneName; | ||
} | ||
|
||
public void setTeamTwoName(String teamTwoName) | ||
{ | ||
this.teamTwoName = teamTwoName; | ||
} | ||
|
||
public int getTeamOneId () | ||
{ | ||
return this.teamOneId; | ||
} | ||
public int getTeamTwoId() | ||
{ | ||
return this.teamTwoId; | ||
} | ||
public String getTeamOneName() | ||
{ | ||
return this.teamOneName; | ||
} | ||
public String getTeamTwoName () | ||
{ | ||
return this.teamTwoName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:paddingBottom="@dimen/activity_vertical_margin" | ||
android:paddingLeft="@dimen/activity_horizontal_margin" | ||
android:paddingRight="@dimen/activity_horizontal_margin" | ||
android:paddingTop="@dimen/activity_vertical_margin" | ||
tools:context=".CreateNewGameActivity"> | ||
|
||
</LinearLayout> |