diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/adapters/ViewPagerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/clock/adapters/ViewPagerAdapter.kt
index 2afa765c..9fd0415a 100644
--- a/app/src/main/kotlin/com/simplemobiletools/clock/adapters/ViewPagerAdapter.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/clock/adapters/ViewPagerAdapter.kt
@@ -7,6 +7,7 @@ import android.view.ViewGroup
import com.simplemobiletools.clock.fragments.AlarmFragment
import com.simplemobiletools.clock.fragments.ClockFragment
import com.simplemobiletools.clock.fragments.StopwatchFragment
+import com.simplemobiletools.clock.fragments.TimerFragment
import com.simplemobiletools.clock.helpers.TABS_COUNT
class ViewPagerAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(fm) {
@@ -29,6 +30,7 @@ class ViewPagerAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(fm) {
0 -> ClockFragment()
1 -> AlarmFragment()
2 -> StopwatchFragment()
+ 3 -> TimerFragment()
else -> throw RuntimeException("Trying to fetch unknown fragment id $position")
}
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/fragments/TimerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/clock/fragments/TimerFragment.kt
new file mode 100644
index 00000000..035dada4
--- /dev/null
+++ b/app/src/main/kotlin/com/simplemobiletools/clock/fragments/TimerFragment.kt
@@ -0,0 +1,34 @@
+package com.simplemobiletools.clock.fragments
+
+import android.os.Bundle
+import android.support.v4.app.Fragment
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import com.simplemobiletools.clock.R
+import com.simplemobiletools.commons.extensions.updateTextColors
+import kotlinx.android.synthetic.main.fragment_timer.*
+
+class TimerFragment : Fragment() {
+ lateinit var view: ViewGroup
+
+ override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
+ view = inflater.inflate(R.layout.fragment_timer, container, false) as ViewGroup
+ return view
+ }
+
+ override fun onResume() {
+ super.onResume()
+ setupViews()
+ }
+
+ private fun setupViews() {
+ view.apply {
+ context!!.updateTextColors(timer_fragment)
+ }
+ }
+
+ private fun setupTimer() {
+
+ }
+}
diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/clock/helpers/Constants.kt
index 92c0efce..98b5218a 100644
--- a/app/src/main/kotlin/com/simplemobiletools/clock/helpers/Constants.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/clock/helpers/Constants.kt
@@ -8,7 +8,7 @@ const val DISPLAY_OTHER_TIME_ZONES = "display_other_time_zones"
const val SELECTED_TIME_ZONES = "selected_time_zones"
const val EDITED_TIME_ZONE_TITLES = "edited_time_zone_titles"
-const val TABS_COUNT = 3
+const val TABS_COUNT = 4
const val EDITED_TIME_ZONE_SEPARATOR = ":"
const val ALARM_ID = "alarm_id"
const val DEFAULT_ALARM_MINUTES = 480
diff --git a/app/src/main/res/drawable-hdpi/ic_timer.png b/app/src/main/res/drawable-hdpi/ic_timer.png
new file mode 100644
index 00000000..b2360106
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_timer.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_timer.png b/app/src/main/res/drawable-xhdpi/ic_timer.png
new file mode 100644
index 00000000..621fb4d4
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_timer.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_timer.png b/app/src/main/res/drawable-xxhdpi/ic_timer.png
new file mode 100644
index 00000000..d662b66e
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_timer.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_timer.png b/app/src/main/res/drawable-xxxhdpi/ic_timer.png
new file mode 100644
index 00000000..1c68403a
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_timer.png differ
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 35ade104..c2944fb3 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -34,6 +34,11 @@
android:layout_height="wrap_content"
android:icon="@drawable/ic_stopwatch"/>
+
+
+
+
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 5545851f..e2b6bc91 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -12,6 +12,7 @@
Relógio
Alarme
Cronómetro
+ Timer tab
Mostrar segundos
Mostrar outros fusos horários
@@ -27,12 +28,12 @@
At the clock you can enable displaying times from other timezones, or use the simple, but customizable clock widget. The text color of the widget can be customized, as well as the color and the alpha of the background.
- You can easily setup a timer to be notified of some event. You can both change its ringtone, or toggle vibrations.
-
The alarm contains all the expected features as day selecting, vibration toggling, ringtone selecting, snooze or adding a custom label.
With the stopwatch you can easily measure a longer period of time, or individual laps. You can sort the laps by lap time, it contains optional vibrations on button presses too, just to let you know that the button was pressed, even if you cannot look at the device.
+ You can easily setup a timer to be notified of some event. You can both change its ringtone, or toggle vibrations.
+
Additional features include preventing the device from falling asleep while the app is in foreground, or displaying some tabs in fullscreen view.
Contains no ads or unnecessary permissions. It is fully opensource, provides customizable colors.
diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml
index 736279ff..734a5d2e 100644
--- a/app/src/main/res/values-sk/strings.xml
+++ b/app/src/main/res/values-sk/strings.xml
@@ -12,6 +12,7 @@
Okno s časom
Okno s budíkom
Okno so stopkami
+ Okno s časovačom
Zobraziť sekundy
Povoliť zobrazenie dodatočných časových pásiem
@@ -27,12 +28,12 @@
Hodinky vedia zobraziť aj čas iných časových pásiem, resp. ponúkajú jednoduchý, ale nastaviteľný widget. Farbu textu widgetu možno prispôsobiť, rovnako ako farbu a priehľadnosť pozadia.
- Viete si jednoducho nastaviť aj časovač, aby vám nič neuniklo. Viete zmeniť jeho zvučku, alebo zapnúť vibrácie.
-
Budík obsahuje všetky očakávané funkcie ako výber dní, prepínanie vibrácií, výber melódie, odloženie, ako aj pridanie štítka.
So stopkami viete jednoducho zmerať nejaký časový interval, alebo jednotlivé okruhy. Okruhy viete zoradiť aj podľa ich času. Stopky obsahujú nastaviteľné vibrácie pri stlačení tlačidiel, aby vás to uistilo v ich stlačenie, aj keď sa neviete práve pozrieť na displej.
+ Viete si jednoducho nastaviť aj časovač, aby vám nič neuniklo. Viete zmeniť jeho zvučku, alebo zapnúť vibrácie.
+
Ďalšími funkciami sú predídenie uspania zariadenia kým je apka v popredí, alebo zobrazenie okien v celoobrazovkovom režime.
Neobsahuje žiadne reklamy a nepotrebné oprávnenia. Je opensource, poskytuje možnosť zmeny farieb.
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index f83e0129..250fe2fc 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -12,6 +12,7 @@
Clock tab
Alarm tab
Stopwatch tab
+ Timer tab
Show seconds
Allow displaying other time zones
@@ -27,12 +28,12 @@
At the clock you can enable displaying times from other timezones, or use the simple, but customizable clock widget. The text color of the widget can be customized, as well as the color and the alpha of the background.
- You can easily setup a timer to be notified of some event. You can both change its ringtone, or toggle vibrations.
-
The alarm contains all the expected features as day selecting, vibration toggling, ringtone selecting, snooze or adding a custom label.
With the stopwatch you can easily measure a longer period of time, or individual laps. You can sort the laps by lap time, it contains optional vibrations on button presses too, just to let you know that the button was pressed, even if you cannot look at the device.
+ You can easily setup a timer to be notified of some event. You can both change its ringtone, or toggle vibrations.
+
Additional features include preventing the device from falling asleep while the app is in foreground, or displaying some tabs in fullscreen view.
Contains no ads or unnecessary permissions. It is fully opensource, provides customizable colors.