This file contains hidden or 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
private ArrayList<Double> threeGrades = new ArrayList<Double>(); | |
private ArrayList<Double> twoGrades = new ArrayList<Double>(); | |
private ArrayList<Double> oneGrades = new ArrayList<Double>(); | |
private ArrayList<ArrayList<Double>> gradesListContainer = new ArrayList<ArrayList<Double>>(){{ | |
add(oneGrades); | |
add(twoGrades); | |
add(threeGrades); |
This file contains hidden or 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
private TextView threeTextView; | |
private TextView twoTextView; | |
private TextView oneTextView; | |
private TextView[] textViewsContainer = {oneTextView, twoTextView, threeTextView}; |
This file contains hidden or 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
06-11 16:19:02.722: I/System.out(7780): MotionEvent{405134e0 action=0 x=254.80852 y=78.22581 pressure=74.29412 size=4.6000004} | |
06-11 16:19:02.511: I/System.out(7780): MotionEvent{405134e0 action=0 x=258.89362 y=64.462364 pressure=30.12157 size=3.5333335} | |
This file contains hidden or 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
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/containerLinearLayout" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
tools:context=".MainActivity" > | |
<Button |
This file contains hidden or 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
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/containerLinearLayout" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
tools:context=".MainActivity" > | |
<Button |
This file contains hidden or 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
/* IN ONCREATE */ | |
firstPlayerButton = (Button) findViewById(R.id.firstPlayerButton); | |
//Assign Color to the FIRST PLAYER | |
firstPlayerColor = r.getColor(R.color.player_one); | |
firstPlayerButton.setTag(new ColorAndReferenceToTextView(firstPlayerColor, (TextView) findViewById(R.id.firstPlayerResult))); | |
secondPlayerButton = (Button) findViewById(R.id.secondPlayerButton); | |
//Assign Color to the SECOND PLAYER | |
secondPlayerColor = r.getColor(R.color.player_two); |
This file contains hidden or 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
public MyClass(int myNameOfField) { | |
this.nameOfField = nameOfField; | |
} |
This file contains hidden or 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
public MyClass(int myNameOfField) { | |
this.nameOfField = nameOfField; | |
} |
This file contains hidden or 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
class myT extends CountDownTimer { | |
long myWholeTime; | |
public myT(long millisInFuture, long countDownInterval) { | |
super(millisInFuture, countDownInterval); | |
this.myWholeTime = millisInFuture; | |
} | |
// TODO Auto-generated constructor stub | |
@Override | |
public void onFinish() { |
This file contains hidden or 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
private void playDing(int howManyTimes) { | |
if(howManyTimes >0){ | |
MediaPlayer mPlayer = MediaPlayer.create(this, R.raw.dingshort); | |
mPlayer.setOnCompletionListener(new OnCompletionListener() { | |
@Override | |
public void onCompletion(MediaPlayer mp) { | |
playDing(howManyTimes-1); //But java don't support closures | |