Skip to content

Commit

Permalink
Prepare for Padel version
Browse files Browse the repository at this point in the history
  • Loading branch information
obbimi committed May 8, 2020
1 parent c7f3170 commit e211106
Show file tree
Hide file tree
Showing 20 changed files with 80 additions and 75 deletions.
4 changes: 2 additions & 2 deletions AndroidManifestBadminton.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
android:theme="@style/SBTheme"
android:allowBackup="true"
android:usesCleartextTraffic="true"
android:label="@string/app_name_short_brand_Badminton"
android:label="@string/app_name_short_brand__Badminton"
android:icon="@drawable/logo_brand_badminton">

<!--
Expand All @@ -77,7 +77,7 @@
</activity>
-->

<activity android:name="com.doubleyellow.scoreboard.main.ScoreBoard" android:label="@string/app_name_short_brand_Badminton">
<activity android:name="com.doubleyellow.scoreboard.main.ScoreBoard" android:label="@string/app_name_short_brand__Badminton">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
4 changes: 2 additions & 2 deletions AndroidManifestRacketlon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
android:allowBackup="true"
android:usesCleartextTraffic="true"
android:resizeableActivity="true"
android:label="@string/app_name_short_brand_Racketlon"
android:label="@string/app_name_short_brand__Racketlon"
android:icon="@drawable/logo_brand_racketlon">

<!--
Expand All @@ -83,7 +83,7 @@
</activity>
-->

<activity android:name="com.doubleyellow.scoreboard.main.ScoreBoard" android:label="@string/app_name_short_brand_Racketlon">
<activity android:name="com.doubleyellow.scoreboard.main.ScoreBoard" android:label="@string/app_name_short_brand__Racketlon">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
4 changes: 2 additions & 2 deletions AndroidManifestSquore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
android:allowBackup="true"
android:usesCleartextTraffic="true"
android:resizeableActivity="true"
android:label="@string/app_name_short_brand_Squash"
android:label="@string/app_name_short_brand__Squash"
android:icon="@drawable/logo_brand_squore">

<!--
Expand Down Expand Up @@ -97,7 +97,7 @@
</service>
-->

<activity android:name="com.doubleyellow.scoreboard.main.ScoreBoard" android:label="@string/app_name_short_brand_Squash">
<activity android:name="com.doubleyellow.scoreboard.main.ScoreBoard" android:label="@string/app_name_short_brand__Squash">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
4 changes: 2 additions & 2 deletions AndroidManifestTabletennis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
android:theme="@style/SBTheme"
android:allowBackup="true"
android:usesCleartextTraffic="true"
android:label="@string/app_name_short_brand_Tabletennis"
android:label="@string/app_name_short_brand__Tabletennis"
android:icon="@drawable/logo_brand_tabletennis">

<!--
Expand All @@ -77,7 +77,7 @@
</activity>
-->

<activity android:name="com.doubleyellow.scoreboard.main.ScoreBoard" android:label="@string/app_name_short_brand_Tabletennis">
<activity android:name="com.doubleyellow.scoreboard.main.ScoreBoard" android:label="@string/app_name_short_brand__Tabletennis">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
4 changes: 2 additions & 2 deletions AndroidManifestTennisPadel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
android:theme="@style/SBTheme"
android:allowBackup="true"
android:usesCleartextTraffic="true"
android:label="@string/app_name_short_brand_TennisPadel"
android:label="@string/app_name_short_brand__TennisPadel"
android:icon="@drawable/logo_brand_tennispadel">

<!--
Expand All @@ -77,7 +77,7 @@
</activity>
-->

