mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
start rewriting the top menu to a search bar
This commit is contained in:
@@ -70,7 +70,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:71f9297e2e'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:a064515a00'
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||||
|
@@ -90,6 +90,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
appLaunched(BuildConfig.APPLICATION_ID)
|
appLaunched(BuildConfig.APPLICATION_ID)
|
||||||
setupOptionsMenu()
|
setupOptionsMenu()
|
||||||
refreshMenuItems()
|
refreshMenuItems()
|
||||||
|
updateMaterialActivityViews(main_coordinator, main_holder, useTransparentNavigation = false, useTopSearchMenu = true)
|
||||||
|
|
||||||
checkWhatsNewDialog()
|
checkWhatsNewDialog()
|
||||||
calendar_fab.beVisibleIf(config.storedView != YEARLY_VIEW && config.storedView != WEEKLY_VIEW)
|
calendar_fab.beVisibleIf(config.storedView != YEARLY_VIEW && config.storedView != WEEKLY_VIEW)
|
||||||
@@ -182,6 +183,8 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateStatusbarColor(getProperBackgroundColor())
|
||||||
|
main_menu.updateColors()
|
||||||
storeStateVariables()
|
storeStateVariables()
|
||||||
updateWidgets()
|
updateWidgets()
|
||||||
updateTextColors(calendar_coordinator)
|
updateTextColors(calendar_coordinator)
|
||||||
@@ -196,16 +199,15 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
checkSwipeRefreshAvailability()
|
checkSwipeRefreshAvailability()
|
||||||
checkShortcuts()
|
checkShortcuts()
|
||||||
|
|
||||||
setupToolbar(main_toolbar, searchMenuItem = mSearchMenuItem)
|
|
||||||
if (!mIsSearchOpen) {
|
if (!mIsSearchOpen) {
|
||||||
refreshMenuItems()
|
refreshMenuItems()
|
||||||
}
|
}
|
||||||
|
|
||||||
setupQuickFilter()
|
setupQuickFilter()
|
||||||
|
|
||||||
main_toolbar.setNavigationOnClickListener {
|
/*main_toolbar.setNavigationOnClickListener {
|
||||||
onBackPressed()
|
onBackPressed()
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (config.caldavSync) {
|
if (config.caldavSync) {
|
||||||
updateCalDAVEvents()
|
updateCalDAVEvents()
|
||||||
@@ -231,7 +233,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
shouldGoToTodayBeVisible = currentFragments.lastOrNull()?.shouldGoToTodayBeVisible() ?: false
|
shouldGoToTodayBeVisible = currentFragments.lastOrNull()?.shouldGoToTodayBeVisible() ?: false
|
||||||
main_toolbar.menu.apply {
|
main_menu.getToolbar().menu.apply {
|
||||||
goToTodayButton = findItem(R.id.go_to_today)
|
goToTodayButton = findItem(R.id.go_to_today)
|
||||||
findItem(R.id.print).isVisible = config.storedView != MONTHLY_DAILY_VIEW
|
findItem(R.id.print).isVisible = config.storedView != MONTHLY_DAILY_VIEW
|
||||||
findItem(R.id.filter).isVisible = mShouldFilterBeVisible
|
findItem(R.id.filter).isVisible = mShouldFilterBeVisible
|
||||||
@@ -243,8 +245,10 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupOptionsMenu() {
|
private fun setupOptionsMenu() {
|
||||||
setupSearch(main_toolbar.menu)
|
main_menu.getToolbar().inflateMenu(R.menu.menu_main)
|
||||||
main_toolbar.setOnMenuItemClickListener { menuItem ->
|
main_menu.toggleHideOnScroll(false)
|
||||||
|
main_menu.setupMenu()
|
||||||
|
main_menu.getToolbar().setOnMenuItemClickListener { menuItem ->
|
||||||
if (fab_extended_overlay.isVisible()) {
|
if (fab_extended_overlay.isVisible()) {
|
||||||
hideExtendedFab()
|
hideExtendedFab()
|
||||||
}
|
}
|
||||||
@@ -539,17 +543,12 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
currentFragments.last().printView()
|
currentFragments.last().printView()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun resetActionBarTitle() {
|
fun resetActionBarTitle() {
|
||||||
main_toolbar.title = getString(R.string.app_launcher_name)
|
main_menu.updateHintText(getString(R.string.search))
|
||||||
main_toolbar.subtitle = ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun updateTitle(text: String) {
|
fun updateTitle(text: String) {
|
||||||
main_toolbar.title = text
|
main_menu.updateHintText(text)
|
||||||
}
|
|
||||||
|
|
||||||
fun updateSubtitle(text: String) {
|
|
||||||
main_toolbar.subtitle = text
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showFilterDialog() {
|
private fun showFilterDialog() {
|
||||||
@@ -948,7 +947,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
|
|
||||||
fragment.arguments = bundle
|
fragment.arguments = bundle
|
||||||
supportFragmentManager.beginTransaction().add(R.id.fragments_holder, fragment).commitNow()
|
supportFragmentManager.beginTransaction().add(R.id.fragments_holder, fragment).commitNow()
|
||||||
main_toolbar.navigationIcon = null
|
//main_toolbar.navigationIcon = null
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fixDayCode(dayCode: String? = null): String? = when {
|
private fun fixDayCode(dayCode: String? = null): String? = when {
|
||||||
@@ -1043,18 +1042,17 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||||||
toggleGoToTodayVisibility(currentFragments.last().shouldGoToTodayBeVisible())
|
toggleGoToTodayVisibility(currentFragments.last().shouldGoToTodayBeVisible())
|
||||||
currentFragments.last().apply {
|
currentFragments.last().apply {
|
||||||
refreshEvents()
|
refreshEvents()
|
||||||
updateActionBarTitle()
|
|
||||||
}
|
}
|
||||||
calendar_fab.beGoneIf(currentFragments.size == 1 && config.storedView == YEARLY_VIEW)
|
calendar_fab.beGoneIf(currentFragments.size == 1 && config.storedView == YEARLY_VIEW)
|
||||||
if (currentFragments.size > 1) {
|
if (currentFragments.size > 1) {
|
||||||
showBackNavigationArrow()
|
showBackNavigationArrow()
|
||||||
} else {
|
} else {
|
||||||
main_toolbar.navigationIcon = null
|
//main_toolbar.navigationIcon = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showBackNavigationArrow() {
|
private fun showBackNavigationArrow() {
|
||||||
main_toolbar.navigationIcon = resources.getColoredDrawableWithColor(R.drawable.ic_arrow_left_vector, getProperStatusBarColor().getContrastColor())
|
//main_toolbar.navigationIcon = resources.getColoredDrawableWithColor(R.drawable.ic_arrow_left_vector, getProperStatusBarColor().getContrastColor())
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun refreshViewPager() {
|
private fun refreshViewPager() {
|
||||||
|
@@ -7,8 +7,9 @@ import androidx.fragment.app.FragmentManager
|
|||||||
import androidx.fragment.app.FragmentStatePagerAdapter
|
import androidx.fragment.app.FragmentStatePagerAdapter
|
||||||
import com.simplemobiletools.calendar.pro.fragments.YearFragment
|
import com.simplemobiletools.calendar.pro.fragments.YearFragment
|
||||||
import com.simplemobiletools.calendar.pro.helpers.YEAR_LABEL
|
import com.simplemobiletools.calendar.pro.helpers.YEAR_LABEL
|
||||||
|
import com.simplemobiletools.calendar.pro.interfaces.NavigationListener
|
||||||
|
|
||||||
class MyYearPagerAdapter(fm: FragmentManager, val mYears: List<Int>) : FragmentStatePagerAdapter(fm) {
|
class MyYearPagerAdapter(fm: FragmentManager, val mYears: List<Int>, private val mListener: NavigationListener) : FragmentStatePagerAdapter(fm) {
|
||||||
private val mFragments = SparseArray<YearFragment>()
|
private val mFragments = SparseArray<YearFragment>()
|
||||||
|
|
||||||
override fun getCount() = mYears.size
|
override fun getCount() = mYears.size
|
||||||
@@ -20,6 +21,7 @@ class MyYearPagerAdapter(fm: FragmentManager, val mYears: List<Int>) : FragmentS
|
|||||||
|
|
||||||
val fragment = YearFragment()
|
val fragment = YearFragment()
|
||||||
fragment.arguments = bundle
|
fragment.arguments = bundle
|
||||||
|
fragment.listener = mListener
|
||||||
|
|
||||||
mFragments.put(position, fragment)
|
mFragments.put(position, fragment)
|
||||||
return fragment
|
return fragment
|
||||||
|
@@ -74,7 +74,6 @@ class DayFragmentsHolder : MyFragmentHolder(), NavigationListener {
|
|||||||
})
|
})
|
||||||
currentItem = defaultDailyPage
|
currentItem = defaultDailyPage
|
||||||
}
|
}
|
||||||
updateActionBarTitle()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getDays(code: String): List<String> {
|
private fun getDays(code: String): List<String> {
|
||||||
@@ -134,10 +133,6 @@ class DayFragmentsHolder : MyFragmentHolder(), NavigationListener {
|
|||||||
|
|
||||||
override fun shouldGoToTodayBeVisible() = currentDayCode != todayDayCode
|
override fun shouldGoToTodayBeVisible() = currentDayCode != todayDayCode
|
||||||
|
|
||||||
override fun updateActionBarTitle() {
|
|
||||||
(activity as MainActivity).updateTitle(getString(R.string.app_launcher_name))
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getNewEventDayCode() = currentDayCode
|
override fun getNewEventDayCode() = currentDayCode
|
||||||
|
|
||||||
override fun printView() {
|
override fun printView() {
|
||||||
|
@@ -62,7 +62,6 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
use24HourFormat = requireContext().config.use24HourFormat
|
use24HourFormat = requireContext().config.use24HourFormat
|
||||||
updateActionBarTitle()
|
|
||||||
return mView
|
return mView
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,10 +229,6 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
|
|||||||
|
|
||||||
override fun shouldGoToTodayBeVisible() = hasBeenScrolled
|
override fun shouldGoToTodayBeVisible() = hasBeenScrolled
|
||||||
|
|
||||||
override fun updateActionBarTitle() {
|
|
||||||
(activity as? MainActivity)?.updateTitle(getString(R.string.app_launcher_name))
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getNewEventDayCode() = Formatter.getTodayCode()
|
override fun getNewEventDayCode() = Formatter.getTodayCode()
|
||||||
|
|
||||||
override fun printView() {
|
override fun printView() {
|
||||||
|
@@ -72,7 +72,6 @@ class MonthDayFragmentsHolder : MyFragmentHolder(), NavigationListener {
|
|||||||
})
|
})
|
||||||
currentItem = defaultMonthlyPage
|
currentItem = defaultMonthlyPage
|
||||||
}
|
}
|
||||||
updateActionBarTitle()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getMonths(code: String): List<String> {
|
private fun getMonths(code: String): List<String> {
|
||||||
@@ -133,10 +132,6 @@ class MonthDayFragmentsHolder : MyFragmentHolder(), NavigationListener {
|
|||||||
|
|
||||||
override fun shouldGoToTodayBeVisible() = currentDayCode.getMonthCode() != todayDayCode.getMonthCode()
|
override fun shouldGoToTodayBeVisible() = currentDayCode.getMonthCode() != todayDayCode.getMonthCode()
|
||||||
|
|
||||||
override fun updateActionBarTitle() {
|
|
||||||
(activity as? MainActivity)?.updateTitle(getString(R.string.app_launcher_name))
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getNewEventDayCode() = (viewPager?.adapter as? MyMonthDayPagerAdapter)?.getNewEventDayCode(viewPager?.currentItem ?: 0)
|
override fun getNewEventDayCode() = (viewPager?.adapter as? MyMonthDayPagerAdapter)?.getNewEventDayCode(viewPager?.currentItem ?: 0)
|
||||||
?: if (shouldGoToTodayBeVisible()) {
|
?: if (shouldGoToTodayBeVisible()) {
|
||||||
currentDayCode
|
currentDayCode
|
||||||
|
@@ -72,7 +72,6 @@ class MonthFragmentsHolder : MyFragmentHolder(), NavigationListener {
|
|||||||
})
|
})
|
||||||
currentItem = defaultMonthlyPage
|
currentItem = defaultMonthlyPage
|
||||||
}
|
}
|
||||||
updateActionBarTitle()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getMonths(code: String): List<String> {
|
private fun getMonths(code: String): List<String> {
|
||||||
@@ -133,10 +132,6 @@ class MonthFragmentsHolder : MyFragmentHolder(), NavigationListener {
|
|||||||
|
|
||||||
override fun shouldGoToTodayBeVisible() = currentDayCode.getMonthCode() != todayDayCode.getMonthCode()
|
override fun shouldGoToTodayBeVisible() = currentDayCode.getMonthCode() != todayDayCode.getMonthCode()
|
||||||
|
|
||||||
override fun updateActionBarTitle() {
|
|
||||||
(activity as? MainActivity)?.updateTitle(getString(R.string.app_launcher_name))
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getNewEventDayCode() = if (shouldGoToTodayBeVisible()) currentDayCode else todayDayCode
|
override fun getNewEventDayCode() = if (shouldGoToTodayBeVisible()) currentDayCode else todayDayCode
|
||||||
|
|
||||||
override fun printView() {
|
override fun printView() {
|
||||||
|
@@ -14,8 +14,6 @@ abstract class MyFragmentHolder : Fragment() {
|
|||||||
|
|
||||||
abstract fun shouldGoToTodayBeVisible(): Boolean
|
abstract fun shouldGoToTodayBeVisible(): Boolean
|
||||||
|
|
||||||
abstract fun updateActionBarTitle()
|
|
||||||
|
|
||||||
abstract fun getNewEventDayCode(): String
|
abstract fun getNewEventDayCode(): String
|
||||||
|
|
||||||
abstract fun printView()
|
abstract fun printView()
|
||||||
|
@@ -48,8 +48,11 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||||
|
val textColor = requireContext().getProperTextColor()
|
||||||
weekHolder = inflater.inflate(R.layout.fragment_week_holder, container, false) as ViewGroup
|
weekHolder = inflater.inflate(R.layout.fragment_week_holder, container, false) as ViewGroup
|
||||||
weekHolder!!.background = ColorDrawable(requireContext().getProperBackgroundColor())
|
weekHolder!!.background = ColorDrawable(requireContext().getProperBackgroundColor())
|
||||||
|
weekHolder!!.week_view_month_label.setTextColor(textColor)
|
||||||
|
weekHolder!!.week_view_week_number.setTextColor(textColor)
|
||||||
|
|
||||||
val itemHeight = requireContext().getWeeklyViewItemHeight().toInt()
|
val itemHeight = requireContext().getWeeklyViewItemHeight().toInt()
|
||||||
weekHolder!!.week_view_hours_holder.setPadding(0, 0, 0, itemHeight)
|
weekHolder!!.week_view_hours_holder.setPadding(0, 0, 0, itemHeight)
|
||||||
@@ -88,7 +91,7 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateActionBarTitle()
|
setupWeeklyActionbarTitle(currentWeekTS)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupWeeklyViewPager() {
|
private fun setupWeeklyViewPager() {
|
||||||
@@ -131,7 +134,7 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
|
|||||||
weekHolder!!.week_view_hours_holder.removeAllViews()
|
weekHolder!!.week_view_hours_holder.removeAllViews()
|
||||||
val hourDateTime = DateTime().withDate(2000, 1, 1).withTime(0, 0, 0, 0)
|
val hourDateTime = DateTime().withDate(2000, 1, 1).withTime(0, 0, 0, 0)
|
||||||
for (i in 1..23) {
|
for (i in 1..23) {
|
||||||
val formattedHours = Formatter.getHours(requireContext(), hourDateTime.withHourOfDay(i))
|
val formattedHours = Formatter.getTime(requireContext(), hourDateTime.withHourOfDay(i))
|
||||||
(layoutInflater.inflate(R.layout.weekly_view_hour_textview, null, false) as TextView).apply {
|
(layoutInflater.inflate(R.layout.weekly_view_hour_textview, null, false) as TextView).apply {
|
||||||
text = formattedHours
|
text = formattedHours
|
||||||
setTextColor(textColor)
|
setTextColor(textColor)
|
||||||
@@ -155,19 +158,10 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
|
|||||||
|
|
||||||
private fun setupWeeklyActionbarTitle(timestamp: Long) {
|
private fun setupWeeklyActionbarTitle(timestamp: Long) {
|
||||||
val startDateTime = Formatter.getDateTimeFromTS(timestamp)
|
val startDateTime = Formatter.getDateTimeFromTS(timestamp)
|
||||||
val endDateTime = Formatter.getDateTimeFromTS(timestamp + WEEK_SECONDS)
|
val month = Formatter.getShortMonthName(requireContext(), startDateTime.monthOfYear)
|
||||||
val startMonthName = Formatter.getMonthName(requireContext(), startDateTime.monthOfYear)
|
weekHolder!!.week_view_month_label.text = month
|
||||||
if (startDateTime.monthOfYear == endDateTime.monthOfYear) {
|
val weekNumber = startDateTime.plusDays(3).weekOfWeekyear
|
||||||
var newTitle = startMonthName
|
weekHolder!!.week_view_week_number.text = "${getString(R.string.week_number_short)} $weekNumber"
|
||||||
if (startDateTime.year != DateTime().year) {
|
|
||||||
newTitle += " - ${startDateTime.year}"
|
|
||||||
}
|
|
||||||
(activity as MainActivity).updateTitle(newTitle)
|
|
||||||
} else {
|
|
||||||
val endMonthName = Formatter.getMonthName(requireContext(), endDateTime.monthOfYear)
|
|
||||||
(activity as MainActivity).updateTitle("$startMonthName - $endMonthName")
|
|
||||||
}
|
|
||||||
(activity as MainActivity).updateSubtitle("${getString(R.string.week)} ${startDateTime.plusDays(3).weekOfWeekyear}")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun goToToday() {
|
override fun goToToday() {
|
||||||
@@ -243,10 +237,6 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
|
|||||||
|
|
||||||
override fun shouldGoToTodayBeVisible() = currentWeekTS != thisWeekTS
|
override fun shouldGoToTodayBeVisible() = currentWeekTS != thisWeekTS
|
||||||
|
|
||||||
override fun updateActionBarTitle() {
|
|
||||||
setupWeeklyActionbarTitle(currentWeekTS)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getNewEventDayCode(): String {
|
override fun getNewEventDayCode(): String {
|
||||||
val currentTS = System.currentTimeMillis() / 1000
|
val currentTS = System.currentTimeMillis() / 1000
|
||||||
return if (currentTS > currentWeekTS && currentTS < currentWeekTS + WEEK_SECONDS) {
|
return if (currentTS > currentWeekTS && currentTS < currentWeekTS + WEEK_SECONDS) {
|
||||||
|
@@ -14,13 +14,16 @@ import com.simplemobiletools.calendar.pro.extensions.getViewBitmap
|
|||||||
import com.simplemobiletools.calendar.pro.extensions.printBitmap
|
import com.simplemobiletools.calendar.pro.extensions.printBitmap
|
||||||
import com.simplemobiletools.calendar.pro.helpers.YEAR_LABEL
|
import com.simplemobiletools.calendar.pro.helpers.YEAR_LABEL
|
||||||
import com.simplemobiletools.calendar.pro.helpers.YearlyCalendarImpl
|
import com.simplemobiletools.calendar.pro.helpers.YearlyCalendarImpl
|
||||||
|
import com.simplemobiletools.calendar.pro.interfaces.NavigationListener
|
||||||
import com.simplemobiletools.calendar.pro.interfaces.YearlyCalendar
|
import com.simplemobiletools.calendar.pro.interfaces.YearlyCalendar
|
||||||
import com.simplemobiletools.calendar.pro.models.DayYearly
|
import com.simplemobiletools.calendar.pro.models.DayYearly
|
||||||
import com.simplemobiletools.calendar.pro.views.SmallMonthView
|
import com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
|
import com.simplemobiletools.commons.extensions.applyColorFilter
|
||||||
import com.simplemobiletools.commons.extensions.getProperPrimaryColor
|
import com.simplemobiletools.commons.extensions.getProperPrimaryColor
|
||||||
import com.simplemobiletools.commons.extensions.getProperTextColor
|
import com.simplemobiletools.commons.extensions.getProperTextColor
|
||||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||||
import kotlinx.android.synthetic.main.fragment_year.view.*
|
import kotlinx.android.synthetic.main.fragment_year.view.*
|
||||||
|
import kotlinx.android.synthetic.main.top_navigation.view.*
|
||||||
import org.joda.time.DateTime
|
import org.joda.time.DateTime
|
||||||
|
|
||||||
class YearFragment : Fragment(), YearlyCalendar {
|
class YearFragment : Fragment(), YearlyCalendar {
|
||||||
@@ -30,13 +33,16 @@ class YearFragment : Fragment(), YearlyCalendar {
|
|||||||
private var lastHash = 0
|
private var lastHash = 0
|
||||||
private var mCalendar: YearlyCalendarImpl? = null
|
private var mCalendar: YearlyCalendarImpl? = null
|
||||||
|
|
||||||
|
var listener: NavigationListener? = null
|
||||||
|
|
||||||
lateinit var mView: View
|
lateinit var mView: View
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||||
mView = inflater.inflate(R.layout.fragment_year, container, false)
|
mView = inflater.inflate(R.layout.fragment_year, container, false)
|
||||||
mYear = requireArguments().getInt(YEAR_LABEL)
|
mYear = requireArguments().getInt(YEAR_LABEL)
|
||||||
requireContext().updateTextColors(mView.calendar_holder)
|
requireContext().updateTextColors(mView.calendar_wrapper)
|
||||||
setupMonths()
|
setupMonths()
|
||||||
|
setupButtons()
|
||||||
|
|
||||||
mCalendar = YearlyCalendarImpl(this, requireContext(), mYear)
|
mCalendar = YearlyCalendarImpl(this, requireContext(), mYear)
|
||||||
return mView
|
return mView
|
||||||
@@ -94,6 +100,40 @@ class YearFragment : Fragment(), YearlyCalendar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setupButtons() {
|
||||||
|
val textColor = requireContext().getProperTextColor()
|
||||||
|
mView.top_left_arrow.apply {
|
||||||
|
applyColorFilter(textColor)
|
||||||
|
background = null
|
||||||
|
setOnClickListener {
|
||||||
|
listener?.goLeft()
|
||||||
|
}
|
||||||
|
|
||||||
|
val pointerLeft = requireContext().getDrawable(R.drawable.ic_chevron_left_vector)
|
||||||
|
pointerLeft?.isAutoMirrored = true
|
||||||
|
setImageDrawable(pointerLeft)
|
||||||
|
}
|
||||||
|
|
||||||
|
mView.top_right_arrow.apply {
|
||||||
|
applyColorFilter(textColor)
|
||||||
|
background = null
|
||||||
|
setOnClickListener {
|
||||||
|
listener?.goRight()
|
||||||
|
}
|
||||||
|
|
||||||
|
val pointerRight = requireContext().getDrawable(R.drawable.ic_chevron_right_vector)
|
||||||
|
pointerRight?.isAutoMirrored = true
|
||||||
|
setImageDrawable(pointerRight)
|
||||||
|
}
|
||||||
|
|
||||||
|
mView.top_value.apply {
|
||||||
|
setTextColor(requireContext().getProperTextColor())
|
||||||
|
setOnClickListener {
|
||||||
|
(activity as MainActivity).showGoToDateDialog()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun markCurrentMonth(now: DateTime) {
|
private fun markCurrentMonth(now: DateTime) {
|
||||||
if (now.year == mYear) {
|
if (now.year == mYear) {
|
||||||
val monthLabel = mView.findViewById<TextView>(resources.getIdentifier("month_${now.monthOfYear}_label", "id", requireContext().packageName))
|
val monthLabel = mView.findViewById<TextView>(resources.getIdentifier("month_${now.monthOfYear}_label", "id", requireContext().packageName))
|
||||||
@@ -105,8 +145,9 @@ class YearFragment : Fragment(), YearlyCalendar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun updateYearlyCalendar(events: SparseArray<ArrayList<DayYearly>>, hashCode: Int) {
|
override fun updateYearlyCalendar(events: SparseArray<ArrayList<DayYearly>>, hashCode: Int) {
|
||||||
if (!isAdded)
|
if (!isAdded) {
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (hashCode == lastHash) {
|
if (hashCode == lastHash) {
|
||||||
return
|
return
|
||||||
@@ -117,6 +158,8 @@ class YearFragment : Fragment(), YearlyCalendar {
|
|||||||
val monthView = mView.findViewById<SmallMonthView>(resources.getIdentifier("month_$i", "id", requireContext().packageName))
|
val monthView = mView.findViewById<SmallMonthView>(resources.getIdentifier("month_$i", "id", requireContext().packageName))
|
||||||
monthView.setEvents(events.get(i))
|
monthView.setEvents(events.get(i))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mView.top_value.text = mYear.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun printCurrentView() {
|
fun printCurrentView() {
|
||||||
@@ -124,7 +167,7 @@ class YearFragment : Fragment(), YearlyCalendar {
|
|||||||
setupMonths()
|
setupMonths()
|
||||||
toggleSmallMonthPrintModes()
|
toggleSmallMonthPrintModes()
|
||||||
|
|
||||||
requireContext().printBitmap(mView.calendar_holder.getViewBitmap())
|
requireContext().printBitmap(mView.calendar_wrapper.getViewBitmap())
|
||||||
|
|
||||||
isPrintVersion = false
|
isPrintVersion = false
|
||||||
setupMonths()
|
setupMonths()
|
||||||
|
@@ -14,13 +14,14 @@ import com.simplemobiletools.calendar.pro.adapters.MyYearPagerAdapter
|
|||||||
import com.simplemobiletools.calendar.pro.helpers.Formatter
|
import com.simplemobiletools.calendar.pro.helpers.Formatter
|
||||||
import com.simplemobiletools.calendar.pro.helpers.YEARLY_VIEW
|
import com.simplemobiletools.calendar.pro.helpers.YEARLY_VIEW
|
||||||
import com.simplemobiletools.calendar.pro.helpers.YEAR_TO_OPEN
|
import com.simplemobiletools.calendar.pro.helpers.YEAR_TO_OPEN
|
||||||
|
import com.simplemobiletools.calendar.pro.interfaces.NavigationListener
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.views.MyViewPager
|
import com.simplemobiletools.commons.views.MyViewPager
|
||||||
import kotlinx.android.synthetic.main.fragment_years_holder.view.*
|
import kotlinx.android.synthetic.main.fragment_years_holder.view.*
|
||||||
import org.joda.time.DateTime
|
import org.joda.time.DateTime
|
||||||
import kotlin.text.toInt
|
import kotlin.text.toInt
|
||||||
|
|
||||||
class YearFragmentsHolder : MyFragmentHolder() {
|
class YearFragmentsHolder : MyFragmentHolder(), NavigationListener {
|
||||||
private val PREFILLED_YEARS = 61
|
private val PREFILLED_YEARS = 61
|
||||||
|
|
||||||
private var viewPager: MyViewPager? = null
|
private var viewPager: MyViewPager? = null
|
||||||
@@ -49,17 +50,15 @@ class YearFragmentsHolder : MyFragmentHolder() {
|
|||||||
|
|
||||||
private fun setupFragment() {
|
private fun setupFragment() {
|
||||||
val years = getYears(currentYear)
|
val years = getYears(currentYear)
|
||||||
val yearlyAdapter = MyYearPagerAdapter(requireActivity().supportFragmentManager, years)
|
val yearlyAdapter = MyYearPagerAdapter(requireActivity().supportFragmentManager, years, this)
|
||||||
defaultYearlyPage = years.size / 2
|
defaultYearlyPage = years.size / 2
|
||||||
|
|
||||||
viewPager?.apply {
|
viewPager?.apply {
|
||||||
adapter = yearlyAdapter
|
adapter = yearlyAdapter
|
||||||
addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
|
addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
|
||||||
override fun onPageScrollStateChanged(state: Int) {
|
override fun onPageScrollStateChanged(state: Int) {}
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
|
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {}
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPageSelected(position: Int) {
|
override fun onPageSelected(position: Int) {
|
||||||
currentYear = years[position]
|
currentYear = years[position]
|
||||||
@@ -68,15 +67,10 @@ class YearFragmentsHolder : MyFragmentHolder() {
|
|||||||
(activity as? MainActivity)?.toggleGoToTodayVisibility(shouldGoToTodayBeVisible)
|
(activity as? MainActivity)?.toggleGoToTodayVisibility(shouldGoToTodayBeVisible)
|
||||||
isGoToTodayVisible = shouldGoToTodayBeVisible
|
isGoToTodayVisible = shouldGoToTodayBeVisible
|
||||||
}
|
}
|
||||||
|
|
||||||
if (position < years.size) {
|
|
||||||
(activity as? MainActivity)?.updateTitle("${getString(R.string.app_launcher_name)} - ${years[position]}")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
currentItem = defaultYearlyPage
|
currentItem = defaultYearlyPage
|
||||||
}
|
}
|
||||||
updateActionBarTitle()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getYears(targetYear: Int): List<Int> {
|
private fun getYears(targetYear: Int): List<Int> {
|
||||||
@@ -85,6 +79,16 @@ class YearFragmentsHolder : MyFragmentHolder() {
|
|||||||
return years
|
return years
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun goLeft() {
|
||||||
|
viewPager!!.currentItem = viewPager!!.currentItem - 1
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun goRight() {
|
||||||
|
viewPager!!.currentItem = viewPager!!.currentItem + 1
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun goToDateTime(dateTime: DateTime) {}
|
||||||
|
|
||||||
override fun goToToday() {
|
override fun goToToday() {
|
||||||
currentYear = todayYear
|
currentYear = todayYear
|
||||||
setupFragment()
|
setupFragment()
|
||||||
@@ -122,10 +126,6 @@ class YearFragmentsHolder : MyFragmentHolder() {
|
|||||||
|
|
||||||
override fun shouldGoToTodayBeVisible() = currentYear != todayYear
|
override fun shouldGoToTodayBeVisible() = currentYear != todayYear
|
||||||
|
|
||||||
override fun updateActionBarTitle() {
|
|
||||||
(activity as? MainActivity)?.updateTitle("${getString(R.string.app_launcher_name)} - $currentYear")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getNewEventDayCode() = Formatter.getTodayCode()
|
override fun getNewEventDayCode() = Formatter.getTodayCode()
|
||||||
|
|
||||||
override fun printView() {
|
override fun printView() {
|
||||||
|
@@ -115,6 +115,8 @@ object Formatter {
|
|||||||
// use manually translated month names, as DateFormat and Joda have issues with a lot of languages
|
// use manually translated month names, as DateFormat and Joda have issues with a lot of languages
|
||||||
fun getMonthName(context: Context, id: Int) = context.resources.getStringArray(R.array.months)[id - 1]
|
fun getMonthName(context: Context, id: Int) = context.resources.getStringArray(R.array.months)[id - 1]
|
||||||
|
|
||||||
|
fun getShortMonthName(context: Context, id: Int) = context.resources.getStringArray(R.array.months_short)[id - 1]
|
||||||
|
|
||||||
fun getHourPattern(context: Context) = if (context.config.use24HourFormat) PATTERN_HOURS_24 else PATTERN_HOURS_12
|
fun getHourPattern(context: Context) = if (context.config.use24HourFormat) PATTERN_HOURS_24 else PATTERN_HOURS_12
|
||||||
|
|
||||||
fun getTimePattern(context: Context) = if (context.config.use24HourFormat) PATTERN_TIME_24 else PATTERN_TIME_12
|
fun getTimePattern(context: Context) = if (context.config.use24HourFormat) PATTERN_TIME_24 else PATTERN_TIME_12
|
||||||
|
@@ -24,7 +24,7 @@ class WeeklyViewGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Vie
|
|||||||
super.onDraw(canvas)
|
super.onDraw(canvas)
|
||||||
val rowHeight = context.getWeeklyViewItemHeight()
|
val rowHeight = context.getWeeklyViewItemHeight()
|
||||||
for (i in 0 until ROWS_CNT) {
|
for (i in 0 until ROWS_CNT) {
|
||||||
val y = rowHeight * i.toFloat()
|
val y = rowHeight * i.toFloat() - i / 2
|
||||||
canvas.drawLine(0f, y, width.toFloat(), y, paint)
|
canvas.drawLine(0f, y, width.toFloat(), y, paint)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,325 +1,334 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout 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/calendar_holder"
|
android:id="@+id/calendar_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:padding="@dimen/yearly_padding_side">
|
|
||||||
|
|
||||||
<TableRow android:layout_weight="1">
|
<include layout="@layout/top_navigation" />
|
||||||
|
|
||||||
<RelativeLayout
|
<TableLayout
|
||||||
android:id="@+id/month_1_holder"
|
android:id="@+id/calendar_wrapper"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_full"
|
android:layout_below="@+id/top_left_arrow"
|
||||||
android:layout_weight="1">
|
android:padding="@dimen/yearly_padding_side">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<TableRow android:layout_weight="1">
|
||||||
android:id="@+id/month_1_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/january"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_1"
|
android:id="@+id/month_1_holder"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/month_1_label"
|
|
||||||
android:layout_marginStart="@dimen/yearly_month_padding" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/month_2_holder"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="@dimen/yearly_padding_half"
|
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_half"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/month_2_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/february"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
|
||||||
android:id="@+id/month_2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/month_2_label"
|
|
||||||
android:layout_marginStart="@dimen/yearly_month_padding" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/month_3_holder"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="@dimen/yearly_padding_full"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/month_3_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/march"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
|
||||||
android:id="@+id/month_3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/month_3_label"
|
|
||||||
android:layout_marginStart="@dimen/yearly_month_padding" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/month_4_holder"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_full"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
|
||||||
android:id="@+id/month_4_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/april"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
|
||||||
android:id="@+id/month_4"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_4_label"
|
android:layout_marginEnd="@dimen/yearly_padding_full"
|
||||||
android:layout_marginStart="@dimen/yearly_month_padding"
|
android:layout_weight="1">
|
||||||
app:days="30" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
</TableRow>
|
android:id="@+id/month_1_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/january"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<TableRow android:layout_weight="1">
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
|
android:id="@+id/month_1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/month_1_label"
|
||||||
|
android:layout_marginStart="@dimen/yearly_month_padding" />
|
||||||
|
|
||||||
<RelativeLayout
|
</RelativeLayout>
|
||||||
android:id="@+id/month_5_holder"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="@dimen/yearly_padding_half"
|
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_half"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<RelativeLayout
|
||||||
android:id="@+id/month_5_label"
|
android:id="@+id/month_2_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/may"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
|
||||||
android:id="@+id/month_5"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_5_label"
|
android:layout_marginStart="@dimen/yearly_padding_half"
|
||||||
android:layout_marginStart="@dimen/yearly_month_padding" />
|
android:layout_marginEnd="@dimen/yearly_padding_half"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
|
android:id="@+id/month_2_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/february"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
android:id="@+id/month_6_holder"
|
android:id="@+id/month_2"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/yearly_padding_full"
|
android:layout_below="@+id/month_2_label"
|
||||||
android:layout_weight="1">
|
android:layout_marginStart="@dimen/yearly_month_padding" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
</RelativeLayout>
|
||||||
android:id="@+id/month_6_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/june"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_6"
|
android:id="@+id/month_3_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_6_label"
|
android:layout_marginStart="@dimen/yearly_padding_full"
|
||||||
android:layout_marginStart="@dimen/yearly_month_padding"
|
android:layout_weight="1">
|
||||||
app:days="30" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
|
android:id="@+id/month_3_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/march"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
android:id="@+id/month_7_holder"
|
android:id="@+id/month_3"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_full"
|
android:layout_below="@+id/month_3_label"
|
||||||
android:layout_weight="1">
|
android:layout_marginStart="@dimen/yearly_month_padding" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
</RelativeLayout>
|
||||||
android:id="@+id/month_7_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/july"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_7"
|
android:id="@+id/month_4_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_7_label"
|
android:layout_marginEnd="@dimen/yearly_padding_full"
|
||||||
android:layout_marginStart="@dimen/yearly_month_padding" />
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
|
android:id="@+id/month_4_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/april"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
android:id="@+id/month_8_holder"
|
android:id="@+id/month_4"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="@dimen/yearly_padding_half"
|
android:layout_below="@+id/month_4_label"
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_half"
|
android:layout_marginStart="@dimen/yearly_month_padding"
|
||||||
android:layout_weight="1">
|
app:days="30" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
</RelativeLayout>
|
||||||
android:id="@+id/month_8_label"
|
</TableRow>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/august"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<TableRow android:layout_weight="1">
|
||||||
android:id="@+id/month_8"
|
|
||||||
android:layout_width="match_parent"
|
<RelativeLayout
|
||||||
|
android:id="@+id/month_5_holder"
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_8_label"
|
android:layout_marginStart="@dimen/yearly_padding_half"
|
||||||
android:layout_marginStart="@dimen/yearly_month_padding" />
|
android:layout_marginEnd="@dimen/yearly_padding_half"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
</TableRow>
|
android:id="@+id/month_5_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/may"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<TableRow android:layout_weight="1">
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
|
android:id="@+id/month_5"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@+id/month_5_label"
|
||||||
|
android:layout_marginStart="@dimen/yearly_month_padding" />
|
||||||
|
|
||||||
<RelativeLayout
|
</RelativeLayout>
|
||||||
android:id="@+id/month_9_holder"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="@dimen/yearly_padding_full"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<RelativeLayout
|
||||||
android:id="@+id/month_9_label"
|
android:id="@+id/month_6_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/september"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
|
||||||
android:id="@+id/month_9"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_9_label"
|
android:layout_marginStart="@dimen/yearly_padding_full"
|
||||||
android:layout_marginStart="@dimen/yearly_month_padding"
|
android:layout_weight="1">
|
||||||
app:days="30" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
|
android:id="@+id/month_6_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/june"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
android:id="@+id/month_10_holder"
|
android:id="@+id/month_6"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_full"
|
android:layout_below="@+id/month_6_label"
|
||||||
android:layout_weight="1">
|
android:layout_marginStart="@dimen/yearly_month_padding"
|
||||||
|
app:days="30" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
</RelativeLayout>
|
||||||
android:id="@+id/month_10_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/october"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_10"
|
android:id="@+id/month_7_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_10_label"
|
android:layout_marginEnd="@dimen/yearly_padding_full"
|
||||||
android:layout_marginStart="@dimen/yearly_month_padding" />
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
|
android:id="@+id/month_7_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/july"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
android:id="@+id/month_11_holder"
|
android:id="@+id/month_7"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="@dimen/yearly_padding_half"
|
android:layout_below="@+id/month_7_label"
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_half"
|
android:layout_marginStart="@dimen/yearly_month_padding" />
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
</RelativeLayout>
|
||||||
android:id="@+id/month_11_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/november"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_11"
|
android:id="@+id/month_8_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_11_label"
|
android:layout_marginStart="@dimen/yearly_padding_half"
|
||||||
android:layout_marginStart="@dimen/yearly_month_padding"
|
android:layout_marginEnd="@dimen/yearly_padding_half"
|
||||||
app:days="30" />
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
|
android:id="@+id/month_8_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/august"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
android:id="@+id/month_12_holder"
|
android:id="@+id/month_8"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="@dimen/yearly_padding_full"
|
android:layout_below="@+id/month_8_label"
|
||||||
android:layout_weight="1">
|
android:layout_marginStart="@dimen/yearly_month_padding" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
</RelativeLayout>
|
||||||
android:id="@+id/month_12_label"
|
</TableRow>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/december"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<TableRow android:layout_weight="1">
|
||||||
android:id="@+id/month_12"
|
|
||||||
android:layout_width="match_parent"
|
<RelativeLayout
|
||||||
|
android:id="@+id/month_9_holder"
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_12_label"
|
android:layout_marginStart="@dimen/yearly_padding_full"
|
||||||
android:layout_marginStart="@dimen/yearly_month_padding" />
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
</TableRow>
|
android:id="@+id/month_9_label"
|
||||||
</TableLayout>
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/september"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
|
android:id="@+id/month_9"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@+id/month_9_label"
|
||||||
|
android:layout_marginStart="@dimen/yearly_month_padding"
|
||||||
|
app:days="30" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/month_10_holder"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginEnd="@dimen/yearly_padding_full"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/month_10_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/october"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
|
android:id="@+id/month_10"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@+id/month_10_label"
|
||||||
|
android:layout_marginStart="@dimen/yearly_month_padding" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/month_11_holder"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/yearly_padding_half"
|
||||||
|
android:layout_marginEnd="@dimen/yearly_padding_half"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/month_11_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/november"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
|
android:id="@+id/month_11"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@+id/month_11_label"
|
||||||
|
android:layout_marginStart="@dimen/yearly_month_padding"
|
||||||
|
app:days="30" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/month_12_holder"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/yearly_padding_full"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/month_12_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/december"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
|
android:id="@+id/month_12"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@+id/month_12_label"
|
||||||
|
android:layout_marginStart="@dimen/yearly_month_padding" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</TableRow>
|
||||||
|
</TableLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
@@ -5,29 +5,21 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.simplemobiletools.commons.views.MySearchMenu
|
||||||
android:id="@+id/main_app_bar_layout"
|
android:id="@+id/main_menu"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
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_main"
|
|
||||||
app:title="@string/app_launcher_name"
|
|
||||||
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:id="@+id/calendar_coordinator"
|
android:id="@+id/calendar_coordinator"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
android:layout_marginTop="?attr/actionBarSize"
|
||||||
|
android:fillViewport="true"
|
||||||
|
android:scrollbars="none">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
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">
|
||||||
|
|
||||||
|
@@ -2,8 +2,7 @@
|
|||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/month_calendar_holder"
|
android:id="@+id/month_calendar_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:paddingTop="@dimen/medium_margin">
|
|
||||||
|
|
||||||
<include layout="@layout/top_navigation" />
|
<include layout="@layout/top_navigation" />
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/calendar_holder"
|
android:id="@+id/calendar_wrapper"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:padding="@dimen/medium_margin">
|
android:padding="@dimen/medium_margin">
|
||||||
|
@@ -4,6 +4,31 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/week_top_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/stroke_bottom"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/week_letters_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/stroke_bottom"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingBottom="@dimen/small_margin" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/week_all_day_holder"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/week_letters_holder"
|
||||||
|
android:orientation="vertical" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.MyScrollView
|
<com.simplemobiletools.calendar.pro.views.MyScrollView
|
||||||
android:id="@+id/week_events_scrollview"
|
android:id="@+id/week_events_scrollview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -32,29 +57,4 @@
|
|||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</com.simplemobiletools.calendar.pro.views.MyScrollView>
|
</com.simplemobiletools.calendar.pro.views.MyScrollView>
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/week_top_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/stroke_bottom"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/week_letters_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/stroke_bottom"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingBottom="@dimen/small_margin" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/week_all_day_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/week_letters_holder"
|
|
||||||
android:orientation="vertical" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@@ -14,6 +14,33 @@
|
|||||||
android:background="@drawable/stroke_bottom_right"
|
android:background="@drawable/stroke_bottom_right"
|
||||||
android:importantForAccessibility="no" />
|
android:importantForAccessibility="no" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/week_view_month_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_above="@+id/week_view_week_number"
|
||||||
|
android:layout_alignEnd="@+id/week_view_week_number"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:lines="1"
|
||||||
|
android:paddingStart="@dimen/tiny_margin"
|
||||||
|
android:paddingEnd="@dimen/tiny_margin"
|
||||||
|
android:textSize="@dimen/normal_text_size"
|
||||||
|
tools:text="Jan" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/week_view_week_number"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignEnd="@+id/week_view_hours_divider"
|
||||||
|
android:layout_alignBottom="@+id/week_view_hours_divider"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:lines="1"
|
||||||
|
android:paddingStart="@dimen/tiny_margin"
|
||||||
|
android:paddingEnd="@dimen/tiny_margin"
|
||||||
|
android:paddingBottom="@dimen/small_margin"
|
||||||
|
android:textSize="@dimen/smaller_text_size"
|
||||||
|
tools:text="Wk. 2" />
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.MyScrollView
|
<com.simplemobiletools.calendar.pro.views.MyScrollView
|
||||||
android:id="@+id/week_view_hours_scrollview"
|
android:id="@+id/week_view_hours_scrollview"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@@ -1,318 +1,327 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout 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/calendar_holder"
|
android:id="@+id/calendar_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:padding="@dimen/yearly_padding_side">
|
|
||||||
|
|
||||||
<TableRow android:layout_weight="1">
|
<include layout="@layout/top_navigation" />
|
||||||
|
|
||||||
<RelativeLayout
|
<TableLayout
|
||||||
android:id="@+id/month_1_holder"
|
android:id="@+id/calendar_wrapper"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_full"
|
android:layout_below="@+id/top_left_arrow"
|
||||||
android:layout_weight="1">
|
android:padding="@dimen/yearly_padding_side">
|
||||||
|
|
||||||
<TextView
|
<TableRow android:layout_weight="1">
|
||||||
android:id="@+id/month_1_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/january"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_1"
|
android:id="@+id/month_1_holder"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/month_1_label"
|
|
||||||
android:layout_centerInParent="true" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/month_2_holder"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="@dimen/yearly_padding_half"
|
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_half"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/month_2_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/february"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
|
||||||
android:id="@+id/month_2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/month_2_label" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/month_3_holder"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginStart="@dimen/yearly_padding_full"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/month_3_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/march"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
|
||||||
android:id="@+id/month_3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/month_3_label" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow android:layout_weight="1">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/month_4_holder"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_full"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/month_4_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/april"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
|
||||||
android:id="@+id/month_4"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_4_label"
|
android:layout_marginEnd="@dimen/yearly_padding_full"
|
||||||
app:days="30" />
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
|
android:id="@+id/month_1_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/january"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
android:id="@+id/month_5_holder"
|
android:id="@+id/month_1"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/yearly_padding_half"
|
android:layout_below="@+id/month_1_label"
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_half"
|
android:layout_centerInParent="true" />
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<TextView
|
</RelativeLayout>
|
||||||
android:id="@+id/month_5_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/may"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_5"
|
android:id="@+id/month_2_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_5_label" />
|
android:layout_marginStart="@dimen/yearly_padding_half"
|
||||||
|
android:layout_marginEnd="@dimen/yearly_padding_half"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
|
android:id="@+id/month_2_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/february"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
android:id="@+id/month_6_holder"
|
android:id="@+id/month_2"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/yearly_padding_full"
|
android:layout_below="@+id/month_2_label" />
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<TextView
|
</RelativeLayout>
|
||||||
android:id="@+id/month_6_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/june"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_6"
|
android:id="@+id/month_3_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_6_label"
|
android:layout_marginStart="@dimen/yearly_padding_full"
|
||||||
app:days="30" />
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
</TableRow>
|
android:id="@+id/month_3_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/march"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<TableRow android:layout_weight="1">
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
|
android:id="@+id/month_3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/month_3_label" />
|
||||||
|
|
||||||
<RelativeLayout
|
</RelativeLayout>
|
||||||
android:id="@+id/month_7_holder"
|
</TableRow>
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_full"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<TextView
|
<TableRow android:layout_weight="1">
|
||||||
android:id="@+id/month_7_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/july"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_7"
|
android:id="@+id/month_4_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_7_label" />
|
android:layout_marginEnd="@dimen/yearly_padding_full"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
|
android:id="@+id/month_4_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/april"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
android:id="@+id/month_8_holder"
|
android:id="@+id/month_4"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="@dimen/yearly_padding_half"
|
android:layout_below="@+id/month_4_label"
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_half"
|
app:days="30" />
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<TextView
|
</RelativeLayout>
|
||||||
android:id="@+id/month_8_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/august"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_8"
|
android:id="@+id/month_5_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_8_label" />
|
android:layout_marginStart="@dimen/yearly_padding_half"
|
||||||
|
android:layout_marginEnd="@dimen/yearly_padding_half"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
|
android:id="@+id/month_5_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/may"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
android:id="@+id/month_9_holder"
|
android:id="@+id/month_5"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="@dimen/yearly_padding_full"
|
android:layout_below="@+id/month_5_label" />
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<TextView
|
</RelativeLayout>
|
||||||
android:id="@+id/month_9_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/september"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_9"
|
android:id="@+id/month_6_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_9_label"
|
android:layout_marginStart="@dimen/yearly_padding_full"
|
||||||
app:days="30" />
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
</TableRow>
|
android:id="@+id/month_6_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/june"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<TableRow android:layout_weight="1">
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
|
android:id="@+id/month_6"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@+id/month_6_label"
|
||||||
|
app:days="30" />
|
||||||
|
|
||||||
<RelativeLayout
|
</RelativeLayout>
|
||||||
android:id="@+id/month_10_holder"
|
</TableRow>
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_full"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<TextView
|
<TableRow android:layout_weight="1">
|
||||||
android:id="@+id/month_10_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/october"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_10"
|
android:id="@+id/month_7_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_10_label" />
|
android:layout_marginEnd="@dimen/yearly_padding_full"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
|
android:id="@+id/month_7_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/july"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
android:id="@+id/month_11_holder"
|
android:id="@+id/month_7"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="@dimen/yearly_padding_half"
|
android:layout_below="@+id/month_7_label" />
|
||||||
android:layout_marginEnd="@dimen/yearly_padding_half"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<TextView
|
</RelativeLayout>
|
||||||
android:id="@+id/month_11_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/november"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_11"
|
android:id="@+id/month_8_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_11_label"
|
android:layout_marginStart="@dimen/yearly_padding_half"
|
||||||
android:layout_marginStart="@dimen/yearly_month_padding"
|
android:layout_marginEnd="@dimen/yearly_padding_half"
|
||||||
app:days="30" />
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
|
android:id="@+id/month_8_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/august"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<RelativeLayout
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
android:id="@+id/month_12_holder"
|
android:id="@+id/month_8"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="@dimen/yearly_padding_full"
|
android:layout_below="@+id/month_8_label" />
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<TextView
|
</RelativeLayout>
|
||||||
android:id="@+id/month_12_label"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:text="@string/december"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
<RelativeLayout
|
||||||
android:id="@+id/month_12"
|
android:id="@+id/month_9_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/month_12_label" />
|
android:layout_marginStart="@dimen/yearly_padding_full"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
</TableRow>
|
android:id="@+id/month_9_label"
|
||||||
</TableLayout>
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/september"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
|
android:id="@+id/month_9"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@+id/month_9_label"
|
||||||
|
app:days="30" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
<TableRow android:layout_weight="1">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/month_10_holder"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginEnd="@dimen/yearly_padding_full"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/month_10_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/october"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
|
android:id="@+id/month_10"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@+id/month_10_label" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/month_11_holder"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/yearly_padding_half"
|
||||||
|
android:layout_marginEnd="@dimen/yearly_padding_half"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/month_11_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/november"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
|
android:id="@+id/month_11"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@+id/month_11_label"
|
||||||
|
android:layout_marginStart="@dimen/yearly_month_padding"
|
||||||
|
app:days="30" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/month_12_holder"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/yearly_padding_full"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/month_12_label"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="@string/december"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
|
<com.simplemobiletools.calendar.pro.views.SmallMonthView
|
||||||
|
android:id="@+id/month_12"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@+id/month_12_label" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</TableRow>
|
||||||
|
</TableLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/calendar_holder">
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/calendar_wrapper">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/top_left_arrow"
|
android:id="@+id/top_left_arrow"
|
||||||
@@ -24,7 +25,8 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingTop="@dimen/normal_margin"
|
android:paddingTop="@dimen/normal_margin"
|
||||||
android:paddingBottom="@dimen/normal_margin"
|
android:paddingBottom="@dimen/normal_margin"
|
||||||
android:textSize="@dimen/month_text_size" />
|
android:textSize="@dimen/month_text_size"
|
||||||
|
tools:text="January" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/top_right_arrow"
|
android:id="@+id/top_right_arrow"
|
||||||
|
@@ -4,6 +4,6 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="bottom|center_horizontal"
|
android:gravity="bottom|center_horizontal"
|
||||||
android:paddingStart="@dimen/small_margin"
|
android:paddingStart="@dimen/smaller_margin"
|
||||||
android:paddingEnd="@dimen/small_margin"
|
android:paddingEnd="@dimen/smaller_margin"
|
||||||
android:textSize="@dimen/normal_text_size" />
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
@@ -3,12 +3,6 @@
|
|||||||
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"
|
||||||
tools:ignore="AppCompatResource">
|
tools:ignore="AppCompatResource">
|
||||||
<item
|
|
||||||
android:id="@+id/search"
|
|
||||||
android:icon="@drawable/ic_search_vector"
|
|
||||||
android:title="@string/search"
|
|
||||||
app:actionViewClass="androidx.appcompat.widget.SearchView"
|
|
||||||
app:showAsAction="collapseActionView|always" />
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/go_to_today"
|
android:id="@+id/go_to_today"
|
||||||
android:icon="@drawable/ic_today_vector"
|
android:icon="@drawable/ic_today_vector"
|
||||||
|
Reference in New Issue
Block a user