diff --git a/app/src/main/java/org/y20k/trackbook/MainActivity.java b/app/src/main/java/org/y20k/trackbook/MainActivity.java index 2c7e8cc..366ebe6 100644 --- a/app/src/main/java/org/y20k/trackbook/MainActivity.java +++ b/app/src/main/java/org/y20k/trackbook/MainActivity.java @@ -85,9 +85,11 @@ public class MainActivity extends AppCompatActivity implements TrackbookKeys { private FloatingActionButton mFloatingActionButtonMain; private FloatingActionButton mFloatingActionButtonSubSave; private FloatingActionButton mFloatingActionButtonSubClear; + private FloatingActionButton mFloatingActionButtonSubResume; private FloatingActionButton mFloatingActionButtonLocation; private CardView mFloatingActionButtonSubSaveLabel; private CardView mFloatingActionButtonSubClearLabel; + private CardView mFloatingActionButtonSubResumeLabel; private BroadcastReceiver mTrackingStoppedReceiver; private int mFloatingActionButtonState; private int mSelectedTab; @@ -313,7 +315,7 @@ public class MainActivity extends AppCompatActivity implements TrackbookKeys { } - /* Handles tap on the button "save and clear" */ + /* Handles tap on the button "save" */ private void handleSaveButtonClick() { // save button click is handled by onActivityResult in MainActivityMapFragment MainActivityMapFragment mainActivityMapFragment = (MainActivityMapFragment) mSectionsPagerAdapter.getFragment(FRAGMENT_ID_MAP); @@ -337,6 +339,12 @@ public class MainActivity extends AppCompatActivity implements TrackbookKeys { } + /* Handles tap on the button "resume" */ + private void handleResumeButtonClick() { + // todo implement + } + + // /* Saves state of Floating Action Button */ // not needed tracker service saves state // private void saveFloatingActionButtonState(Context context) { // SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context); @@ -370,6 +378,8 @@ public class MainActivity extends AppCompatActivity implements TrackbookKeys { mFloatingActionButtonSubSaveLabel = findViewById(R.id.fabSubMenuLabelSave); mFloatingActionButtonSubClear = findViewById(R.id.fabSubMenuButtonClear); mFloatingActionButtonSubClearLabel = findViewById(R.id.fabSubMenuLabelClear); + mFloatingActionButtonSubResume = findViewById(R.id.fabSubMenuButtonResume); + mFloatingActionButtonSubResumeLabel = findViewById(R.id.fabSubMenuLabelResume); if (mFloatingActionButtonSubMenuVisible) { showFloatingActionButtonMenu(true); } else { @@ -442,6 +452,20 @@ public class MainActivity extends AppCompatActivity implements TrackbookKeys { handleClearButtonClick(); } }); + mFloatingActionButtonSubResume.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + handleResumeButtonClick(); + } + }); + mFloatingActionButtonSubResumeLabel.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + handleResumeButtonClick(); + } + }); + + mFloatingActionButtonLocation.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -540,12 +564,16 @@ public class MainActivity extends AppCompatActivity implements TrackbookKeys { /* Shows (and hides) the sub menu of the floating action button */ private void showFloatingActionButtonMenu(boolean visible) { if (visible) { + mFloatingActionButtonSubResume.setVisibility(View.VISIBLE); + mFloatingActionButtonSubResumeLabel.setVisibility(View.VISIBLE); mFloatingActionButtonSubClear.setVisibility(View.VISIBLE); mFloatingActionButtonSubClearLabel.setVisibility(View.VISIBLE); mFloatingActionButtonSubSave.setVisibility(View.VISIBLE); mFloatingActionButtonSubSaveLabel.setVisibility(View.VISIBLE); mFloatingActionButtonSubMenuVisible = true; } else { + mFloatingActionButtonSubResume.setVisibility(View.INVISIBLE); + mFloatingActionButtonSubResumeLabel.setVisibility(View.INVISIBLE); mFloatingActionButtonSubClear.setVisibility(View.INVISIBLE); mFloatingActionButtonSubClearLabel.setVisibility(View.INVISIBLE); mFloatingActionButtonSubSaveLabel.setVisibility(View.INVISIBLE); diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index d3076fc..21fd272 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -7,6 +7,7 @@ android:fitsSystemWindows="true" tools:context="org.y20k.trackbook.MainActivity"> + - - - - - - - - - - + @@ -98,9 +52,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" - android:layout_marginEnd="8dp" android:clickable="true" - android:contentDescription="@string/descr_fab_sub_menu_label_1" + android:contentDescription="@string/descr_fab_sub_menu_label_save" android:focusable="true" app:cardBackgroundColor="@color/fab_button_card_background" app:cardCornerRadius="4dp" @@ -112,7 +65,7 @@ + + + + + + + + + + + + diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index e5dded1..84183d1 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -98,12 +98,12 @@ Kartierung der letzten Aufzeichnung Mein-Standort-Button Haupt-Aktionsbutton - Beschreibung des Speichern-Buttons - kleiner Speichern-Button - Beschreibung des Zurücksetzen-Buttons - kleiner Zurücksetzen-Button - Beschreibung des Fortsetzen-Buttons - kleiner Fortsetzen-Button + Beschreibung des Speichern-Buttons + kleiner Speichern-Button + Beschreibung des Zurücksetzen-Buttons + kleiner Zurücksetzen-Button + Beschreibung des Fortsetzen-Buttons + kleiner Fortsetzen-Button Überschrift der Statistik-Einblendung Informations-Icon Datenpunkt: Distanz diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index 18bcad4..e244a0c 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -98,12 +98,12 @@ Mapping of last track My Location Button Main Action Button - Label of the Save and Clear button - small Save and Clear button - Label of the Clear button - small Clear button - Label of the Resume button - small Resume button + Label of the Save and Clear button + small Save and Clear button + Label of the Clear button + small Clear button + Label of the Resume button + small Resume button Headline of the statistics sheet Icon of a bar chart Data point: Distance diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 9b6385c..b8dc792 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -98,12 +98,12 @@ Mappatura dell\'ultima traccia My Location Button Pulsante di azione principale - Etichetta del pulsante Salva e ripristina la mappa - piccolo pulsante Salva e ripristina la mappa - Etichetta del pulsante Cancella - piccolo pulsante Cancella - Label of the Resume button - small Resume button + Etichetta del pulsante Salva e ripristina la mappa + piccolo pulsante Salva e ripristina la mappa + Etichetta del pulsante Cancella + piccolo pulsante Cancella + Label of the Resume button + small Resume button Titolo scheda statistiche Icona grafico a barre Data point: Distanza diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index a7d447b..48d0295 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -98,12 +98,12 @@ 最後のトレースのマッピング 自分の場所ボタン メイン アクション ボタン - 保存とクリア ボタンのラベル - 小さな保存してクリア ボタン - クリア ボタンのラベル - 小さなクリア ボタン - Label of the Resume button - small Resume button + 保存とクリア ボタンのラベル + 小さな保存してクリア ボタン + クリア ボタンのラベル + 小さなクリア ボタン + Label of the Resume button + small Resume button 統計情報シートの見出し 情報アイコン データ地点: 距離 diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index 6c583e4..8d25403 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -98,12 +98,12 @@ Kartlegging av forrige tur Min plassering-knapp Hovedhandlingsknapp - Etikett for Lagre- og Tøm-knapp - liten Lagre- og Tøm-knapp - Etikett for Tøm-knappen - liten Tøm-knapp - Label of the Resume button - small Resume button + Etikett for Lagre- og Tøm-knapp + liten Lagre- og Tøm-knapp + Etikett for Tøm-knappen + liten Tøm-knapp + Label of the Resume button + small Resume button Overskrift for statistikkarket Informasjonsikon Datapunkt: Distanse diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 5650a67..3949a2b 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -98,12 +98,12 @@ Kaart van de laatste baan My Location Button Hoofd-actieknop - Label van de Opslaan en wissen-knop - kleine Opslaan en wissen-knop - Label van de Wissen-knop - kleine Wissen-knop - Label of the Resume button - small Resume button + Label van de Opslaan en wissen-knop + kleine Opslaan en wissen-knop + Label van de Wissen-knop + kleine Wissen-knop + Label of the Resume button + small Resume button Kop van het statistiekenblad Informatiepictogram Gegevenspunt: afstand diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2c1b875..0c41b9d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -98,12 +98,12 @@ Mapping of last track My Location Button Main Action Button - Label of the Save button - small Save button - Label of the Clear button - small Clear button - Label of the Resume button - small Resume button + Label of the Save button + small Save button + Label of the Clear button + small Clear button + Label of the Resume button + small Resume button Headline of the statistics sheet Information icon Data point: Distance