<activity android:name="com.doubleyellow.scoreboard.main.ScoreBoard" android:label="@string/app_name_short_brand_TennisPadel">
<activity android:name="com.doubleyellow.scoreboard.main.ScoreBoard" android:label="@string/app_name_short_brand__TennisPadel">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
2 changes: 1 addition & 1 deletion res/values-cs/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<string name="pref_Category_Technical">Technické</string>
<string name="pref_Category_End_of_Game">Konec setu</string>
<string name="pref_Category_Others">Ostatní</string>
<string name="pref_Category_Live_Score__ChromeCast">Skóre živě/ChromeCast</string>
<string name="pref_Category_Live_Score_ChromeCast">Skóre živě/ChromeCast</string>
<string name="pref_Category_ChromeCast">ChromeCast</string>
<string name="pref_Category_Directory_for_import_export">Složka pro import/export</string>
<string name="pref_Category_Contacts">Kontakty</string>
Expand Down
2 changes: 1 addition & 1 deletion res/values-fr/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<string name="pref_Category_Technical">Technique</string>
<string name="pref_Category_End_of_Game">Fin de jeu</string>
<string name="pref_Category_Others">Divers</string>
<string name="pref_Category_Live_Score__ChromeCast">Live Score/ChromeCast</string> <!-- TODO -->
<string name="pref_Category_Live_Score_ChromeCast">Live Score/ChromeCast</string> <!-- TODO -->
<string name="pref_Category_ChromeCast">ChromeCast</string>
<string name="pref_Category_Directory_for_import_export">Répertoire pour l\'import/export</string>
<string name="pref_Category_Contacts">Contacts</string> <!-- TODO -->
Expand Down
2 changes: 1 addition & 1 deletion res/values-it/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<string name="pref_Category_Technical">Tecnico</string>
<string name="pref_Category_End_of_Game">Fine del Gioco</string>
<string name="pref_Category_Others">Altri</string>
<string name="pref_Category_Live_Score__ChromeCast">Punteggio in Diretta/ChromeCast</string>
<string name="pref_Category_Live_Score_ChromeCast">Punteggio in Diretta/ChromeCast</string>
<string name="pref_Category_ChromeCast">ChromeCast</string>
<string name="pref_Category_Directory_for_import_export">Cartella per importazione/esportazione</string>
<string name="pref_Category_Contacts">Contatti</string>
Expand Down
2 changes: 1 addition & 1 deletion res/values-nl/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<string name="pref_Category_Technical">Technisch</string>
<string name="pref_Category_End_of_Game">Game Einde</string>
<string name="pref_Category_Others">Others</string>
<string name="pref_Category_Live_Score__ChromeCast">Live Score/ChromeCast</string>
<string name="pref_Category_Live_Score_ChromeCast">Live Score/ChromeCast</string>
<string name="pref_Category_ChromeCast">ChromeCast</string>
<string name="pref_Category_Directory_for_import_export">Folder voor import/export</string>
<string name="pref_Category_Contacts">Contacten</string>
Expand Down
12 changes: 6 additions & 6 deletions res/values/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
<string name="pref_Category_Brand">Brand</string>
<string name="pref_Category_Technical">Technical</string>
<string name="pref_Category_End_of_Game">End of Game</string>
<string name="pref_Category_End_of_Game_TennisPadel">End of Set</string>
<string name="pref_Category_End_of_Game__TennisPadel">End of Set</string>
<string name="pref_Category_Others">Others</string>
<string name="pref_Category_Live_Score__ChromeCast">Live Score/ChromeCast</string>
<string name="pref_Category_Live_Score_ChromeCast">Live Score/ChromeCast</string>
<string name="pref_Category_ChromeCast">ChromeCast</string>
<string name="pref_Category_Directory_for_import_export">Directory for import/export</string>
<string name="pref_Category_Contacts">Contacts</string>
Expand Down Expand Up @@ -140,9 +140,9 @@
<string name="pref_swapPlayersBetweenGames">Swap players at the start of a new game</string>
<string name="pref_useChangeSidesFeature">Change sides feature</string>
<string name="pref_changeSidesWhen_GSM">When to swap players/teams</string>
<string name="pref_swapPlayersBetweenGames_TennisPadel">Swap players after every odd game</string>
<string name="pref_swapPlayersBetweenGames__TennisPadel">Swap players after every odd game</string>
<string name="pref_showDetailsAtEndOfGameAutomatically">Auto show details of game</string>
<string name="pref_showDetailsAtEndOfGameAutomatically_TennisPadel">Auto show details of set</string>
<string name="pref_showDetailsAtEndOfGameAutomatically__TennisPadel">Auto show details of set</string>
<string name="pref_showDetailsAtEndOfGameAutomatically_summary">When a game ends automatically open the screen to show graphical representation</string>
<string name="pref_showTips">Show \'Tips\'</string>
<string name="pref_recordRallyEndStatsAfterEachScore">Show \'Winner/Error\' dialog after each point</string>
Expand Down Expand Up @@ -170,7 +170,7 @@
<string name="pref_MatchGameDuration">Game/Match duration</string>
<string name="pref_showMatchDurationChronoOn">Show \'Match duration\' on</string>
<string name="pref_showLastGameDurationChronoOn">Show \'Game duration\' on</string>
<string name="pref_showLastGameDurationChronoOn_TennisPadel">Show \'Set duration\' on</string>
<string name="pref_showLastGameDurationChronoOn__TennisPadel">Show \'Set duration\' on</string>
<string name="pref_showFieldDivisionOn">Show \'Field or Division\' on</string>
<string name="pref_timerViewType">Type of timer</string>
<string name="pref_hapticFeedbackPerPoint">Haptic feedback per point</string>
Expand All @@ -182,7 +182,7 @@
<string name="pref_indicateGameBall">Indicate \'game ball\' in score buttons</string>
<string name="pref_indicateGameBall_summary">Give visual feedback in score buttons about the fact that the next rally may lead to winning a game</string>
<string name="pref_floatingMessageForGameBall">Show \'game ball\' message</string>
<string name="pref_floatingMessageForGameBall_TennisPadel">Show \'set ball\' message</string>
<string name="pref_floatingMessageForGameBall__TennisPadel">Show \'set ball\' message</string>
<string name="pref_floatingMessageForGameBall_summary">Show a \'floating message\' when it is game- or match ball</string>
<string name="pref_showNewMatchFloatButton">Show \'New Match\' floating button</string>
<string name="pref_showNewMatchFloatButton_summary">Show conventient floating button to start a new match (when appropriate)</string>
Expand Down
2 changes: 1 addition & 1 deletion res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@
<PreferenceScreen android:key="LiveScore_Cast"
android:icon="@drawable/ic_chromecast"
android:summary="@string/pref_live_score_summary"
android:title="@string/pref_Category_Live_Score__ChromeCast">
android:title="@string/pref_Category_Live_Score_ChromeCast">
<PreferenceCategory android:title="@string/Live_Score">
<com.doubleyellow.scoreboard.prefs.LiveScorePrefs
android:icon="@drawable/dummy"
Expand Down
7 changes: 6 additions & 1 deletion src/com/doubleyellow/scoreboard/activity/XActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ protected boolean isPortrait() {

/** Method to be able to quickly switch between when extending Activity and AppCompatActivity */
protected ActionBar getXActionBar() {
return super.getSupportActionBar(); // with ChromeCast
try {
return super.getSupportActionBar(); // with ChromeCast
} catch (Exception e) {
e.printStackTrace();
}
return null;
//return super.getActionBar(); // without Cast
}

Expand Down
4 changes: 2 additions & 2 deletions src/com/doubleyellow/scoreboard/dialog/ActivateMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public ActivateMode(Context context, Model matchModel, ScoreBoard scoreBoard) {
//private String m_sMode = null;

@Override public void show() {
String sTitle = getString(R.string.activate_mode_Tabletennis);
String sDesc = getString(R.string.activate_mode_description_Tabletennis, PreferenceValues.showModeDialogAfterXMins(context));
String sTitle = getString(R.string.activate_mode__Tabletennis);
String sDesc = getString(R.string.activate_mode_description__Tabletennis, PreferenceValues.showModeDialogAfterXMins(context));
adb.setTitle(sTitle + "?")
.setMessage(sDesc)
.setIcon (R.drawable.microphone)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public EditMatchWizard(Context context, Model matchModel, ScoreBoard scoreBoard)
int iPreferredNrToWin = PreferenceValues.numberOfPointsToWinGame(context);
iPreferredNrToWin = matchModel.getNrOfPointsToWinGame();
SortedSet<Integer> lValues = new TreeSet<>();
int iCommonEndScoresResId = R.array.commonEndScores_Squash;
int iCommonEndScoresResId = R.array.commonEndScores__Squash;
iCommonEndScoresResId = PreferenceValues.getSportTypeSpecificResId(context, iCommonEndScoresResId);
int[] iaCommonEndScores = context.getResources().getIntArray(iCommonEndScoresResId);
for(int iEndScore: iaCommonEndScores) {
Expand Down
2 changes: 1 addition & 1 deletion src/com/doubleyellow/scoreboard/dialog/EditPlayers.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public EditPlayers(Context context, Model matchModel, ScoreBoard scoreBoard) {
mCaptions.put(JSONKey.location, R.string.lbl_location);
mCaptions.put(JSONKey.clubs , R.string.lbl_clubs);
mCaptions.put(JSONKey.round , R.string.lbl_round);
mCaptions.put(JSONKey.court , R.string.lbl_court_Squash);
mCaptions.put(JSONKey.court , R.string.lbl_court__Squash);
mCaptions.put(JSONKey.referee , R.string.lbl_referee);
mCaptions.put(JSONKey.markers , R.string.lbl_marker);
}
Expand Down
2 changes: 1 addition & 1 deletion src/com/doubleyellow/scoreboard/dialog/EndGameChoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public EndGameChoice(Context context, Model matchModel, ScoreBoard scoreBoard) {
}
@Override public void show() {
//int iEndGameMsgResId = R.string.sb_start_next_game_confirm_message;
adb.setPositiveButton(getGameOrSetString(R.string.end_game_Squash), dialogClickListener)
adb.setPositiveButton(getGameOrSetString(R.string.end_game__Squash), dialogClickListener)
.setNegativeButton(R.string.cmd_cancel , dialogClickListener)
.setIcon(R.drawable.microphone);
List<String> messages = new ArrayList<>();
Expand Down
2 changes: 1 addition & 1 deletion src/com/doubleyellow/scoreboard/dialog/MatchInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public MatchInfo(Context context, Model matchModel, ScoreBoard scoreBoard) {
}
sb.append("\n");
if ( matchModel.isEnglishScoring() ) {
int iScorePointWhenServingResId = PreferenceValues.getSportTypeSpecificResId(context, R.string.lbl_Scoring_PointWhenServing_Squash);
int iScorePointWhenServingResId = PreferenceValues.getSportTypeSpecificResId(context, R.string.lbl_Scoring_PointWhenServing__Squash);
sb.append(getString(R.string.lbl_Scoring)).append(": ").append(getString(iScorePointWhenServingResId));
sb.append("\n");
} else {
Expand Down
Loading

0 comments on commit e211106

Please sign in to comment.