mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-04-03 13:21:01 +02:00
updating the main and settings top menus
This commit is contained in:
parent
6a5832b2ce
commit
087ccdf2f4
@ -3,8 +3,6 @@ package com.simplemobiletools.clock.activities
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.graphics.drawable.ColorDrawable
|
import android.graphics.drawable.ColorDrawable
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
|
||||||
import android.view.MenuItem
|
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
@ -31,6 +29,8 @@ class MainActivity : SimpleActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_main)
|
setContentView(R.layout.activity_main)
|
||||||
appLaunched(BuildConfig.APPLICATION_ID)
|
appLaunched(BuildConfig.APPLICATION_ID)
|
||||||
|
setupOptionsMenu()
|
||||||
|
refreshMenuItems()
|
||||||
storeStateVariables()
|
storeStateVariables()
|
||||||
initFragments()
|
initFragments()
|
||||||
setupTabs()
|
setupTabs()
|
||||||
@ -45,6 +45,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
setupToolbar(main_toolbar)
|
||||||
val configTextColor = getProperTextColor()
|
val configTextColor = getProperTextColor()
|
||||||
if (storedTextColor != configTextColor) {
|
if (storedTextColor != configTextColor) {
|
||||||
getInactiveTabIndexes(view_pager.currentItem).forEach {
|
getInactiveTabIndexes(view_pager.currentItem).forEach {
|
||||||
@ -79,24 +80,22 @@ class MainActivity : SimpleActivity() {
|
|||||||
config.lastUsedViewPagerPage = view_pager.currentItem
|
config.lastUsedViewPagerPage = view_pager.currentItem
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
private fun setupOptionsMenu() {
|
||||||
menuInflater.inflate(R.menu.menu, menu)
|
main_toolbar.setOnMenuItemClickListener { menuItem ->
|
||||||
menu.apply {
|
when (menuItem.itemId) {
|
||||||
findItem(R.id.sort).isVisible = view_pager.currentItem == TAB_ALARM
|
R.id.sort -> getViewPagerAdapter()?.showAlarmSortDialog()
|
||||||
updateMenuItemColors(this)
|
R.id.settings -> launchSettings()
|
||||||
|
R.id.about -> launchAbout()
|
||||||
|
else -> return@setOnMenuItemClickListener false
|
||||||
|
}
|
||||||
|
return@setOnMenuItemClickListener true
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
private fun refreshMenuItems() {
|
||||||
when (item.itemId) {
|
main_toolbar.menu.apply {
|
||||||
R.id.sort -> getViewPagerAdapter()?.showAlarmSortDialog()
|
findItem(R.id.sort).isVisible = view_pager.currentItem == TAB_ALARM
|
||||||
R.id.settings -> launchSettings()
|
|
||||||
R.id.about -> launchAbout()
|
|
||||||
else -> return super.onOptionsItemSelected(item)
|
|
||||||
}
|
}
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onNewIntent(intent: Intent) {
|
override fun onNewIntent(intent: Intent) {
|
||||||
@ -144,7 +143,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
view_pager.adapter = viewPagerAdapter
|
view_pager.adapter = viewPagerAdapter
|
||||||
view_pager.onPageChangeListener {
|
view_pager.onPageChangeListener {
|
||||||
main_tabs_holder.getTabAt(it)?.select()
|
main_tabs_holder.getTabAt(it)?.select()
|
||||||
invalidateOptionsMenu()
|
refreshMenuItems()
|
||||||
}
|
}
|
||||||
|
|
||||||
val tabToOpen = intent.getIntExtra(OPEN_TAB, config.lastUsedViewPagerPage)
|
val tabToOpen = intent.getIntExtra(OPEN_TAB, config.lastUsedViewPagerPage)
|
||||||
|
@ -9,6 +9,7 @@ import com.simplemobiletools.clock.helpers.DEFAULT_MAX_TIMER_REMINDER_SECS
|
|||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
|
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
|
||||||
import com.simplemobiletools.commons.helpers.MINUTE_SECONDS
|
import com.simplemobiletools.commons.helpers.MINUTE_SECONDS
|
||||||
|
import com.simplemobiletools.commons.helpers.NavigationIcon
|
||||||
import kotlinx.android.synthetic.main.activity_settings.*
|
import kotlinx.android.synthetic.main.activity_settings.*
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@ -20,6 +21,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
setupToolbar(settings_toolbar, NavigationIcon.Arrow)
|
||||||
|
|
||||||
setupPurchaseThankYou()
|
setupPurchaseThankYou()
|
||||||
setupCustomizeColors()
|
setupCustomizeColors()
|
||||||
|
@ -1,23 +1,46 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout 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/main_holder"
|
android:id="@+id/main_coordinator"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.duolingo.open.rtlviewpager.RtlViewPager
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/view_pager"
|
android:id="@+id/main_app_bar_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/main_toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:background="@color/color_primary"
|
||||||
|
app:menu="@menu/menu"
|
||||||
|
app:title="@string/app_launcher_name"
|
||||||
|
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/main_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_above="@+id/main_tabs_holder" />
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.duolingo.open.rtlviewpager.RtlViewPager
|
||||||
android:id="@+id/main_tabs_holder"
|
android:id="@+id/view_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_above="@+id/main_tabs_holder" />
|
||||||
app:tabIndicator="@null"
|
|
||||||
app:tabMinWidth="150dp"
|
|
||||||
app:tabRippleColor="@null" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.google.android.material.tabs.TabLayout
|
||||||
|
android:id="@+id/main_tabs_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
app:tabIndicator="@null"
|
||||||
|
app:tabMinWidth="150dp"
|
||||||
|
app:tabRippleColor="@null" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@ -1,278 +1,304 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/settings_scrollview"
|
android:id="@+id/settings_coordinator"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<LinearLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/settings_holder"
|
android:id="@+id/settings_app_bar_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/settings_toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:background="@color/color_primary"
|
||||||
|
app:layout_scrollFlags="scroll|enterAlways"
|
||||||
|
app:title="@string/settings"
|
||||||
|
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:id="@+id/settings_scrollview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:fillViewport="true"
|
||||||
|
android:scrollbars="none"
|
||||||
<TextView
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
android:id="@+id/settings_color_customization_label"
|
|
||||||
style="@style/SettingsSectionLabelStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/color_customization" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/settings_color_customization_holder"
|
android:id="@+id/settings_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/medium_margin"
|
|
||||||
android:background="@drawable/section_holder_stroke"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<TextView
|
||||||
android:id="@+id/settings_customize_colors_holder"
|
android:id="@+id/settings_color_customization_label"
|
||||||
style="@style/SettingsHolderTextViewOneLinerStyle"
|
style="@style/SettingsSectionLabelStyle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/ripple_top_corners">
|
android:text="@string/color_customization" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<LinearLayout
|
||||||
android:id="@+id/settings_customize_colors_label"
|
android:id="@+id/settings_color_customization_holder"
|
||||||
style="@style/SettingsTextLabelStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/customize_colors" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_customize_widget_colors_holder"
|
|
||||||
style="@style/SettingsHolderTextViewOneLinerStyle"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/ripple_bottom_corners">
|
android:layout_margin="@dimen/medium_margin"
|
||||||
|
android:background="@drawable/section_holder_stroke"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<RelativeLayout
|
||||||
android:id="@+id/settings_customize_widget_colors_label"
|
android:id="@+id/settings_customize_colors_holder"
|
||||||
style="@style/SettingsTextLabelStyle"
|
style="@style/SettingsHolderTextViewOneLinerStyle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/customize_widget_colors" />
|
android:background="@drawable/ripple_top_corners">
|
||||||
|
|
||||||
</RelativeLayout>
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_customize_colors_label"
|
||||||
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/customize_colors" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_customize_widget_colors_holder"
|
||||||
|
style="@style/SettingsHolderTextViewOneLinerStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/ripple_bottom_corners">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_customize_widget_colors_label"
|
||||||
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/customize_widget_colors" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settings_general_settings_label"
|
||||||
|
style="@style/SettingsSectionLabelStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/general_settings" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/settings_general_settings_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="@dimen/medium_margin"
|
||||||
|
android:background="@drawable/section_holder_stroke"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_purchase_thank_you_holder"
|
||||||
|
style="@style/SettingsHolderTextViewOneLinerStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/ripple_top_corners">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_purchase_thank_you_label"
|
||||||
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/purchase_simple_thank_you" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_use_english_holder"
|
||||||
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/ripple_background">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_use_english"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/use_english_language" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_prevent_phone_from_sleeping_holder"
|
||||||
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/ripple_background">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_prevent_phone_from_sleeping"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/prevent_phone_from_sleeping" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_sunday_first_holder"
|
||||||
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/ripple_bottom_corners">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_sunday_first"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/sunday_first" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settings_alarm_tab_label"
|
||||||
|
style="@style/SettingsSectionLabelStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/alarm_tab" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/settings_alarm_tab_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="@dimen/medium_margin"
|
||||||
|
android:background="@drawable/section_holder_stroke"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_alarm_max_reminder_holder"
|
||||||
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/ripple_top_corners">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_alarm_max_reminder_label"
|
||||||
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/max_reminder_duration" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_alarm_max_reminder"
|
||||||
|
style="@style/SettingsTextValueStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/settings_alarm_max_reminder_label"
|
||||||
|
tools:text="5 minutes" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_increase_volume_gradually_holder"
|
||||||
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/ripple_background">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_increase_volume_gradually"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/increase_volume_gradually" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_use_same_snooze_holder"
|
||||||
|
style="@style/SettingsHolderCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/ripple_background">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||||
|
android:id="@+id/settings_use_same_snooze"
|
||||||
|
style="@style/SettingsCheckboxStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/use_same_snooze" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_snooze_time_holder"
|
||||||
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/ripple_bottom_corners">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_snooze_time_label"
|
||||||
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/snooze_time" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_snooze_time"
|
||||||
|
style="@style/SettingsTextValueStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/settings_snooze_time_label"
|
||||||
|
tools:text="10 minutes" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settings_timer_tab_label"
|
||||||
|
style="@style/SettingsSectionLabelStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/timer_tab" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/settings_timer_tab_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="@dimen/medium_margin"
|
||||||
|
android:background="@drawable/section_holder_stroke"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/settings_timer_max_reminder_holder"
|
||||||
|
style="@style/SettingsHolderTextViewStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/ripple_all_corners">
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_timer_max_reminder_label"
|
||||||
|
style="@style/SettingsTextLabelStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/max_reminder_duration" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/settings_timer_max_reminder"
|
||||||
|
style="@style/SettingsTextValueStyle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/settings_timer_max_reminder_label"
|
||||||
|
tools:text="1 minute" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
<TextView
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
android:id="@+id/settings_general_settings_label"
|
|
||||||
style="@style/SettingsSectionLabelStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/general_settings" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/settings_general_settings_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="@dimen/medium_margin"
|
|
||||||
android:background="@drawable/section_holder_stroke"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_purchase_thank_you_holder"
|
|
||||||
style="@style/SettingsHolderTextViewOneLinerStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/ripple_top_corners">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/settings_purchase_thank_you_label"
|
|
||||||
style="@style/SettingsTextLabelStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/purchase_simple_thank_you" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_use_english_holder"
|
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/ripple_background">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
|
||||||
android:id="@+id/settings_use_english"
|
|
||||||
style="@style/SettingsCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/use_english_language" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_prevent_phone_from_sleeping_holder"
|
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/ripple_background">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
|
||||||
android:id="@+id/settings_prevent_phone_from_sleeping"
|
|
||||||
style="@style/SettingsCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/prevent_phone_from_sleeping" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_sunday_first_holder"
|
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/ripple_bottom_corners">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
|
||||||
android:id="@+id/settings_sunday_first"
|
|
||||||
style="@style/SettingsCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/sunday_first" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/settings_alarm_tab_label"
|
|
||||||
style="@style/SettingsSectionLabelStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/alarm_tab" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/settings_alarm_tab_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="@dimen/medium_margin"
|
|
||||||
android:background="@drawable/section_holder_stroke"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_alarm_max_reminder_holder"
|
|
||||||
style="@style/SettingsHolderTextViewStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/ripple_top_corners">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/settings_alarm_max_reminder_label"
|
|
||||||
style="@style/SettingsTextLabelStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/max_reminder_duration" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/settings_alarm_max_reminder"
|
|
||||||
style="@style/SettingsTextValueStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/settings_alarm_max_reminder_label"
|
|
||||||
tools:text="5 minutes" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_increase_volume_gradually_holder"
|
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/ripple_background">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
|
||||||
android:id="@+id/settings_increase_volume_gradually"
|
|
||||||
style="@style/SettingsCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/increase_volume_gradually" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_use_same_snooze_holder"
|
|
||||||
style="@style/SettingsHolderCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/ripple_background">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
|
||||||
android:id="@+id/settings_use_same_snooze"
|
|
||||||
style="@style/SettingsCheckboxStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/use_same_snooze" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_snooze_time_holder"
|
|
||||||
style="@style/SettingsHolderTextViewStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/ripple_bottom_corners">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/settings_snooze_time_label"
|
|
||||||
style="@style/SettingsTextLabelStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/snooze_time" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/settings_snooze_time"
|
|
||||||
style="@style/SettingsTextValueStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/settings_snooze_time_label"
|
|
||||||
tools:text="10 minutes" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/settings_timer_tab_label"
|
|
||||||
style="@style/SettingsSectionLabelStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/timer_tab" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/settings_timer_tab_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="@dimen/medium_margin"
|
|
||||||
android:background="@drawable/section_holder_stroke"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_timer_max_reminder_holder"
|
|
||||||
style="@style/SettingsHolderTextViewStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/ripple_all_corners">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/settings_timer_max_reminder_label"
|
|
||||||
style="@style/SettingsTextLabelStyle"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/max_reminder_duration" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/settings_timer_max_reminder"
|
|
||||||
style="@style/SettingsTextValueStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/settings_timer_max_reminder_label"
|
|
||||||
tools:text="1 minute" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</ScrollView>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user