set the full weekly view height dynamically in code
This commit is contained in:
parent
401670d429
commit
15bb35e427
|
@ -79,7 +79,12 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
|||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
this.inflater = inflater
|
||||
|
||||
mView = inflater.inflate(R.layout.fragment_week, container, false)
|
||||
mView = inflater.inflate(R.layout.fragment_week, container, false).apply {
|
||||
val fullHeight = context.config.weeklyViewItemHeight.toInt() * 24
|
||||
week_horizontal_grid_holder.layoutParams.height = fullHeight
|
||||
week_events_columns_holder.layoutParams.height = fullHeight
|
||||
}
|
||||
|
||||
scrollView = mView.week_events_scrollview
|
||||
scrollView.setOnScrollviewListener(object : MyScrollView.ScrollViewListener {
|
||||
override fun onScrollChanged(scrollView: MyScrollView, x: Int, y: Int, oldx: Int, oldy: Int) {
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
<com.simplemobiletools.calendar.pro.views.WeeklyViewGrid
|
||||
android:id="@+id/week_horizontal_grid_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/weekly_view_events_height"/>
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/week_events_columns_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/weekly_view_events_height"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
<dimen name="monthly_day_height">60dp</dimen>
|
||||
|
||||
<dimen name="weekly_view_row_height">90dp</dimen>
|
||||
<dimen name="weekly_view_row_minus_one_height">89dp</dimen>
|
||||
<dimen name="weekly_view_events_height">2160dp</dimen> <!-- weekly_view_row_height * 24 hours -->
|
||||
<dimen name="weekly_view_minimal_event_height">15dp</dimen>
|
||||
|
||||
<dimen name="meta_text_size">20sp</dimen>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<dimen name="monthly_day_height">40dp</dimen>
|
||||
|
||||
<dimen name="weekly_view_row_height">60dp</dimen>
|
||||
<dimen name="weekly_view_events_height">1440dp</dimen> <!-- weekly_view_row_height * 24 hours -->
|
||||
<dimen name="weekly_view_minimal_event_height">10dp</dimen>
|
||||
<dimen name="weekly_view_now_height">10dp</dimen>
|
||||
|
||||
|
|
Loading…
Reference in New Issue