mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
add the vertical grid programmatically
This commit is contained in:
@ -75,6 +75,8 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(0..6).map { (LayoutInflater.from(context).inflate(R.layout.stroke_width_divider, mView.week_vertical_grid_holder, true)) }
|
||||||
|
|
||||||
mCalendar = WeeklyCalendarImpl(this, context)
|
mCalendar = WeeklyCalendarImpl(this, context)
|
||||||
wasFragmentInit = true
|
wasFragmentInit = true
|
||||||
return mView
|
return mView
|
||||||
@ -232,7 +234,6 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
|||||||
val daysCnt = Days.daysBetween(Formatter.getDateTimeFromTS(minTS), Formatter.getDateTimeFromTS(maxTS)).days
|
val daysCnt = Days.daysBetween(Formatter.getDateTimeFromTS(minTS), Formatter.getDateTimeFromTS(maxTS)).days
|
||||||
|
|
||||||
activity.runOnUiThread {
|
activity.runOnUiThread {
|
||||||
val dayColumnWidth = getColumnWithId(1).width
|
|
||||||
mView.week_all_day_holder.addView(this)
|
mView.week_all_day_holder.addView(this)
|
||||||
(layoutParams as LinearLayout.LayoutParams).apply {
|
(layoutParams as LinearLayout.LayoutParams).apply {
|
||||||
topMargin = mRes.getDimension(R.dimen.tiny_margin).toInt()
|
topMargin = mRes.getDimension(R.dimen.tiny_margin).toInt()
|
||||||
|
@ -81,51 +81,10 @@
|
|||||||
</com.simplemobiletools.calendar.views.MyScrollView>
|
</com.simplemobiletools.calendar.views.MyScrollView>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/week_vertical_grid_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal"/>
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/stroke_right"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/stroke_right"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/stroke_right"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/stroke_right"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/stroke_right"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/stroke_right"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/stroke_right"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/week_top_holder"
|
android:id="@+id/week_top_holder"
|
||||||
|
7
app/src/main/res/layout/stroke_width_divider.xml
Normal file
7
app/src/main/res/layout/stroke_width_divider.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ImageView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/stroke_right"/>
|
Reference in New Issue
Block a user