From 7062cc3b4984117c86ef1c2078331f1f67e8cdc6 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 22 Mar 2020 17:49:02 +0100 Subject: [PATCH] setting another weekly view related size dynamically --- .../calendar/pro/fragments/WeekFragmentsHolder.kt | 4 ++++ app/src/main/res/layout/fragment_week_holder.xml | 3 +-- app/src/main/res/layout/weekly_view_hour_textview.xml | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/WeekFragmentsHolder.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/WeekFragmentsHolder.kt index d0a73efa3..feb2720bd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/WeekFragmentsHolder.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/WeekFragmentsHolder.kt @@ -49,6 +49,10 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { weekHolder = inflater.inflate(R.layout.fragment_week_holder, container, false) as ViewGroup weekHolder!!.background = ColorDrawable(context!!.config.backgroundColor) + + val itemHeight = context!!.config.weeklyViewItemHeight.toInt() + weekHolder!!.week_view_hours_holder.setPadding(0, 0, 0, itemHeight) + viewPager = weekHolder!!.week_view_view_pager viewPager!!.id = (System.currentTimeMillis() % 100000).toInt() setupFragment() diff --git a/app/src/main/res/layout/fragment_week_holder.xml b/app/src/main/res/layout/fragment_week_holder.xml index ae4290790..925869dad 100644 --- a/app/src/main/res/layout/fragment_week_holder.xml +++ b/app/src/main/res/layout/fragment_week_holder.xml @@ -34,8 +34,7 @@ android:id="@+id/week_view_hours_holder" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingBottom="@dimen/weekly_view_row_height"/> + android:orientation="vertical"/> diff --git a/app/src/main/res/layout/weekly_view_hour_textview.xml b/app/src/main/res/layout/weekly_view_hour_textview.xml index 1678b5124..1022bc429 100644 --- a/app/src/main/res/layout/weekly_view_hour_textview.xml +++ b/app/src/main/res/layout/weekly_view_hour_textview.xml @@ -1,10 +1,11 @@ + android:textSize="@dimen/normal_text_size" />