Revision 4483b119
Added by Leszek Koltunski over 1 year ago
src/main/java/org/distorted/dialogs/RubikDialogNewRecord.java | ||
---|---|---|
72 | 72 |
{ |
73 | 73 |
TextView text = view.findViewById(R.id.new_record_time); |
74 | 74 |
text.setTextSize(TypedValue.COMPLEX_UNIT_PX, size); |
75 |
text.setText(getString(R.string.ti_placeholder, mArgument));
|
|
75 |
text.setText(mArgument);
|
|
76 | 76 |
TextView submit = view.findViewById(R.id.new_record_submit); |
77 | 77 |
submit.setTextSize(TypedValue.COMPLEX_UNIT_PX, size); |
78 | 78 |
} |
src/main/java/org/distorted/dialogs/RubikDialogScoresView.java | ||
---|---|---|
125 | 125 |
|
126 | 126 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
127 | 127 |
|
128 |
private String formatRecord(int time)
|
|
128 |
public static String formatRecord(int time)
|
|
129 | 129 |
{ |
130 | 130 |
time /= 10; |
131 | 131 |
int millis = time%100; |
src/main/java/org/distorted/dialogs/RubikDialogSolved.java | ||
---|---|---|
51 | 51 |
{ |
52 | 52 |
TextView text = view.findViewById(R.id.solved_time); |
53 | 53 |
text.setTextSize(TypedValue.COMPLEX_UNIT_PX, size); |
54 |
text.setText(getString(R.string.ti_placeholder, mArgument));
|
|
54 |
text.setText(mArgument);
|
|
55 | 55 |
} |
56 | 56 |
|
57 | 57 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/main/RubikObjectLibInterface.java | ||
---|---|---|
22 | 22 |
import com.google.firebase.analytics.FirebaseAnalytics; |
23 | 23 |
import com.google.firebase.crashlytics.FirebaseCrashlytics; |
24 | 24 |
|
25 |
import org.distorted.dialogs.RubikDialogScoresView; |
|
25 | 26 |
import org.distorted.library.main.DistortedScreen; |
26 | 27 |
import org.distorted.library.message.EffectMessageSender; |
27 | 28 |
|
... | ... | |
58 | 59 |
{ |
59 | 60 |
private final WeakReference<RubikActivity> mAct; |
60 | 61 |
private int mIsNewRecord; |
61 |
private long mNewRecord;
|
|
62 |
private int mNewRecord;
|
|
62 | 63 |
private int mLastCubitColor, mLastCubit, mLastCubitFace; |
63 | 64 |
|
64 | 65 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
142 | 143 |
private Bundle createDialogBundle() |
143 | 144 |
{ |
144 | 145 |
Bundle bundle = new Bundle(); |
145 |
String arg = String.valueOf((mNewRecord/10)/100.0f);
|
|
146 |
String arg = RubikDialogScoresView.formatRecord(mNewRecord);
|
|
146 | 147 |
bundle.putString("argument", arg ); |
147 | 148 |
return bundle; |
148 | 149 |
} |
src/main/java/org/distorted/screens/RubikScreenSolving.java | ||
---|---|---|
167 | 167 |
|
168 | 168 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
169 | 169 |
|
170 |
public long stopTimerAndGetRecord()
|
|
170 |
public int stopTimerAndGetRecord()
|
|
171 | 171 |
{ |
172 | 172 |
if( mRunning ) |
173 | 173 |
{ |
174 | 174 |
stopCounting(); |
175 | 175 |
mElapsed = System.currentTimeMillis()-mStartTime; |
176 |
return mElapsed; |
|
176 |
return (int)mElapsed;
|
|
177 | 177 |
} |
178 | 178 |
|
179 | 179 |
return 0; |
Also available in: Unified diff
Show the same time format in the 'NewRecord' and 'Solved' dialogs as well.