mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-01-31 10:44:52 +01:00
updating Commons + many other things
This commit is contained in:
parent
e30f145bb3
commit
921873f9a6
@ -4,11 +4,11 @@ apply plugin: 'kotlin-android-extensions'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 28
|
compileSdkVersion 28
|
||||||
buildToolsVersion "28.0.2"
|
buildToolsVersion "28.0.3"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.simplemobiletools.clock"
|
applicationId "com.simplemobiletools.clock"
|
||||||
minSdkVersion 16
|
minSdkVersion 21
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 10
|
versionCode 10
|
||||||
versionName "4.3.0"
|
versionName "4.3.0"
|
||||||
@ -41,9 +41,9 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:4.7.10'
|
implementation 'com.simplemobiletools:commons:5.6.16'
|
||||||
implementation 'com.facebook.stetho:stetho:1.5.0'
|
implementation 'com.facebook.stetho:stetho:1.5.0'
|
||||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
|
||||||
implementation 'com.shawnlin:number-picker:2.4.6'
|
implementation 'com.shawnlin:number-picker:2.4.6'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
package com.simplemobiletools.clock.activities
|
package com.simplemobiletools.clock.activities
|
||||||
|
|
||||||
import android.annotation.TargetApi
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.graphics.drawable.ColorDrawable
|
import android.graphics.drawable.ColorDrawable
|
||||||
import android.os.Build
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
@ -18,6 +16,7 @@ import com.simplemobiletools.clock.extensions.rescheduleEnabledAlarms
|
|||||||
import com.simplemobiletools.clock.helpers.*
|
import com.simplemobiletools.clock.helpers.*
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.LICENSE_NUMBER_PICKER
|
import com.simplemobiletools.commons.helpers.LICENSE_NUMBER_PICKER
|
||||||
|
import com.simplemobiletools.commons.helpers.LICENSE_RTL
|
||||||
import com.simplemobiletools.commons.helpers.LICENSE_STETHO
|
import com.simplemobiletools.commons.helpers.LICENSE_STETHO
|
||||||
import com.simplemobiletools.commons.models.FAQItem
|
import com.simplemobiletools.commons.models.FAQItem
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
@ -118,7 +117,6 @@ class MainActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.KITKAT)
|
|
||||||
private fun storeNewAlarmSound(resultData: Intent) {
|
private fun storeNewAlarmSound(resultData: Intent) {
|
||||||
val newAlarmSound = storeNewYourAlarmSound(resultData)
|
val newAlarmSound = storeNewYourAlarmSound(resultData)
|
||||||
|
|
||||||
@ -179,7 +177,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun launchAbout() {
|
private fun launchAbout() {
|
||||||
val licenses = LICENSE_STETHO or LICENSE_NUMBER_PICKER
|
val licenses = LICENSE_STETHO or LICENSE_NUMBER_PICKER or LICENSE_RTL
|
||||||
|
|
||||||
val faqItems = arrayListOf(
|
val faqItems = arrayListOf(
|
||||||
FAQItem(R.string.faq_1_title, R.string.faq_1_text),
|
FAQItem(R.string.faq_1_title, R.string.faq_1_text),
|
||||||
|
@ -7,6 +7,7 @@ import android.net.Uri
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
|
import android.view.ViewGroup
|
||||||
import android.view.animation.AnimationUtils
|
import android.view.animation.AnimationUtils
|
||||||
import com.simplemobiletools.clock.R
|
import com.simplemobiletools.clock.R
|
||||||
import com.simplemobiletools.clock.extensions.*
|
import com.simplemobiletools.clock.extensions.*
|
||||||
@ -34,7 +35,7 @@ class ReminderActivity : SimpleActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_reminder)
|
setContentView(R.layout.activity_reminder)
|
||||||
showOverLockscreen()
|
showOverLockscreen()
|
||||||
updateTextColors(reminder_holder)
|
updateTextColors(reminder_holder as ViewGroup)
|
||||||
|
|
||||||
val id = intent.getIntExtra(ALARM_ID, -1)
|
val id = intent.getIntExtra(ALARM_ID, -1)
|
||||||
isAlarmReminder = id != -1
|
isAlarmReminder = id != -1
|
||||||
|
@ -25,7 +25,6 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
setupPurchaseThankYou()
|
setupPurchaseThankYou()
|
||||||
setupCustomizeColors()
|
setupCustomizeColors()
|
||||||
setupUseEnglish()
|
setupUseEnglish()
|
||||||
setupAvoidWhatsNew()
|
|
||||||
setupPreventPhoneFromSleeping()
|
setupPreventPhoneFromSleeping()
|
||||||
setupHourFormat()
|
setupHourFormat()
|
||||||
setupSundayFirst()
|
setupSundayFirst()
|
||||||
@ -72,14 +71,6 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupAvoidWhatsNew() {
|
|
||||||
settings_avoid_whats_new.isChecked = config.avoidWhatsNew
|
|
||||||
settings_avoid_whats_new_holder.setOnClickListener {
|
|
||||||
settings_avoid_whats_new.toggle()
|
|
||||||
config.avoidWhatsNew = settings_avoid_whats_new.isChecked
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setupPreventPhoneFromSleeping() {
|
private fun setupPreventPhoneFromSleeping() {
|
||||||
settings_prevent_phone_from_sleeping.isChecked = config.preventPhoneFromSleeping
|
settings_prevent_phone_from_sleeping.isChecked = config.preventPhoneFromSleeping
|
||||||
settings_prevent_phone_from_sleeping_holder.setOnClickListener {
|
settings_prevent_phone_from_sleeping_holder.setOnClickListener {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.simplemobiletools.clock.activities
|
package com.simplemobiletools.clock.activities
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v7.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import com.simplemobiletools.clock.extensions.config
|
import com.simplemobiletools.clock.extensions.config
|
||||||
import com.simplemobiletools.clock.extensions.dbHelper
|
import com.simplemobiletools.clock.extensions.dbHelper
|
||||||
import com.simplemobiletools.clock.extensions.hideNotification
|
import com.simplemobiletools.clock.extensions.hideNotification
|
||||||
|
@ -7,6 +7,8 @@ import com.simplemobiletools.clock.helpers.TAB_CLOCK
|
|||||||
import com.simplemobiletools.commons.activities.BaseSplashActivity
|
import com.simplemobiletools.commons.activities.BaseSplashActivity
|
||||||
|
|
||||||
class SplashActivity : BaseSplashActivity() {
|
class SplashActivity : BaseSplashActivity() {
|
||||||
|
override fun getAppPackageName() = packageName
|
||||||
|
|
||||||
override fun initActivity() {
|
override fun initActivity() {
|
||||||
when {
|
when {
|
||||||
intent?.action == "android.intent.action.SHOW_ALARMS" -> {
|
intent?.action == "android.intent.action.SHOW_ALARMS" -> {
|
||||||
|
@ -7,7 +7,6 @@ import android.widget.RelativeLayout
|
|||||||
import com.simplemobiletools.clock.R
|
import com.simplemobiletools.clock.R
|
||||||
import com.simplemobiletools.clock.activities.SimpleActivity
|
import com.simplemobiletools.clock.activities.SimpleActivity
|
||||||
import com.simplemobiletools.clock.extensions.config
|
import com.simplemobiletools.clock.extensions.config
|
||||||
import com.simplemobiletools.clock.extensions.dbHelper
|
|
||||||
import com.simplemobiletools.clock.extensions.getFormattedTime
|
import com.simplemobiletools.clock.extensions.getFormattedTime
|
||||||
import com.simplemobiletools.clock.interfaces.ToggleAlarmInterface
|
import com.simplemobiletools.clock.interfaces.ToggleAlarmInterface
|
||||||
import com.simplemobiletools.clock.models.Alarm
|
import com.simplemobiletools.clock.models.Alarm
|
||||||
@ -30,14 +29,8 @@ class AlarmsAdapter(activity: SimpleActivity, var alarms: ArrayList<Alarm>, val
|
|||||||
|
|
||||||
override fun prepareActionMode(menu: Menu) {}
|
override fun prepareActionMode(menu: Menu) {}
|
||||||
|
|
||||||
override fun prepareItemSelection(viewHolder: ViewHolder) {}
|
|
||||||
|
|
||||||
override fun markViewHolderSelection(select: Boolean, viewHolder: ViewHolder?) {
|
|
||||||
viewHolder?.itemView?.alarm_frame?.isSelected = select
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun actionItemPressed(id: Int) {
|
override fun actionItemPressed(id: Int) {
|
||||||
if (selectedPositions.isEmpty()) {
|
if (selectedKeys.isEmpty()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,14 +43,18 @@ class AlarmsAdapter(activity: SimpleActivity, var alarms: ArrayList<Alarm>, val
|
|||||||
|
|
||||||
override fun getIsItemSelectable(position: Int) = true
|
override fun getIsItemSelectable(position: Int) = true
|
||||||
|
|
||||||
|
override fun getItemSelectionKey(position: Int) = alarms.getOrNull(position)?.id
|
||||||
|
|
||||||
|
override fun getItemKeyPosition(key: Int) = alarms.indexOfFirst { it.id == key }
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_alarm, parent)
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_alarm, parent)
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
|
||||||
val alarm = alarms[position]
|
val alarm = alarms[position]
|
||||||
val view = holder.bindView(alarm, true, true) { itemView, layoutPosition ->
|
holder.bindView(alarm, true, true) { itemView, layoutPosition ->
|
||||||
setupView(itemView, alarm)
|
setupView(itemView, alarm)
|
||||||
}
|
}
|
||||||
bindViewHolder(holder, position, view)
|
bindViewHolder(holder)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount() = alarms.size
|
override fun getItemCount() = alarms.size
|
||||||
@ -70,18 +67,20 @@ class AlarmsAdapter(activity: SimpleActivity, var alarms: ArrayList<Alarm>, val
|
|||||||
|
|
||||||
private fun deleteItems() {
|
private fun deleteItems() {
|
||||||
val alarmsToRemove = ArrayList<Alarm>()
|
val alarmsToRemove = ArrayList<Alarm>()
|
||||||
selectedPositions.sortedDescending().forEach {
|
/*selectedPositions.sortedDescending().forEach {
|
||||||
val alarm = alarms[it]
|
val alarm = alarms[it]
|
||||||
alarmsToRemove.add(alarm)
|
alarmsToRemove.add(alarm)
|
||||||
}
|
}
|
||||||
|
|
||||||
alarms.removeAll(alarmsToRemove)
|
alarms.removeAll(alarmsToRemove)
|
||||||
removeSelectedItems()
|
removeSelectedItems()
|
||||||
activity.dbHelper.deleteAlarms(alarmsToRemove)
|
activity.dbHelper.deleteAlarms(alarmsToRemove)*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupView(view: View, alarm: Alarm) {
|
private fun setupView(view: View, alarm: Alarm) {
|
||||||
|
val isSelected = selectedKeys.contains(alarm.id)
|
||||||
view.apply {
|
view.apply {
|
||||||
|
alarm_frame.isSelected = isSelected
|
||||||
alarm_time.text = activity.getFormattedTime(alarm.timeInMinutes * 60, false, true)
|
alarm_time.text = activity.getFormattedTime(alarm.timeInMinutes * 60, false, true)
|
||||||
alarm_time.setTextColor(textColor)
|
alarm_time.setTextColor(textColor)
|
||||||
|
|
||||||
|
@ -1,89 +1,75 @@
|
|||||||
package com.simplemobiletools.clock.adapters
|
package com.simplemobiletools.clock.adapters
|
||||||
|
|
||||||
import android.support.v7.widget.RecyclerView
|
|
||||||
import android.util.SparseArray
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.simplemobiletools.clock.R
|
import com.simplemobiletools.clock.R
|
||||||
import com.simplemobiletools.clock.activities.SimpleActivity
|
import com.simplemobiletools.clock.activities.SimpleActivity
|
||||||
import com.simplemobiletools.clock.extensions.config
|
import com.simplemobiletools.clock.extensions.config
|
||||||
import com.simplemobiletools.clock.models.MyTimeZone
|
import com.simplemobiletools.clock.models.MyTimeZone
|
||||||
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
|
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
|
||||||
import com.simplemobiletools.commons.interfaces.MyAdapterListener
|
|
||||||
import kotlinx.android.synthetic.main.item_add_time_zone.view.*
|
import kotlinx.android.synthetic.main.item_add_time_zone.view.*
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class SelectTimeZonesAdapter(val activity: SimpleActivity, val timeZones: ArrayList<MyTimeZone>) : RecyclerView.Adapter<SelectTimeZonesAdapter.ViewHolder>() {
|
class SelectTimeZonesAdapter(val activity: SimpleActivity, val timeZones: ArrayList<MyTimeZone>) : RecyclerView.Adapter<SelectTimeZonesAdapter.ViewHolder>() {
|
||||||
private val itemViews = SparseArray<View>()
|
|
||||||
private val selectedPositions = HashSet<Int>()
|
|
||||||
private val config = activity.config
|
private val config = activity.config
|
||||||
private val textColor = config.textColor
|
private val textColor = config.textColor
|
||||||
private val backgroundColor = config.backgroundColor
|
private val backgroundColor = config.backgroundColor
|
||||||
private val primaryColor = activity.getAdjustedPrimaryColor()
|
private val primaryColor = activity.getAdjustedPrimaryColor()
|
||||||
|
var selectedKeys = HashSet<Int>()
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val selectedTimeZones = config.selectedTimeZones
|
val selectedTimeZones = config.selectedTimeZones
|
||||||
timeZones.forEachIndexed { index, myTimeZone ->
|
timeZones.forEachIndexed { index, myTimeZone ->
|
||||||
if (selectedTimeZones.contains(myTimeZone.id.toString())) {
|
if (selectedTimeZones.contains(myTimeZone.id.toString())) {
|
||||||
selectedPositions.add(index)
|
selectedKeys.add(myTimeZone.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun toggleItemSelection(select: Boolean, pos: Int) {
|
private fun toggleItemSelection(select: Boolean, pos: Int) {
|
||||||
|
val itemKey = timeZones.getOrNull(pos)?.id ?: return
|
||||||
|
|
||||||
if (select) {
|
if (select) {
|
||||||
if (itemViews[pos] != null) {
|
selectedKeys.add(itemKey)
|
||||||
selectedPositions.add(pos)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
selectedPositions.remove(pos)
|
selectedKeys.remove(itemKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
itemViews[pos]?.add_time_zone_checkbox?.isChecked = select
|
notifyItemChanged(pos)
|
||||||
}
|
|
||||||
|
|
||||||
private val adapterListener = object : MyAdapterListener {
|
|
||||||
override fun toggleItemSelectionAdapter(select: Boolean, position: Int) {
|
|
||||||
toggleItemSelection(select, position)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getSelectedPositions() = selectedPositions
|
|
||||||
|
|
||||||
override fun itemLongClicked(position: Int) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getSelectedItemsSet(): HashSet<String> {
|
|
||||||
val selectedItemsSet = HashSet<String>(selectedPositions.size)
|
|
||||||
selectedPositions.forEach { selectedItemsSet.add(timeZones[it].id.toString()) }
|
|
||||||
return selectedItemsSet
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||||
val view = activity.layoutInflater.inflate(R.layout.item_add_time_zone, parent, false)
|
val view = activity.layoutInflater.inflate(R.layout.item_add_time_zone, parent, false)
|
||||||
return ViewHolder(view, adapterListener)
|
return ViewHolder(view)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
val timeZone = timeZones[position]
|
holder.bindView(timeZones[position], textColor, primaryColor, backgroundColor)
|
||||||
itemViews.put(position, holder.bindView(timeZone, textColor, primaryColor, backgroundColor))
|
|
||||||
toggleItemSelection(selectedPositions.contains(position), position)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount() = timeZones.size
|
override fun getItemCount() = timeZones.size
|
||||||
|
|
||||||
class ViewHolder(view: View, val adapterListener: MyAdapterListener) : RecyclerView.ViewHolder(view) {
|
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||||
fun bindView(timeZone: MyTimeZone, textColor: Int, primaryColor: Int, backgroundColor: Int): View {
|
fun bindView(myTimeZone: MyTimeZone, textColor: Int, primaryColor: Int, backgroundColor: Int): View {
|
||||||
|
val isSelected = selectedKeys.contains(myTimeZone.id)
|
||||||
itemView.apply {
|
itemView.apply {
|
||||||
add_time_zone_title.text = timeZone.title
|
add_time_zone_checkbox.isChecked = isSelected
|
||||||
|
add_time_zone_title.text = myTimeZone.title
|
||||||
add_time_zone_title.setTextColor(textColor)
|
add_time_zone_title.setTextColor(textColor)
|
||||||
|
|
||||||
add_time_zone_checkbox.setColors(textColor, primaryColor, backgroundColor)
|
add_time_zone_checkbox.setColors(textColor, primaryColor, backgroundColor)
|
||||||
add_time_zone_holder.setOnClickListener {
|
add_time_zone_holder.setOnClickListener {
|
||||||
adapterListener.toggleItemSelectionAdapter(!add_time_zone_checkbox.isChecked, adapterPosition)
|
viewClicked(myTimeZone)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return itemView
|
return itemView
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun viewClicked(myTimeZone: MyTimeZone) {
|
||||||
|
val isSelected = selectedKeys.contains(myTimeZone.id)
|
||||||
|
toggleItemSelection(!isSelected, adapterPosition)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,24 +26,24 @@ class StopwatchAdapter(activity: SimpleActivity, var laps: ArrayList<Lap>, recyc
|
|||||||
|
|
||||||
override fun prepareActionMode(menu: Menu) {}
|
override fun prepareActionMode(menu: Menu) {}
|
||||||
|
|
||||||
override fun prepareItemSelection(viewHolder: ViewHolder) {}
|
|
||||||
|
|
||||||
override fun markViewHolderSelection(select: Boolean, viewHolder: ViewHolder?) {}
|
|
||||||
|
|
||||||
override fun actionItemPressed(id: Int) {}
|
override fun actionItemPressed(id: Int) {}
|
||||||
|
|
||||||
override fun getSelectableItemCount() = laps.size
|
override fun getSelectableItemCount() = laps.size
|
||||||
|
|
||||||
override fun getIsItemSelectable(position: Int) = false
|
override fun getIsItemSelectable(position: Int) = false
|
||||||
|
|
||||||
|
override fun getItemSelectionKey(position: Int) = laps.getOrNull(position)?.id
|
||||||
|
|
||||||
|
override fun getItemKeyPosition(key: Int) = laps.indexOfFirst { it.id == key }
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_lap, parent)
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_lap, parent)
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
|
||||||
val lap = laps[position]
|
val lap = laps[position]
|
||||||
val view = holder.bindView(lap, false, false) { itemView, layoutPosition ->
|
holder.bindView(lap, false, false) { itemView, layoutPosition ->
|
||||||
setupView(itemView, lap)
|
setupView(itemView, lap)
|
||||||
}
|
}
|
||||||
bindViewHolder(holder, position, view)
|
bindViewHolder(holder)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount() = laps.size
|
override fun getItemCount() = laps.size
|
||||||
|
@ -5,7 +5,6 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.simplemobiletools.clock.R
|
import com.simplemobiletools.clock.R
|
||||||
import com.simplemobiletools.clock.activities.SimpleActivity
|
import com.simplemobiletools.clock.activities.SimpleActivity
|
||||||
import com.simplemobiletools.clock.extensions.config
|
|
||||||
import com.simplemobiletools.clock.extensions.getFormattedDate
|
import com.simplemobiletools.clock.extensions.getFormattedDate
|
||||||
import com.simplemobiletools.clock.extensions.getFormattedTime
|
import com.simplemobiletools.clock.extensions.getFormattedTime
|
||||||
import com.simplemobiletools.clock.models.MyTimeZone
|
import com.simplemobiletools.clock.models.MyTimeZone
|
||||||
@ -29,14 +28,8 @@ class TimeZonesAdapter(activity: SimpleActivity, var timeZones: ArrayList<MyTime
|
|||||||
|
|
||||||
override fun prepareActionMode(menu: Menu) {}
|
override fun prepareActionMode(menu: Menu) {}
|
||||||
|
|
||||||
override fun prepareItemSelection(viewHolder: ViewHolder) {}
|
|
||||||
|
|
||||||
override fun markViewHolderSelection(select: Boolean, viewHolder: ViewHolder?) {
|
|
||||||
viewHolder?.itemView?.time_zone_frame?.isSelected = select
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun actionItemPressed(id: Int) {
|
override fun actionItemPressed(id: Int) {
|
||||||
if (selectedPositions.isEmpty()) {
|
if (selectedKeys.isEmpty()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,14 +42,18 @@ class TimeZonesAdapter(activity: SimpleActivity, var timeZones: ArrayList<MyTime
|
|||||||
|
|
||||||
override fun getIsItemSelectable(position: Int) = true
|
override fun getIsItemSelectable(position: Int) = true
|
||||||
|
|
||||||
|
override fun getItemSelectionKey(position: Int) = timeZones.getOrNull(position)?.id
|
||||||
|
|
||||||
|
override fun getItemKeyPosition(key: Int) = timeZones.indexOfFirst { it.id == key }
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_time_zone, parent)
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_time_zone, parent)
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
|
||||||
val timeZone = timeZones[position]
|
val timeZone = timeZones[position]
|
||||||
val view = holder.bindView(timeZone, true, true) { itemView, layoutPosition ->
|
holder.bindView(timeZone, true, true) { itemView, layoutPosition ->
|
||||||
setupView(itemView, timeZone)
|
setupView(itemView, timeZone)
|
||||||
}
|
}
|
||||||
bindViewHolder(holder, position, view)
|
bindViewHolder(holder)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount() = timeZones.size
|
override fun getItemCount() = timeZones.size
|
||||||
@ -74,7 +71,7 @@ class TimeZonesAdapter(activity: SimpleActivity, var timeZones: ArrayList<MyTime
|
|||||||
private fun deleteItems() {
|
private fun deleteItems() {
|
||||||
val timeZonesToRemove = ArrayList<MyTimeZone>()
|
val timeZonesToRemove = ArrayList<MyTimeZone>()
|
||||||
val timeZoneIDsToRemove = ArrayList<String>()
|
val timeZoneIDsToRemove = ArrayList<String>()
|
||||||
selectedPositions.sortedDescending().forEach {
|
/*selectedPositions.sortedDescending().forEach {
|
||||||
val timeZone = timeZones[it]
|
val timeZone = timeZones[it]
|
||||||
timeZonesToRemove.add(timeZone)
|
timeZonesToRemove.add(timeZone)
|
||||||
timeZoneIDsToRemove.add(timeZone.id.toString())
|
timeZoneIDsToRemove.add(timeZone.id.toString())
|
||||||
@ -85,7 +82,7 @@ class TimeZonesAdapter(activity: SimpleActivity, var timeZones: ArrayList<MyTime
|
|||||||
|
|
||||||
val selectedTimeZones = activity.config.selectedTimeZones
|
val selectedTimeZones = activity.config.selectedTimeZones
|
||||||
val newTimeZones = selectedTimeZones.filter { !timeZoneIDsToRemove.contains(it) }.toHashSet()
|
val newTimeZones = selectedTimeZones.filter { !timeZoneIDsToRemove.contains(it) }.toHashSet()
|
||||||
activity.config.selectedTimeZones = newTimeZones
|
activity.config.selectedTimeZones = newTimeZones*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupView(view: View, timeZone: MyTimeZone) {
|
private fun setupView(view: View, timeZone: MyTimeZone) {
|
||||||
@ -100,7 +97,9 @@ class TimeZonesAdapter(activity: SimpleActivity, var timeZones: ArrayList<MyTime
|
|||||||
val formattedTime = activity.getFormattedTime(passedSeconds, false, false)
|
val formattedTime = activity.getFormattedTime(passedSeconds, false, false)
|
||||||
val formattedDate = activity.getFormattedDate(calendar)
|
val formattedDate = activity.getFormattedDate(calendar)
|
||||||
|
|
||||||
|
val isSelected = selectedKeys.contains(timeZone.id)
|
||||||
view.apply {
|
view.apply {
|
||||||
|
time_zone_frame.isSelected = isSelected
|
||||||
time_zone_title.text = timeZone.title
|
time_zone_title.text = timeZone.title
|
||||||
time_zone_title.setTextColor(textColor)
|
time_zone_title.setTextColor(textColor)
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.simplemobiletools.clock.adapters
|
package com.simplemobiletools.clock.adapters
|
||||||
|
|
||||||
import android.support.v4.app.Fragment
|
|
||||||
import android.support.v4.app.FragmentManager
|
|
||||||
import android.support.v4.app.FragmentStatePagerAdapter
|
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import androidx.fragment.app.FragmentManager
|
||||||
|
import androidx.fragment.app.FragmentStatePagerAdapter
|
||||||
import com.simplemobiletools.clock.fragments.AlarmFragment
|
import com.simplemobiletools.clock.fragments.AlarmFragment
|
||||||
import com.simplemobiletools.clock.fragments.ClockFragment
|
import com.simplemobiletools.clock.fragments.ClockFragment
|
||||||
import com.simplemobiletools.clock.fragments.StopwatchFragment
|
import com.simplemobiletools.clock.fragments.StopwatchFragment
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.simplemobiletools.clock.dialogs
|
package com.simplemobiletools.clock.dialogs
|
||||||
|
|
||||||
import android.support.v7.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import com.simplemobiletools.clock.R
|
import com.simplemobiletools.clock.R
|
||||||
import com.simplemobiletools.clock.activities.SimpleActivity
|
import com.simplemobiletools.clock.activities.SimpleActivity
|
||||||
import com.simplemobiletools.clock.adapters.SelectTimeZonesAdapter
|
import com.simplemobiletools.clock.adapters.SelectTimeZonesAdapter
|
||||||
@ -16,7 +16,7 @@ class AddTimeZonesDialog(val activity: SimpleActivity, private val callback: ()
|
|||||||
view.select_time_zones_list.adapter = SelectTimeZonesAdapter(activity, getAllTimeZones())
|
view.select_time_zones_list.adapter = SelectTimeZonesAdapter(activity, getAllTimeZones())
|
||||||
|
|
||||||
AlertDialog.Builder(activity)
|
AlertDialog.Builder(activity)
|
||||||
.setPositiveButton(R.string.ok, { dialog, which -> dialogConfirmed() })
|
.setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() }
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
.create().apply {
|
.create().apply {
|
||||||
activity.setupDialogStuff(view, this)
|
activity.setupDialogStuff(view, this)
|
||||||
@ -24,7 +24,8 @@ class AddTimeZonesDialog(val activity: SimpleActivity, private val callback: ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun dialogConfirmed() {
|
private fun dialogConfirmed() {
|
||||||
val selectedTimeZones = (view?.select_time_zones_list?.adapter as? SelectTimeZonesAdapter)?.getSelectedItemsSet() ?: LinkedHashSet()
|
val adapter = view?.select_time_zones_list?.adapter as? SelectTimeZonesAdapter
|
||||||
|
val selectedTimeZones = adapter?.selectedKeys?.map { it.toString() }?.toHashSet() ?: LinkedHashSet()
|
||||||
activity.config.selectedTimeZones = selectedTimeZones
|
activity.config.selectedTimeZones = selectedTimeZones
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package com.simplemobiletools.clock.dialogs
|
|||||||
import android.app.TimePickerDialog
|
import android.app.TimePickerDialog
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.media.AudioManager
|
import android.media.AudioManager
|
||||||
import android.support.v7.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import com.simplemobiletools.clock.R
|
import com.simplemobiletools.clock.R
|
||||||
import com.simplemobiletools.clock.activities.SimpleActivity
|
import com.simplemobiletools.clock.activities.SimpleActivity
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.simplemobiletools.clock.dialogs
|
package com.simplemobiletools.clock.dialogs
|
||||||
|
|
||||||
import android.support.v7.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import com.simplemobiletools.clock.R
|
import com.simplemobiletools.clock.R
|
||||||
import com.simplemobiletools.clock.activities.SimpleActivity
|
import com.simplemobiletools.clock.activities.SimpleActivity
|
||||||
import com.simplemobiletools.clock.extensions.config
|
import com.simplemobiletools.clock.extensions.config
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.simplemobiletools.clock.dialogs
|
package com.simplemobiletools.clock.dialogs
|
||||||
|
|
||||||
import android.support.v7.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import com.simplemobiletools.clock.R
|
import com.simplemobiletools.clock.R
|
||||||
import com.simplemobiletools.clock.activities.SimpleActivity
|
import com.simplemobiletools.clock.activities.SimpleActivity
|
||||||
import com.simplemobiletools.clock.extensions.config
|
import com.simplemobiletools.clock.extensions.config
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package com.simplemobiletools.clock.extensions
|
package com.simplemobiletools.clock.extensions
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.annotation.TargetApi
|
|
||||||
import android.app.*
|
import android.app.*
|
||||||
import android.appwidget.AppWidgetManager
|
import android.appwidget.AppWidgetManager
|
||||||
import android.content.ComponentName
|
import android.content.ComponentName
|
||||||
@ -10,14 +9,12 @@ import android.content.Intent
|
|||||||
import android.media.AudioAttributes
|
import android.media.AudioAttributes
|
||||||
import android.media.AudioManager
|
import android.media.AudioManager
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Build
|
|
||||||
import android.os.PowerManager
|
import android.os.PowerManager
|
||||||
import android.provider.Settings
|
|
||||||
import android.support.v4.app.AlarmManagerCompat
|
|
||||||
import android.support.v4.app.NotificationCompat
|
|
||||||
import android.text.SpannableString
|
import android.text.SpannableString
|
||||||
import android.text.style.RelativeSizeSpan
|
import android.text.style.RelativeSizeSpan
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.core.app.AlarmManagerCompat
|
||||||
|
import androidx.core.app.NotificationCompat
|
||||||
import com.simplemobiletools.clock.R
|
import com.simplemobiletools.clock.R
|
||||||
import com.simplemobiletools.clock.activities.ReminderActivity
|
import com.simplemobiletools.clock.activities.ReminderActivity
|
||||||
import com.simplemobiletools.clock.activities.SnoozeReminderActivity
|
import com.simplemobiletools.clock.activities.SnoozeReminderActivity
|
||||||
@ -31,7 +28,10 @@ import com.simplemobiletools.clock.receivers.HideAlarmReceiver
|
|||||||
import com.simplemobiletools.clock.receivers.HideTimerReceiver
|
import com.simplemobiletools.clock.receivers.HideTimerReceiver
|
||||||
import com.simplemobiletools.clock.services.SnoozeService
|
import com.simplemobiletools.clock.services.SnoozeService
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.*
|
import com.simplemobiletools.commons.helpers.ALARM_SOUND_TYPE_ALARM
|
||||||
|
import com.simplemobiletools.commons.helpers.DAY_MINUTES
|
||||||
|
import com.simplemobiletools.commons.helpers.SILENT
|
||||||
|
import com.simplemobiletools.commons.helpers.isOreoPlus
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.math.pow
|
import kotlin.math.pow
|
||||||
|
|
||||||
@ -165,10 +165,7 @@ fun Context.scheduleNextWidgetUpdate() {
|
|||||||
|
|
||||||
val alarmManager = getSystemService(Context.ALARM_SERVICE) as AlarmManager
|
val alarmManager = getSystemService(Context.ALARM_SERVICE) as AlarmManager
|
||||||
val triggerAtMillis = System.currentTimeMillis() + getMSTillNextMinute()
|
val triggerAtMillis = System.currentTimeMillis() + getMSTillNextMinute()
|
||||||
when {
|
alarmManager.setExact(AlarmManager.RTC, triggerAtMillis, pendingIntent)
|
||||||
isKitkatPlus() -> alarmManager.setExact(AlarmManager.RTC, triggerAtMillis, pendingIntent)
|
|
||||||
else -> alarmManager.set(AlarmManager.RTC, triggerAtMillis, pendingIntent)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.getFormattedTime(passedSeconds: Int, showSeconds: Boolean, makeAmPmSmaller: Boolean): SpannableString {
|
fun Context.getFormattedTime(passedSeconds: Int, showSeconds: Boolean, makeAmPmSmaller: Boolean): SpannableString {
|
||||||
@ -195,9 +192,7 @@ fun Context.formatTo12HourFormat(showSeconds: Boolean, hours: Int, minutes: Int,
|
|||||||
return "${formatTime(showSeconds, false, newHours, minutes, seconds)} $appendable"
|
return "${formatTime(showSeconds, false, newHours, minutes, seconds)} $appendable"
|
||||||
}
|
}
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
|
||||||
fun Context.getNextAlarm(): String {
|
fun Context.getNextAlarm(): String {
|
||||||
if (isLollipopPlus()) {
|
|
||||||
val milliseconds = (getSystemService(Context.ALARM_SERVICE) as AlarmManager).nextAlarmClock?.triggerTime ?: return ""
|
val milliseconds = (getSystemService(Context.ALARM_SERVICE) as AlarmManager).nextAlarmClock?.triggerTime ?: return ""
|
||||||
val calendar = Calendar.getInstance()
|
val calendar = Calendar.getInstance()
|
||||||
val isDaylightSavingActive = TimeZone.getDefault().inDaylightTime(Date())
|
val isDaylightSavingActive = TimeZone.getDefault().inDaylightTime(Date())
|
||||||
@ -211,9 +206,6 @@ fun Context.getNextAlarm(): String {
|
|||||||
val dayOfWeek = resources.getStringArray(R.array.week_days_short)[dayOfWeekIndex]
|
val dayOfWeek = resources.getStringArray(R.array.week_days_short)[dayOfWeekIndex]
|
||||||
val formatted = getFormattedTime(((milliseconds + offset) / 1000L).toInt(), false, false)
|
val formatted = getFormattedTime(((milliseconds + offset) / 1000L).toInt(), false, false)
|
||||||
return "$dayOfWeek $formatted"
|
return "$dayOfWeek $formatted"
|
||||||
} else {
|
|
||||||
return Settings.System.getString(contentResolver, Settings.System.NEXT_ALARM_FORMATTED) ?: ""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.rescheduleEnabledAlarms() {
|
fun Context.rescheduleEnabledAlarms() {
|
||||||
@ -287,9 +279,7 @@ fun Context.getTimerNotification(pendingIntent: PendingIntent, addDeleteIntent:
|
|||||||
builder.setDeleteIntent(reminderActivityIntent)
|
builder.setDeleteIntent(reminderActivityIntent)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLollipopPlus()) {
|
|
||||||
builder.setVisibility(Notification.VISIBILITY_PUBLIC)
|
builder.setVisibility(Notification.VISIBILITY_PUBLIC)
|
||||||
}
|
|
||||||
|
|
||||||
if (config.timerVibrate) {
|
if (config.timerVibrate) {
|
||||||
val vibrateArray = LongArray(2) { 500 }
|
val vibrateArray = LongArray(2) { 500 }
|
||||||
@ -356,9 +346,7 @@ fun Context.getAlarmNotification(pendingIntent: PendingIntent, alarm: Alarm): No
|
|||||||
.addAction(R.drawable.ic_snooze, getString(R.string.snooze), getSnoozePendingIntent(alarm))
|
.addAction(R.drawable.ic_snooze, getString(R.string.snooze), getSnoozePendingIntent(alarm))
|
||||||
.addAction(R.drawable.ic_cross, getString(R.string.dismiss), getHideAlarmPendingIntent(alarm))
|
.addAction(R.drawable.ic_cross, getString(R.string.dismiss), getHideAlarmPendingIntent(alarm))
|
||||||
|
|
||||||
if (isLollipopPlus()) {
|
|
||||||
builder.setVisibility(Notification.VISIBILITY_PUBLIC)
|
builder.setVisibility(Notification.VISIBILITY_PUBLIC)
|
||||||
}
|
|
||||||
|
|
||||||
if (alarm.vibrate) {
|
if (alarm.vibrate) {
|
||||||
val vibrateArray = LongArray(2) { 500 }
|
val vibrateArray = LongArray(2) { 500 }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.simplemobiletools.clock.fragments
|
package com.simplemobiletools.clock.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v4.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
@ -2,7 +2,7 @@ package com.simplemobiletools.clock.fragments
|
|||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.support.v4.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
@ -6,10 +6,10 @@ import android.graphics.Matrix
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.SystemClock
|
import android.os.SystemClock
|
||||||
import android.support.v4.app.Fragment
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import com.simplemobiletools.clock.R
|
import com.simplemobiletools.clock.R
|
||||||
|
@ -12,11 +12,11 @@ import android.os.Build
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.SystemClock
|
import android.os.SystemClock
|
||||||
import android.support.v4.app.Fragment
|
|
||||||
import android.support.v4.app.NotificationCompat
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import androidx.core.app.NotificationCompat
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
import com.simplemobiletools.clock.R
|
import com.simplemobiletools.clock.R
|
||||||
import com.simplemobiletools.clock.activities.ReminderActivity
|
import com.simplemobiletools.clock.activities.ReminderActivity
|
||||||
import com.simplemobiletools.clock.activities.SimpleActivity
|
import com.simplemobiletools.clock.activities.SimpleActivity
|
||||||
@ -27,7 +27,6 @@ import com.simplemobiletools.clock.helpers.TIMER_NOTIF_ID
|
|||||||
import com.simplemobiletools.commons.dialogs.SelectAlarmSoundDialog
|
import com.simplemobiletools.commons.dialogs.SelectAlarmSoundDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.ALARM_SOUND_TYPE_ALARM
|
import com.simplemobiletools.commons.helpers.ALARM_SOUND_TYPE_ALARM
|
||||||
import com.simplemobiletools.commons.helpers.isLollipopPlus
|
|
||||||
import com.simplemobiletools.commons.helpers.isOreoPlus
|
import com.simplemobiletools.commons.helpers.isOreoPlus
|
||||||
import com.simplemobiletools.commons.models.AlarmSound
|
import com.simplemobiletools.commons.models.AlarmSound
|
||||||
import kotlinx.android.synthetic.main.fragment_timer.view.*
|
import kotlinx.android.synthetic.main.fragment_timer.view.*
|
||||||
@ -271,10 +270,7 @@ class TimerFragment : Fragment() {
|
|||||||
.setAutoCancel(true)
|
.setAutoCancel(true)
|
||||||
.setChannelId(channelId)
|
.setChannelId(channelId)
|
||||||
|
|
||||||
if (isLollipopPlus()) {
|
|
||||||
builder.setVisibility(Notification.VISIBILITY_PUBLIC)
|
builder.setVisibility(Notification.VISIBILITY_PUBLIC)
|
||||||
}
|
|
||||||
|
|
||||||
notificationManager.notify(TIMER_NOTIF_ID, builder.build())
|
notificationManager.notify(TIMER_NOTIF_ID, builder.build())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<android.support.design.widget.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
android:id="@+id/main_tabs_holder"
|
android:id="@+id/main_tabs_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
@ -16,32 +16,32 @@
|
|||||||
app:tabMinWidth="150dp"
|
app:tabMinWidth="150dp"
|
||||||
app:tabSelectedTextColor="@android:color/white">
|
app:tabSelectedTextColor="@android:color/white">
|
||||||
|
|
||||||
<android.support.design.widget.TabItem
|
<com.google.android.material.tabs.TabItem
|
||||||
android:id="@+id/tab_clock"
|
android:id="@+id/tab_clock"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:icon="@drawable/ic_clock"/>
|
android:icon="@drawable/ic_clock"/>
|
||||||
|
|
||||||
<android.support.design.widget.TabItem
|
<com.google.android.material.tabs.TabItem
|
||||||
android:id="@+id/tab_alarm"
|
android:id="@+id/tab_alarm"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:icon="@drawable/ic_alarm"/>
|
android:icon="@drawable/ic_alarm"/>
|
||||||
|
|
||||||
<android.support.design.widget.TabItem
|
<com.google.android.material.tabs.TabItem
|
||||||
android:id="@+id/tab_stopwatch"
|
android:id="@+id/tab_stopwatch"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:icon="@drawable/ic_stopwatch"/>
|
android:icon="@drawable/ic_stopwatch"/>
|
||||||
|
|
||||||
<android.support.design.widget.TabItem
|
<com.google.android.material.tabs.TabItem
|
||||||
android:id="@+id/tab_timer"
|
android:id="@+id/tab_timer"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:icon="@drawable/ic_timer"/>
|
android:icon="@drawable/ic_timer"/>
|
||||||
</android.support.design.widget.TabLayout>
|
</com.google.android.material.tabs.TabLayout>
|
||||||
|
|
||||||
<com.booking.rtlviewpager.RtlViewPager
|
<com.duolingo.open.rtlviewpager.RtlViewPager
|
||||||
android:id="@+id/view_pager"
|
android:id="@+id/view_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.constraint.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
@ -106,4 +106,4 @@
|
|||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
app:layout_constraintStart_toStartOf="parent"/>
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -18,18 +18,18 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingBottom="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_purchase_thank_you"
|
android:id="@+id/settings_purchase_thank_you"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:text="@string/purchase_simple_thank_you"/>
|
android:text="@string/purchase_simple_thank_you"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@ -40,18 +40,18 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingBottom="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_customize_colors"
|
android:id="@+id/settings_customize_colors"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:text="@string/customize_colors"/>
|
android:text="@string/customize_colors"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@ -62,10 +62,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingBottom="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
android:id="@+id/settings_use_english"
|
android:id="@+id/settings_use_english"
|
||||||
@ -73,47 +73,23 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:text="@string/use_english_language"
|
android:text="@string/use_english_language"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_avoid_whats_new_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
|
||||||
android:paddingRight="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
|
||||||
android:id="@+id/settings_avoid_whats_new"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@null"
|
|
||||||
android:clickable="false"
|
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
|
||||||
android:text="@string/avoid_whats_new"
|
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_prevent_phone_from_sleeping_holder"
|
android:id="@+id/settings_prevent_phone_from_sleeping_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingBottom="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
android:id="@+id/settings_prevent_phone_from_sleeping"
|
android:id="@+id/settings_prevent_phone_from_sleeping"
|
||||||
@ -121,8 +97,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:text="@string/prevent_phone_from_sleeping"
|
android:text="@string/prevent_phone_from_sleeping"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
@ -134,10 +110,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingBottom="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
android:id="@+id/settings_hour_format"
|
android:id="@+id/settings_hour_format"
|
||||||
@ -145,8 +121,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:text="@string/use_24_hour_time_format"
|
android:text="@string/use_24_hour_time_format"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
@ -158,10 +134,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingBottom="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
android:id="@+id/settings_sunday_first"
|
android:id="@+id/settings_sunday_first"
|
||||||
@ -169,8 +145,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:text="@string/sunday_first"
|
android:text="@string/sunday_first"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
@ -187,8 +163,8 @@
|
|||||||
android:id="@+id/clock_tab_label"
|
android:id="@+id/clock_tab_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/bigger_margin"
|
|
||||||
android:layout_marginStart="@dimen/bigger_margin"
|
android:layout_marginStart="@dimen/bigger_margin"
|
||||||
|
android:layout_marginLeft="@dimen/bigger_margin"
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/activity_margin"
|
||||||
android:text="@string/clock_tab"
|
android:text="@string/clock_tab"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
@ -200,10 +176,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingBottom="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
android:id="@+id/settings_show_seconds"
|
android:id="@+id/settings_show_seconds"
|
||||||
@ -211,8 +187,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:text="@string/show_seconds"
|
android:text="@string/show_seconds"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
@ -229,8 +205,8 @@
|
|||||||
android:id="@+id/alarm_tab_label"
|
android:id="@+id/alarm_tab_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/bigger_margin"
|
|
||||||
android:layout_marginStart="@dimen/bigger_margin"
|
android:layout_marginStart="@dimen/bigger_margin"
|
||||||
|
android:layout_marginLeft="@dimen/bigger_margin"
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/activity_margin"
|
||||||
android:text="@string/alarm_tab"
|
android:text="@string/alarm_tab"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
@ -242,18 +218,18 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/bigger_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/bigger_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/bigger_margin">
|
android:paddingBottom="@dimen/bigger_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_alarm_max_reminder_label"
|
android:id="@+id/settings_alarm_max_reminder_label"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toLeftOf="@+id/settings_alarm_max_reminder"
|
|
||||||
android:layout_toStartOf="@+id/settings_alarm_max_reminder"
|
android:layout_toStartOf="@+id/settings_alarm_max_reminder"
|
||||||
|
android:layout_toLeftOf="@+id/settings_alarm_max_reminder"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:paddingRight="@dimen/medium_margin"
|
android:paddingRight="@dimen/medium_margin"
|
||||||
android:text="@string/max_reminder_duration"/>
|
android:text="@string/max_reminder_duration"/>
|
||||||
@ -277,10 +253,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingBottom="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
android:id="@+id/settings_increase_volume_gradually"
|
android:id="@+id/settings_increase_volume_gradually"
|
||||||
@ -288,8 +264,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:text="@string/increase_volume_gradually"
|
android:text="@string/increase_volume_gradually"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
@ -301,10 +277,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingBottom="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
android:id="@+id/settings_use_same_snooze"
|
android:id="@+id/settings_use_same_snooze"
|
||||||
@ -312,8 +288,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:text="@string/use_same_snooze"
|
android:text="@string/use_same_snooze"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
@ -325,18 +301,18 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/bigger_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/bigger_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/bigger_margin">
|
android:paddingBottom="@dimen/bigger_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_snooze_time_label"
|
android:id="@+id/settings_snooze_time_label"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toLeftOf="@+id/settings_snooze_time"
|
|
||||||
android:layout_toStartOf="@+id/settings_snooze_time"
|
android:layout_toStartOf="@+id/settings_snooze_time"
|
||||||
|
android:layout_toLeftOf="@+id/settings_snooze_time"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:paddingRight="@dimen/medium_margin"
|
android:paddingRight="@dimen/medium_margin"
|
||||||
android:text="@string/snooze_time"/>
|
android:text="@string/snooze_time"/>
|
||||||
@ -365,8 +341,8 @@
|
|||||||
android:id="@+id/stopwatch_tab_label"
|
android:id="@+id/stopwatch_tab_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/bigger_margin"
|
|
||||||
android:layout_marginStart="@dimen/bigger_margin"
|
android:layout_marginStart="@dimen/bigger_margin"
|
||||||
|
android:layout_marginLeft="@dimen/bigger_margin"
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/activity_margin"
|
||||||
android:text="@string/stopwatch_tab"
|
android:text="@string/stopwatch_tab"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
@ -378,10 +354,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingBottom="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
android:id="@+id/settings_vibrate"
|
android:id="@+id/settings_vibrate"
|
||||||
@ -389,8 +365,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:text="@string/vibrate_on_button_press"
|
android:text="@string/vibrate_on_button_press"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@ -406,8 +382,8 @@
|
|||||||
android:id="@+id/timer_tab_label"
|
android:id="@+id/timer_tab_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/bigger_margin"
|
|
||||||
android:layout_marginStart="@dimen/bigger_margin"
|
android:layout_marginStart="@dimen/bigger_margin"
|
||||||
|
android:layout_marginLeft="@dimen/bigger_margin"
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/activity_margin"
|
||||||
android:text="@string/timer_tab"
|
android:text="@string/timer_tab"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
@ -419,18 +395,18 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/bigger_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/bigger_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/bigger_margin">
|
android:paddingBottom="@dimen/bigger_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_timer_max_reminder_label"
|
android:id="@+id/settings_timer_max_reminder_label"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toLeftOf="@+id/settings_timer_max_reminder"
|
|
||||||
android:layout_toStartOf="@+id/settings_timer_max_reminder"
|
android:layout_toStartOf="@+id/settings_timer_max_reminder"
|
||||||
|
android:layout_toLeftOf="@+id/settings_timer_max_reminder"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:paddingRight="@dimen/medium_margin"
|
android:paddingRight="@dimen/medium_margin"
|
||||||
android:text="@string/max_reminder_duration"/>
|
android:text="@string/max_reminder_duration"/>
|
||||||
@ -459,8 +435,8 @@
|
|||||||
android:id="@+id/widgets_label"
|
android:id="@+id/widgets_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/bigger_margin"
|
|
||||||
android:layout_marginStart="@dimen/bigger_margin"
|
android:layout_marginStart="@dimen/bigger_margin"
|
||||||
|
android:layout_marginLeft="@dimen/bigger_margin"
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/activity_margin"
|
||||||
android:text="@string/widgets"
|
android:text="@string/widgets"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
@ -472,10 +448,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingBottom="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
android:id="@+id/settings_use_text_shadow"
|
android:id="@+id/settings_use_text_shadow"
|
||||||
@ -483,8 +459,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:text="@string/use_text_shadow"
|
android:text="@string/use_text_shadow"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@ -495,18 +471,18 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/activity_margin"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
android:paddingLeft="@dimen/normal_margin"
|
||||||
|
android:paddingTop="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/normal_margin"
|
android:paddingRight="@dimen/normal_margin"
|
||||||
android:paddingTop="@dimen/activity_margin">
|
android:paddingBottom="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/settings_customize_widget_colors_label"
|
android:id="@+id/settings_customize_widget_colors_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:text="@string/customize_widget_colors"/>
|
android:text="@string/customize_widget_colors"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/alarm_day_size"
|
android:layout_height="@dimen/alarm_day_size"
|
||||||
android:layout_below="@+id/edit_alarm_time"
|
android:layout_below="@+id/edit_alarm_time"
|
||||||
android:layout_marginBottom="@dimen/medium_margin"
|
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
|
android:layout_marginBottom="@dimen/medium_margin"
|
||||||
android:orientation="horizontal"/>
|
android:orientation="horizontal"/>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
@ -35,9 +35,9 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/edit_alarm_days_holder"
|
android:layout_below="@+id/edit_alarm_days_holder"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:paddingBottom="@dimen/normal_margin"
|
|
||||||
android:paddingLeft="@dimen/tiny_margin"
|
android:paddingLeft="@dimen/tiny_margin"
|
||||||
android:paddingTop="@dimen/normal_margin">
|
android:paddingTop="@dimen/normal_margin"
|
||||||
|
android:paddingBottom="@dimen/normal_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||||
android:id="@+id/edit_alarm_vibrate"
|
android:id="@+id/edit_alarm_vibrate"
|
||||||
@ -59,9 +59,9 @@
|
|||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:drawableLeft="@drawable/ic_bell"
|
android:drawableLeft="@drawable/ic_bell"
|
||||||
android:drawablePadding="@dimen/normal_margin"
|
android:drawablePadding="@dimen/normal_margin"
|
||||||
android:paddingBottom="@dimen/normal_margin"
|
|
||||||
android:paddingLeft="@dimen/tiny_margin"
|
android:paddingLeft="@dimen/tiny_margin"
|
||||||
android:paddingTop="@dimen/normal_margin"
|
android:paddingTop="@dimen/normal_margin"
|
||||||
|
android:paddingBottom="@dimen/normal_margin"
|
||||||
android:textSize="@dimen/normal_text_size"
|
android:textSize="@dimen/normal_text_size"
|
||||||
tools:text="Default alarm"/>
|
tools:text="Default alarm"/>
|
||||||
|
|
||||||
@ -69,9 +69,9 @@
|
|||||||
android:id="@+id/edit_alarm_label_image"
|
android:id="@+id/edit_alarm_label_image"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignBottom="@+id/edit_alarm_label"
|
|
||||||
android:layout_alignTop="@+id/edit_alarm_label"
|
|
||||||
android:layout_below="@+id/edit_alarm_sound"
|
android:layout_below="@+id/edit_alarm_sound"
|
||||||
|
android:layout_alignTop="@+id/edit_alarm_label"
|
||||||
|
android:layout_alignBottom="@+id/edit_alarm_label"
|
||||||
android:layout_marginLeft="@dimen/tiny_margin"
|
android:layout_marginLeft="@dimen/tiny_margin"
|
||||||
android:layout_marginRight="@dimen/tiny_margin"
|
android:layout_marginRight="@dimen/tiny_margin"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
android:id="@+id/edit_time_zone_title"
|
android:id="@+id/edit_time_zone_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/activity_margin"
|
|
||||||
android:layout_marginLeft="@dimen/small_margin"
|
android:layout_marginLeft="@dimen/small_margin"
|
||||||
|
android:layout_marginBottom="@dimen/activity_margin"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textCursorDrawable="@null"
|
android:textCursorDrawable="@null"
|
||||||
android:textSize="@dimen/normal_text_size"/>
|
android:textSize="@dimen/normal_text_size"/>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.design.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/alarm_fragment"
|
android:id="@+id/alarm_fragment"
|
||||||
@ -30,4 +30,4 @@
|
|||||||
android:layout_margin="@dimen/activity_margin"
|
android:layout_margin="@dimen/activity_margin"
|
||||||
android:src="@drawable/ic_plus"/>
|
android:src="@drawable/ic_plus"/>
|
||||||
|
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.design.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
@ -65,4 +65,4 @@
|
|||||||
android:layout_margin="@dimen/activity_margin"
|
android:layout_margin="@dimen/activity_margin"
|
||||||
android:src="@drawable/ic_plus"/>
|
android:src="@drawable/ic_plus"/>
|
||||||
|
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.constraint.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
@ -21,7 +21,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="00.00"/>
|
tools:text="00.00"/>
|
||||||
|
|
||||||
<android.support.constraint.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/stopwatch_sorting_indicators_holder"
|
android:id="@+id/stopwatch_sorting_indicators_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -55,7 +55,7 @@
|
|||||||
app:layout_constraintStart_toEndOf="@+id/stopwatch_sorting_indicator_2"
|
app:layout_constraintStart_toEndOf="@+id/stopwatch_sorting_indicator_2"
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyRecyclerView
|
<com.simplemobiletools.commons.views.MyRecyclerView
|
||||||
android:id="@+id/stopwatch_list"
|
android:id="@+id/stopwatch_list"
|
||||||
@ -73,11 +73,11 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/stopwatch_reset"
|
android:id="@+id/stopwatch_reset"
|
||||||
style="@style/MyBorderlessBackgroundStyle"
|
|
||||||
android:layout_width="@dimen/stopwatch_button_small_size"
|
android:layout_width="@dimen/stopwatch_button_small_size"
|
||||||
android:layout_height="@dimen/stopwatch_button_small_size"
|
android:layout_height="@dimen/stopwatch_button_small_size"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_toLeftOf="@+id/stopwatch_play_pause"
|
android:layout_toLeftOf="@+id/stopwatch_play_pause"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
android:padding="@dimen/normal_margin"
|
android:padding="@dimen/normal_margin"
|
||||||
android:src="@drawable/ic_reset"
|
android:src="@drawable/ic_reset"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
@ -102,9 +102,9 @@
|
|||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/stopwatch_lap"
|
android:id="@+id/stopwatch_lap"
|
||||||
style="@style/MyBorderlessBackgroundStyle"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/stopwatch_button_small_size"
|
android:layout_height="@dimen/stopwatch_button_small_size"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:letterSpacing="0.1"
|
android:letterSpacing="0.1"
|
||||||
android:paddingLeft="@dimen/activity_margin"
|
android:paddingLeft="@dimen/activity_margin"
|
||||||
@ -118,4 +118,4 @@
|
|||||||
app:layout_constraintStart_toEndOf="@+id/stopwatch_play_pause"
|
app:layout_constraintStart_toEndOf="@+id/stopwatch_play_pause"
|
||||||
app:layout_constraintTop_toTopOf="@+id/stopwatch_play_pause"/>
|
app:layout_constraintTop_toTopOf="@+id/stopwatch_play_pause"/>
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.constraint.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
@ -69,11 +69,11 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/timer_reset"
|
android:id="@+id/timer_reset"
|
||||||
style="@style/MyBorderlessBackgroundStyle"
|
|
||||||
android:layout_width="@dimen/stopwatch_button_small_size"
|
android:layout_width="@dimen/stopwatch_button_small_size"
|
||||||
android:layout_height="@dimen/stopwatch_button_small_size"
|
android:layout_height="@dimen/stopwatch_button_small_size"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_toLeftOf="@+id/timer_play_pause"
|
android:layout_toLeftOf="@+id/timer_play_pause"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
android:padding="@dimen/normal_margin"
|
android:padding="@dimen/normal_margin"
|
||||||
android:src="@drawable/ic_reset"
|
android:src="@drawable/ic_reset"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
@ -96,4 +96,4 @@
|
|||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toStartOf="parent"/>
|
app:layout_constraintStart_toStartOf="parent"/>
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
android:id="@+id/add_time_zone_checkbox"
|
android:id="@+id/add_time_zone_checkbox"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignTop="@+id/add_time_zone_title"
|
||||||
android:layout_alignBottom="@+id/add_time_zone_title"
|
android:layout_alignBottom="@+id/add_time_zone_title"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignTop="@+id/add_time_zone_title"
|
|
||||||
android:layout_marginRight="@dimen/activity_margin"
|
android:layout_marginRight="@dimen/activity_margin"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:gravity="center"/>
|
android:gravity="center"/>
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
android:id="@+id/alarm_holder"
|
android:id="@+id/alarm_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingBottom="@dimen/medium_margin"
|
|
||||||
android:paddingLeft="@dimen/activity_margin"
|
android:paddingLeft="@dimen/activity_margin"
|
||||||
android:paddingTop="@dimen/medium_margin">
|
android:paddingTop="@dimen/medium_margin"
|
||||||
|
android:paddingBottom="@dimen/medium_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
android:id="@+id/alarm_time"
|
android:id="@+id/alarm_time"
|
||||||
@ -58,9 +58,9 @@
|
|||||||
android:id="@+id/alarm_switch"
|
android:id="@+id/alarm_switch"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignTop="@+id/alarm_time"
|
||||||
android:layout_alignBottom="@id/alarm_label"
|
android:layout_alignBottom="@id/alarm_label"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignTop="@+id/alarm_time"
|
|
||||||
android:paddingLeft="@dimen/activity_margin"
|
android:paddingLeft="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/medium_margin"/>
|
android:paddingRight="@dimen/medium_margin"/>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.constraint.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
@ -46,4 +46,4 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:text="0.00"/>
|
tools:text="0.00"/>
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:foreground="@drawable/selector">
|
android:foreground="@drawable/selector">
|
||||||
|
|
||||||
<android.support.constraint.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/time_zone_holder"
|
android:id="@+id/time_zone_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
@ -58,5 +58,5 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/time_zone_time"
|
app:layout_constraintTop_toBottomOf="@+id/time_zone_time"
|
||||||
tools:text="Mon, 1 January"/>
|
tools:text="Mon, 1 January"/>
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@ -45,8 +45,8 @@
|
|||||||
android:id="@+id/config_bg_seekbar_holder"
|
android:id="@+id/config_bg_seekbar_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignBottom="@+id/config_bg_color"
|
|
||||||
android:layout_alignTop="@+id/config_bg_color"
|
android:layout_alignTop="@+id/config_bg_color"
|
||||||
|
android:layout_alignBottom="@+id/config_bg_color"
|
||||||
android:layout_toRightOf="@+id/config_bg_color"
|
android:layout_toRightOf="@+id/config_bg_color"
|
||||||
android:background="@android:color/white">
|
android:background="@android:color/white">
|
||||||
|
|
||||||
@ -69,8 +69,8 @@
|
|||||||
android:id="@+id/config_save"
|
android:id="@+id/config_save"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
android:fontFamily="sans-serif-light"
|
android:fontFamily="sans-serif-light"
|
||||||
android:paddingLeft="@dimen/activity_margin"
|
android:paddingLeft="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/activity_margin"
|
android:paddingRight="@dimen/activity_margin"
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
android:layout_height="@dimen/widget_alarm_icon_size"
|
android:layout_height="@dimen/widget_alarm_icon_size"
|
||||||
android:layout_alignBottom="@+id/widget_next_alarm"
|
android:layout_alignBottom="@+id/widget_next_alarm"
|
||||||
android:layout_alignTop="@+id/widget_next_alarm"
|
android:layout_alignTop="@+id/widget_next_alarm"
|
||||||
android:src="@drawable/ic_clock"/>
|
android:src="@drawable/ic_alarm"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/widget_next_alarm"
|
android:id="@+id/widget_next_alarm"
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingBottom="@dimen/small_margin"
|
|
||||||
android:paddingLeft="@dimen/small_margin"
|
android:paddingLeft="@dimen/small_margin"
|
||||||
android:paddingRight="@dimen/small_margin">
|
android:paddingRight="@dimen/small_margin"
|
||||||
|
android:paddingBottom="@dimen/small_margin">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/widget_time"
|
android:id="@+id/widget_time"
|
||||||
@ -40,9 +40,9 @@
|
|||||||
android:id="@+id/widget_next_alarm_image"
|
android:id="@+id/widget_next_alarm_image"
|
||||||
android:layout_width="@dimen/widget_alarm_icon_size"
|
android:layout_width="@dimen/widget_alarm_icon_size"
|
||||||
android:layout_height="@dimen/widget_alarm_icon_size"
|
android:layout_height="@dimen/widget_alarm_icon_size"
|
||||||
android:layout_alignBottom="@+id/widget_next_alarm"
|
|
||||||
android:layout_alignTop="@+id/widget_next_alarm"
|
android:layout_alignTop="@+id/widget_next_alarm"
|
||||||
android:src="@drawable/ic_clock"/>
|
android:layout_alignBottom="@+id/widget_next_alarm"
|
||||||
|
android:src="@drawable/ic_alarm"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/widget_next_alarm"
|
android:id="@+id/widget_next_alarm"
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingBottom="@dimen/small_margin"
|
|
||||||
android:paddingLeft="@dimen/small_margin"
|
android:paddingLeft="@dimen/small_margin"
|
||||||
android:paddingRight="@dimen/small_margin">
|
android:paddingRight="@dimen/small_margin"
|
||||||
|
android:paddingBottom="@dimen/small_margin">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/widget_time"
|
android:id="@+id/widget_time"
|
||||||
@ -56,9 +56,9 @@
|
|||||||
android:id="@+id/widget_next_alarm_image"
|
android:id="@+id/widget_next_alarm_image"
|
||||||
android:layout_width="@dimen/widget_alarm_icon_size"
|
android:layout_width="@dimen/widget_alarm_icon_size"
|
||||||
android:layout_height="@dimen/widget_alarm_icon_size"
|
android:layout_height="@dimen/widget_alarm_icon_size"
|
||||||
android:layout_alignBottom="@+id/widget_next_alarm"
|
|
||||||
android:layout_alignTop="@+id/widget_next_alarm"
|
android:layout_alignTop="@+id/widget_next_alarm"
|
||||||
android:src="@drawable/ic_clock"/>
|
android:layout_alignBottom="@+id/widget_next_alarm"
|
||||||
|
android:src="@drawable/ic_alarm"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/widget_next_alarm"
|
android:id="@+id/widget_next_alarm"
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingBottom="@dimen/small_margin"
|
|
||||||
android:paddingLeft="@dimen/small_margin"
|
android:paddingLeft="@dimen/small_margin"
|
||||||
android:paddingRight="@dimen/small_margin">
|
android:paddingRight="@dimen/small_margin"
|
||||||
|
android:paddingBottom="@dimen/small_margin">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/widget_time"
|
android:id="@+id/widget_time"
|
||||||
@ -46,9 +46,9 @@
|
|||||||
android:id="@+id/widget_next_alarm_image"
|
android:id="@+id/widget_next_alarm_image"
|
||||||
android:layout_width="@dimen/widget_alarm_icon_size"
|
android:layout_width="@dimen/widget_alarm_icon_size"
|
||||||
android:layout_height="@dimen/widget_alarm_icon_size"
|
android:layout_height="@dimen/widget_alarm_icon_size"
|
||||||
android:layout_alignBottom="@+id/widget_next_alarm"
|
|
||||||
android:layout_alignTop="@+id/widget_next_alarm"
|
android:layout_alignTop="@+id/widget_next_alarm"
|
||||||
android:src="@drawable/ic_clock"/>
|
android:layout_alignBottom="@+id/widget_next_alarm"
|
||||||
|
android:src="@drawable/ic_alarm"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/widget_next_alarm"
|
android:id="@+id/widget_next_alarm"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.2.70'
|
ext.kotlin_version = '1.3.11'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
@ -9,7 +9,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.1.4'
|
classpath 'com.android.tools.build:gradle:3.3.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Tue Feb 27 23:34:43 CET 2018
|
#Thu Jan 24 21:07:22 CET 2019
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
|
||||||
|
Loading…
x
Reference in New Issue
Block a user