Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

player summary fix #11

Merged
merged 1 commit into from Apr 8, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -12,6 +12,7 @@
<activity android:name=".MainActivity" />
<activity android:name=".SelectTeamActivity" />
<activity android:name=".SelectScoreActivity" />
<activity android:name=".PlayerStat" />
<activity android:name=".HomePageActivity">
MainActivity
<intent-filter>
@@ -20,10 +21,6 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".PlayerStat"
android:label="@string/title_activity_player_stat"
android:theme="@style/AppTheme.NoActionBar"></activity>
</application>

</manifest>
@@ -21,6 +21,7 @@
private Button ReboundButton;
private Button IllegalButton;
private Button OtherButton;
private Button PlayerStatButton;
private ImageButton PrevGameButton;
private ImageButton NextGameButton;
private QuarterlyGameLog quarterlyGameLog;
@@ -58,6 +59,7 @@ protected void onCreate(Bundle savedInstanceState) {
OtherButton = (Button) findViewById(R.id.TurnoverButton);
PrevGameButton = (ImageButton) findViewById(R.id.PrevGameButton);
NextGameButton = (ImageButton) findViewById(R.id.NextGameButton);
PlayerStatButton = (Button) findViewById(R.id.PlayerButton);

PointButton.setOnClickListener(this);
MissButton.setOnClickListener(this);
@@ -66,6 +68,8 @@ protected void onCreate(Bundle savedInstanceState) {
OtherButton.setOnClickListener(this);
PrevGameButton.setOnClickListener(this);
NextGameButton.setOnClickListener(this);
PlayerStatButton.setOnClickListener(this);


}

@@ -90,6 +94,11 @@ public void onClick(View v) {
} else if (ClickId == R.id.NextGameButton){
switchQuarterHelper(true);
return;
} else if (ClickId == R.id.PlayerButton){
Intent intent = new Intent(this, PlayerStat.class);
intent.putExtra("ans", info);
startActivityForResult(intent, SELECT_TEAM_ACTIVITY_REQUEST);
return;
} else {
switchQuarterHelper(false);
return;
@@ -1,29 +1,36 @@
package com.example.cs498teamassign5;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.Button;

public class PlayerStat extends AppCompatActivity {
import java.util.ArrayList;

public class PlayerStat extends Activity implements View.OnClickListener {
private ArrayList<GameInfo> allGames;
private static final int MAIN_ACTIVITY_REQUEST = 1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_player_stat);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);

FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
allGames = new ArrayList<>();

}

}
public void onClick(View v){
if(v.getId() == R.id.NewGameButton) {
Intent intent = new Intent(this, MainActivity.class);
GameInfo gameInfo = new GameInfo();
intent.putExtra("gameInfo", gameInfo);
startActivityForResult(intent, MAIN_ACTIVITY_REQUEST);
}
}
}
@@ -164,7 +164,7 @@
android:layout_below="@+id/ReboundButton"
android:background="#00FFFF"
android:layout_marginTop="18dp"
android:text="@string/illegal" />
android:text="@string/foul" />

<Button
android:id="@+id/TurnoverButton"
@@ -87,7 +87,45 @@
android:textSize="26dp"
android:text="Turnovers:" />

<TextView
android:id="@+id/PlauyerPoints"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/ScoreButton"
android:layout_toEndOf="@+id/ReboundButton"
android:layout_toRightOf="@+id/ReboundButton"
android:textSize="26dp"
android:text="@string/zero" />

<TextView
android:id="@+id/PlayerRebounds"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/IllegalButton"
android:layout_toEndOf="@+id/ReboundButton"
android:layout_toRightOf="@+id/ReboundButton"
android:textSize="26dp"
android:text="@string/zero" />

<TextView
android:id="@+id/PlayerFouls"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/IllegalButton"
android:layout_toRightOf="@+id/IllegalButton"
android:textSize="26dp"
android:text="@string/zero" />

<TextView
android:id="@+id/PlayerTurnovers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/TurnoverButton"
android:layout_toEndOf="@+id/TurnoverButton"
android:layout_toRightOf="@+id/TurnoverButton"
android:textSize="26dp"
android:text="@string/zero" />


</RelativeLayout>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.