start rewriting the top menu to a search bar

This commit is contained in:
tibbi 2023-01-08 17:03:26 +01:00
parent fd6d03db6f
commit afc737b3a5
23 changed files with 719 additions and 674 deletions

View File

@ -70,7 +70,7 @@ android {
}
dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:71f9297e2e'
implementation 'com.github.SimpleMobileTools:Simple-Commons:a064515a00'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'

View File

@ -90,6 +90,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
appLaunched(BuildConfig.APPLICATION_ID)
setupOptionsMenu()
refreshMenuItems()
updateMaterialActivityViews(main_coordinator, main_holder, useTransparentNavigation = false, useTopSearchMenu = true)
checkWhatsNewDialog()
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()
updateWidgets()
updateTextColors(calendar_coordinator)
@ -196,16 +199,15 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
checkSwipeRefreshAvailability()
checkShortcuts()
setupToolbar(main_toolbar, searchMenuItem = mSearchMenuItem)
if (!mIsSearchOpen) {
refreshMenuItems()
}
setupQuickFilter()
main_toolbar.setNavigationOnClickListener {
/*main_toolbar.setNavigationOnClickListener {
onBackPressed()
}
}*/
if (config.caldavSync) {
updateCalDAVEvents()
@ -231,7 +233,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
}
shouldGoToTodayBeVisible = currentFragments.lastOrNull()?.shouldGoToTodayBeVisible() ?: false
main_toolbar.menu.apply {
main_menu.getToolbar().menu.apply {
goToTodayButton = findItem(R.id.go_to_today)
findItem(R.id.print).isVisible = config.storedView != MONTHLY_DAILY_VIEW
findItem(R.id.filter).isVisible = mShouldFilterBeVisible
@ -243,8 +245,10 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
}
private fun setupOptionsMenu() {
setupSearch(main_toolbar.menu)
main_toolbar.setOnMenuItemClickListener { menuItem ->
main_menu.getToolbar().inflateMenu(R.menu.menu_main)
main_menu.toggleHideOnScroll(false)
main_menu.setupMenu()
main_menu.getToolbar().setOnMenuItemClickListener { menuItem ->
if (fab_extended_overlay.isVisible()) {
hideExtendedFab()
}
@ -539,17 +543,12 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
currentFragments.last().printView()
}
private fun resetActionBarTitle() {
main_toolbar.title = getString(R.string.app_launcher_name)
main_toolbar.subtitle = ""
fun resetActionBarTitle() {
main_menu.updateHintText(getString(R.string.search))
}
fun updateTitle(text: String) {
main_toolbar.title = text
}
fun updateSubtitle(text: String) {
main_toolbar.subtitle = text
main_menu.updateHintText(text)
}
private fun showFilterDialog() {
@ -948,7 +947,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
fragment.arguments = bundle
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 {
@ -1043,18 +1042,17 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
toggleGoToTodayVisibility(currentFragments.last().shouldGoToTodayBeVisible())
currentFragments.last().apply {
refreshEvents()
updateActionBarTitle()
}
calendar_fab.beGoneIf(currentFragments.size == 1 && config.storedView == YEARLY_VIEW)
if (currentFragments.size > 1) {
showBackNavigationArrow()
} else {
main_toolbar.navigationIcon = null
//main_toolbar.navigationIcon = null
}
}
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() {

View File

@ -7,8 +7,9 @@ import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter
import com.simplemobiletools.calendar.pro.fragments.YearFragment
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>()
override fun getCount() = mYears.size
@ -20,6 +21,7 @@ class MyYearPagerAdapter(fm: FragmentManager, val mYears: List<Int>) : FragmentS
val fragment = YearFragment()
fragment.arguments = bundle
fragment.listener = mListener
mFragments.put(position, fragment)
return fragment

View File

@ -74,7 +74,6 @@ class DayFragmentsHolder : MyFragmentHolder(), NavigationListener {
})
currentItem = defaultDailyPage
}
updateActionBarTitle()
}
private fun getDays(code: String): List<String> {
@ -134,10 +133,6 @@ class DayFragmentsHolder : MyFragmentHolder(), NavigationListener {
override fun shouldGoToTodayBeVisible() = currentDayCode != todayDayCode
override fun updateActionBarTitle() {
(activity as MainActivity).updateTitle(getString(R.string.app_launcher_name))
}
override fun getNewEventDayCode() = currentDayCode
override fun printView() {

View File

@ -62,7 +62,6 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
}
use24HourFormat = requireContext().config.use24HourFormat
updateActionBarTitle()
return mView
}
@ -230,10 +229,6 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
override fun shouldGoToTodayBeVisible() = hasBeenScrolled
override fun updateActionBarTitle() {
(activity as? MainActivity)?.updateTitle(getString(R.string.app_launcher_name))
}
override fun getNewEventDayCode() = Formatter.getTodayCode()
override fun printView() {

View File

@ -72,7 +72,6 @@ class MonthDayFragmentsHolder : MyFragmentHolder(), NavigationListener {
})
currentItem = defaultMonthlyPage
}
updateActionBarTitle()
}
private fun getMonths(code: String): List<String> {
@ -133,10 +132,6 @@ class MonthDayFragmentsHolder : MyFragmentHolder(), NavigationListener {
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)
?: if (shouldGoToTodayBeVisible()) {
currentDayCode

View File

@ -72,7 +72,6 @@ class MonthFragmentsHolder : MyFragmentHolder(), NavigationListener {
})
currentItem = defaultMonthlyPage
}
updateActionBarTitle()
}
private fun getMonths(code: String): List<String> {
@ -133,10 +132,6 @@ class MonthFragmentsHolder : MyFragmentHolder(), NavigationListener {
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 printView() {

View File

@ -14,8 +14,6 @@ abstract class MyFragmentHolder : Fragment() {
abstract fun shouldGoToTodayBeVisible(): Boolean
abstract fun updateActionBarTitle()
abstract fun getNewEventDayCode(): String
abstract fun printView()

View File

@ -48,8 +48,11 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
}
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!!.background = ColorDrawable(requireContext().getProperBackgroundColor())
weekHolder!!.week_view_month_label.setTextColor(textColor)
weekHolder!!.week_view_week_number.setTextColor(textColor)
val itemHeight = requireContext().getWeeklyViewItemHeight().toInt()
weekHolder!!.week_view_hours_holder.setPadding(0, 0, 0, itemHeight)
@ -88,7 +91,7 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
}
}
updateActionBarTitle()
setupWeeklyActionbarTitle(currentWeekTS)
}
private fun setupWeeklyViewPager() {
@ -131,7 +134,7 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
weekHolder!!.week_view_hours_holder.removeAllViews()
val hourDateTime = DateTime().withDate(2000, 1, 1).withTime(0, 0, 0, 0)
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 {
text = formattedHours
setTextColor(textColor)
@ -155,19 +158,10 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
private fun setupWeeklyActionbarTitle(timestamp: Long) {
val startDateTime = Formatter.getDateTimeFromTS(timestamp)
val endDateTime = Formatter.getDateTimeFromTS(timestamp + WEEK_SECONDS)
val startMonthName = Formatter.getMonthName(requireContext(), startDateTime.monthOfYear)
if (startDateTime.monthOfYear == endDateTime.monthOfYear) {
var newTitle = startMonthName
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}")
val month = Formatter.getShortMonthName(requireContext(), startDateTime.monthOfYear)
weekHolder!!.week_view_month_label.text = month
val weekNumber = startDateTime.plusDays(3).weekOfWeekyear
weekHolder!!.week_view_week_number.text = "${getString(R.string.week_number_short)} $weekNumber"
}
override fun goToToday() {
@ -243,10 +237,6 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
override fun shouldGoToTodayBeVisible() = currentWeekTS != thisWeekTS
override fun updateActionBarTitle() {
setupWeeklyActionbarTitle(currentWeekTS)
}
override fun getNewEventDayCode(): String {
val currentTS = System.currentTimeMillis() / 1000
return if (currentTS > currentWeekTS && currentTS < currentWeekTS + WEEK_SECONDS) {

View File

@ -14,13 +14,16 @@ import com.simplemobiletools.calendar.pro.extensions.getViewBitmap
import com.simplemobiletools.calendar.pro.extensions.printBitmap
import com.simplemobiletools.calendar.pro.helpers.YEAR_LABEL
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.models.DayYearly
import com.simplemobiletools.calendar.pro.views.SmallMonthView
import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.getProperPrimaryColor
import com.simplemobiletools.commons.extensions.getProperTextColor
import com.simplemobiletools.commons.extensions.updateTextColors
import kotlinx.android.synthetic.main.fragment_year.view.*
import kotlinx.android.synthetic.main.top_navigation.view.*
import org.joda.time.DateTime
class YearFragment : Fragment(), YearlyCalendar {
@ -30,13 +33,16 @@ class YearFragment : Fragment(), YearlyCalendar {
private var lastHash = 0
private var mCalendar: YearlyCalendarImpl? = null
var listener: NavigationListener? = null
lateinit var mView: View
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
mView = inflater.inflate(R.layout.fragment_year, container, false)
mYear = requireArguments().getInt(YEAR_LABEL)
requireContext().updateTextColors(mView.calendar_holder)
requireContext().updateTextColors(mView.calendar_wrapper)
setupMonths()
setupButtons()
mCalendar = YearlyCalendarImpl(this, requireContext(), mYear)
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) {
if (now.year == mYear) {
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) {
if (!isAdded)
if (!isAdded) {
return
}
if (hashCode == lastHash) {
return
@ -117,6 +158,8 @@ class YearFragment : Fragment(), YearlyCalendar {
val monthView = mView.findViewById<SmallMonthView>(resources.getIdentifier("month_$i", "id", requireContext().packageName))
monthView.setEvents(events.get(i))
}
mView.top_value.text = mYear.toString()
}
fun printCurrentView() {
@ -124,7 +167,7 @@ class YearFragment : Fragment(), YearlyCalendar {
setupMonths()
toggleSmallMonthPrintModes()
requireContext().printBitmap(mView.calendar_holder.getViewBitmap())
requireContext().printBitmap(mView.calendar_wrapper.getViewBitmap())
isPrintVersion = false
setupMonths()

View File

@ -14,13 +14,14 @@ import com.simplemobiletools.calendar.pro.adapters.MyYearPagerAdapter
import com.simplemobiletools.calendar.pro.helpers.Formatter
import com.simplemobiletools.calendar.pro.helpers.YEARLY_VIEW
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.views.MyViewPager
import kotlinx.android.synthetic.main.fragment_years_holder.view.*
import org.joda.time.DateTime
import kotlin.text.toInt
class YearFragmentsHolder : MyFragmentHolder() {
class YearFragmentsHolder : MyFragmentHolder(), NavigationListener {
private val PREFILLED_YEARS = 61
private var viewPager: MyViewPager? = null
@ -49,17 +50,15 @@ class YearFragmentsHolder : MyFragmentHolder() {
private fun setupFragment() {
val years = getYears(currentYear)
val yearlyAdapter = MyYearPagerAdapter(requireActivity().supportFragmentManager, years)
val yearlyAdapter = MyYearPagerAdapter(requireActivity().supportFragmentManager, years, this)
defaultYearlyPage = years.size / 2
viewPager?.apply {
adapter = yearlyAdapter
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) {
currentYear = years[position]
@ -68,15 +67,10 @@ class YearFragmentsHolder : MyFragmentHolder() {
(activity as? MainActivity)?.toggleGoToTodayVisibility(shouldGoToTodayBeVisible)
isGoToTodayVisible = shouldGoToTodayBeVisible
}
if (position < years.size) {
(activity as? MainActivity)?.updateTitle("${getString(R.string.app_launcher_name)} - ${years[position]}")
}
}
})
currentItem = defaultYearlyPage
}
updateActionBarTitle()
}
private fun getYears(targetYear: Int): List<Int> {
@ -85,6 +79,16 @@ class YearFragmentsHolder : MyFragmentHolder() {
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() {
currentYear = todayYear
setupFragment()
@ -122,10 +126,6 @@ class YearFragmentsHolder : MyFragmentHolder() {
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 printView() {

View File

@ -115,6 +115,8 @@ object Formatter {
// 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 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 getTimePattern(context: Context) = if (context.config.use24HourFormat) PATTERN_TIME_24 else PATTERN_TIME_12

View File

@ -24,7 +24,7 @@ class WeeklyViewGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Vie
super.onDraw(canvas)
val rowHeight = context.getWeeklyViewItemHeight()
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)
}

View File

@ -1,325 +1,334 @@
<?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"
android:id="@+id/calendar_holder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/yearly_padding_side">
android:layout_height="match_parent">
<TableRow android:layout_weight="1">
<include layout="@layout/top_navigation" />
<RelativeLayout
android:id="@+id/month_1_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/yearly_padding_full"
android:layout_weight="1">
<TableLayout
android:id="@+id/calendar_wrapper"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/top_left_arrow"
android:padding="@dimen/yearly_padding_side">
<com.simplemobiletools.commons.views.MyTextView
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_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"
<RelativeLayout
android:id="@+id/month_1_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_below="@+id/month_4_label"
android:layout_marginStart="@dimen/yearly_month_padding"
app:days="30" />
android:layout_marginEnd="@dimen/yearly_padding_full"
android:layout_weight="1">
</RelativeLayout>
</TableRow>
<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" />
<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
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">
</RelativeLayout>
<com.simplemobiletools.commons.views.MyTextView
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
android:id="@+id/month_5"
android:layout_width="match_parent"
<RelativeLayout
android:id="@+id/month_2_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_below="@+id/month_5_label"
android:layout_marginStart="@dimen/yearly_month_padding" />
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
android:id="@+id/month_6_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/yearly_padding_full"
android:layout_weight="1">
<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" />
<com.simplemobiletools.commons.views.MyTextView
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_6"
android:layout_width="match_parent"
<RelativeLayout
android:id="@+id/month_3_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_below="@+id/month_6_label"
android:layout_marginStart="@dimen/yearly_month_padding"
app:days="30" />
android:layout_marginStart="@dimen/yearly_padding_full"
android:layout_weight="1">
</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
android:id="@+id/month_7_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/yearly_padding_full"
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"
android:layout_marginStart="@dimen/yearly_month_padding" />
<com.simplemobiletools.commons.views.MyTextView
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_7"
android:layout_width="match_parent"
<RelativeLayout
android:id="@+id/month_4_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_below="@+id/month_7_label"
android:layout_marginStart="@dimen/yearly_month_padding" />
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
android:id="@+id/month_8_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.calendar.pro.views.SmallMonthView
android:id="@+id/month_4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/month_4_label"
android:layout_marginStart="@dimen/yearly_month_padding"
app:days="30" />
<com.simplemobiletools.commons.views.MyTextView
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>
</TableRow>
<com.simplemobiletools.calendar.pro.views.SmallMonthView
android:id="@+id/month_8"
android:layout_width="match_parent"
<TableRow android:layout_weight="1">
<RelativeLayout
android:id="@+id/month_5_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_below="@+id/month_8_label"
android:layout_marginStart="@dimen/yearly_month_padding" />
android:layout_marginStart="@dimen/yearly_padding_half"
android:layout_marginEnd="@dimen/yearly_padding_half"
android:layout_weight="1">
</RelativeLayout>
</TableRow>
<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" />
<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
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">
</RelativeLayout>
<com.simplemobiletools.commons.views.MyTextView
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
android:id="@+id/month_9"
android:layout_width="match_parent"
<RelativeLayout
android:id="@+id/month_6_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_below="@+id/month_9_label"
android:layout_marginStart="@dimen/yearly_month_padding"
app:days="30" />
android:layout_marginStart="@dimen/yearly_padding_full"
android:layout_weight="1">
</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
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">
<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"
android:layout_marginStart="@dimen/yearly_month_padding"
app:days="30" />
<com.simplemobiletools.commons.views.MyTextView
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" />
</RelativeLayout>
<com.simplemobiletools.calendar.pro.views.SmallMonthView
android:id="@+id/month_10"
android:layout_width="match_parent"
<RelativeLayout
android:id="@+id/month_7_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_below="@+id/month_10_label"
android:layout_marginStart="@dimen/yearly_month_padding" />
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
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">
<com.simplemobiletools.calendar.pro.views.SmallMonthView
android:id="@+id/month_7"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/month_7_label"
android:layout_marginStart="@dimen/yearly_month_padding" />
<com.simplemobiletools.commons.views.MyTextView
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" />
</RelativeLayout>
<com.simplemobiletools.calendar.pro.views.SmallMonthView
android:id="@+id/month_11"
android:layout_width="match_parent"
<RelativeLayout
android:id="@+id/month_8_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_below="@+id/month_11_label"
android:layout_marginStart="@dimen/yearly_month_padding"
app:days="30" />
android:layout_marginStart="@dimen/yearly_padding_half"
android:layout_marginEnd="@dimen/yearly_padding_half"
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
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">
<com.simplemobiletools.calendar.pro.views.SmallMonthView
android:id="@+id/month_8"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/month_8_label"
android:layout_marginStart="@dimen/yearly_month_padding" />
<com.simplemobiletools.commons.views.MyTextView
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" />
</RelativeLayout>
</TableRow>
<com.simplemobiletools.calendar.pro.views.SmallMonthView
android:id="@+id/month_12"
android:layout_width="match_parent"
<TableRow android:layout_weight="1">
<RelativeLayout
android:id="@+id/month_9_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_below="@+id/month_12_label"
android:layout_marginStart="@dimen/yearly_month_padding" />
android:layout_marginStart="@dimen/yearly_padding_full"
android:layout_weight="1">
</RelativeLayout>
</TableRow>
</TableLayout>
<TextView
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
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>

View File

@ -5,29 +5,21 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/main_app_bar_layout"
<com.simplemobiletools.commons.views.MySearchMenu
android:id="@+id/main_menu"
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_main"
app:title="@string/app_launcher_name"
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
</com.google.android.material.appbar.AppBarLayout>
android:layout_height="wrap_content" />
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/calendar_coordinator"
android:layout_width="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
android:id="@+id/main_holder"
android:layout_width="match_parent"
android:layout_height="match_parent">

View File

@ -2,8 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/month_calendar_holder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/medium_margin">
android:layout_height="match_parent">
<include layout="@layout/top_navigation" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/calendar_holder"
android:id="@+id/calendar_wrapper"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/medium_margin">

View File

@ -4,6 +4,31 @@
android:layout_width="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
android:id="@+id/week_events_scrollview"
android:layout_width="match_parent"
@ -32,29 +57,4 @@
</RelativeLayout>
</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>

View File

@ -14,6 +14,33 @@
android:background="@drawable/stroke_bottom_right"
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
android:id="@+id/week_view_hours_scrollview"
android:layout_width="wrap_content"

View File

@ -1,318 +1,327 @@
<?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"
android:id="@+id/calendar_holder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/yearly_padding_side">
android:layout_height="match_parent">
<TableRow android:layout_weight="1">
<include layout="@layout/top_navigation" />
<RelativeLayout
android:id="@+id/month_1_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/yearly_padding_full"
android:layout_weight="1">
<TableLayout
android:id="@+id/calendar_wrapper"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/top_left_arrow"
android:padding="@dimen/yearly_padding_side">
<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" />
<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_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"
<RelativeLayout
android:id="@+id/month_1_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_below="@+id/month_4_label"
app:days="30" />
android:layout_marginEnd="@dimen/yearly_padding_full"
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
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.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_centerInParent="true" />
<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_5"
android:layout_width="match_parent"
<RelativeLayout
android:id="@+id/month_2_holder"
android:layout_width="0dp"
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
android:id="@+id/month_6_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/yearly_padding_full"
android:layout_weight="1">
<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" />
<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_6"
android:layout_width="match_parent"
<RelativeLayout
android:id="@+id/month_3_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_below="@+id/month_6_label"
app:days="30" />
android:layout_marginStart="@dimen/yearly_padding_full"
android:layout_weight="1">
</RelativeLayout>
</TableRow>
<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" />
<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
android:id="@+id/month_7_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/yearly_padding_full"
android:layout_weight="1">
</RelativeLayout>
</TableRow>
<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" />
<TableRow android:layout_weight="1">
<com.simplemobiletools.calendar.pro.views.SmallMonthView
android:id="@+id/month_7"
android:layout_width="match_parent"
<RelativeLayout
android:id="@+id/month_4_holder"
android:layout_width="0dp"
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
android:id="@+id/month_8_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.calendar.pro.views.SmallMonthView
android:id="@+id/month_4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/month_4_label"
app:days="30" />
<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_8"
android:layout_width="match_parent"
<RelativeLayout
android:id="@+id/month_5_holder"
android:layout_width="0dp"
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
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.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" />
<TextView
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" />
</RelativeLayout>
<com.simplemobiletools.calendar.pro.views.SmallMonthView
android:id="@+id/month_9"
android:layout_width="match_parent"
<RelativeLayout
android:id="@+id/month_6_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_below="@+id/month_9_label"
app:days="30" />
android:layout_marginStart="@dimen/yearly_padding_full"
android:layout_weight="1">
</RelativeLayout>
</TableRow>
<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" />
<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
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">
</RelativeLayout>
</TableRow>
<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" />
<TableRow android:layout_weight="1">
<com.simplemobiletools.calendar.pro.views.SmallMonthView
android:id="@+id/month_10"
android:layout_width="match_parent"
<RelativeLayout
android:id="@+id/month_7_holder"
android:layout_width="0dp"
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
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">
<com.simplemobiletools.calendar.pro.views.SmallMonthView
android:id="@+id/month_7"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/month_7_label" />
<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" />
</RelativeLayout>
<com.simplemobiletools.calendar.pro.views.SmallMonthView
android:id="@+id/month_11"
android:layout_width="match_parent"
<RelativeLayout
android:id="@+id/month_8_holder"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_below="@+id/month_11_label"
android:layout_marginStart="@dimen/yearly_month_padding"
app:days="30" />
android:layout_marginStart="@dimen/yearly_padding_half"
android:layout_marginEnd="@dimen/yearly_padding_half"
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
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">
<com.simplemobiletools.calendar.pro.views.SmallMonthView
android:id="@+id/month_8"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/month_8_label" />
<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" />
</RelativeLayout>
<com.simplemobiletools.calendar.pro.views.SmallMonthView
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_below="@+id/month_12_label" />
android:layout_marginStart="@dimen/yearly_padding_full"
android:layout_weight="1">
</RelativeLayout>
</TableRow>
</TableLayout>
<TextView
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
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>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<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
android:id="@+id/top_left_arrow"
@ -24,7 +25,8 @@
android:gravity="center"
android:paddingTop="@dimen/normal_margin"
android:paddingBottom="@dimen/normal_margin"
android:textSize="@dimen/month_text_size" />
android:textSize="@dimen/month_text_size"
tools:text="January" />
<ImageView
android:id="@+id/top_right_arrow"

View File

@ -4,6 +4,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="bottom|center_horizontal"
android:paddingStart="@dimen/small_margin"
android:paddingEnd="@dimen/small_margin"
android:paddingStart="@dimen/smaller_margin"
android:paddingEnd="@dimen/smaller_margin"
android:textSize="@dimen/normal_text_size" />

View File

@ -3,12 +3,6 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
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
android:id="@+id/go_to_today"
android:icon="@drawable/ic_today_vector"