forked from github/wulkanowy-mirror
Improve date navigation (#519)
This commit is contained in:
parent
d4b73fb73e
commit
ed7996299e
@ -158,7 +158,7 @@ class AttendancePresenter @Inject constructor(
|
||||
view?.apply {
|
||||
showPreButton(!currentDate.minusDays(1).isHolidays)
|
||||
showNextButton(!currentDate.plusDays(1).isHolidays)
|
||||
updateNavigationDay(currentDate.toFormattedString("EEEE\ndd.MM.YYYY").capitalize())
|
||||
updateNavigationDay(currentDate.toFormattedString("EEEE, dd.MM").capitalize())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ class TimetablePresenter @Inject constructor(
|
||||
view?.apply {
|
||||
showPreButton(!currentDate.minusDays(1).isHolidays)
|
||||
showNextButton(!currentDate.plusDays(1).isHolidays)
|
||||
updateNavigationDay(currentDate.toFormattedString("EEEE\ndd.MM.YYYY").capitalize())
|
||||
updateNavigationDay(currentDate.toFormattedString("EEEE, dd.MM").capitalize())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ class CompletedLessonsPresenter @Inject constructor(
|
||||
view?.apply {
|
||||
showPreButton(!currentDate.minusDays(1).isHolidays)
|
||||
showNextButton(!currentDate.plusDays(1).isHolidays)
|
||||
updateNavigationDay(currentDate.toFormattedString("EEEE\ndd.MM.YYYY").capitalize())
|
||||
updateNavigationDay(currentDate.toFormattedString("EEEE, dd.MM").capitalize())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
5
app/src/main/res/drawable/ic_chevron_left.xml
Normal file
5
app/src/main/res/drawable/ic_chevron_left.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M15.41,7.41L14,6l-6,6 6,6 1.41,-1.41L10.83,12z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/ic_chevron_right.xml
Normal file
5
app/src/main/res/drawable/ic_chevron_right.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"/>
|
||||
</vector>
|
@ -58,40 +58,49 @@
|
||||
<io.github.wulkanowy.ui.widgets.MaterialLinearLayout
|
||||
android:id="@+id/attendanceNavContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<ImageButton
|
||||
android:id="@+id/attendancePreviousButton"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start|center_vertical"
|
||||
android:insetLeft="8dp"
|
||||
android:text="@string/all_prev"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:scaleType="fitStart"
|
||||
android:tint="?colorPrimary"
|
||||
app:srcCompat="@drawable/ic_chevron_left"
|
||||
android:contentDescription="@string/all_prev"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/attendanceNavDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:fontFamily="sans-serif"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name" />
|
||||
android:text="@string/app_name"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<ImageButton
|
||||
android:id="@+id/attendanceNextButton"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_weight="1"
|
||||
android:drawablePadding="4dp"
|
||||
android:gravity="end|center_vertical"
|
||||
android:insetRight="8dp"
|
||||
android:text="@string/all_next"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:scaleType="fitEnd"
|
||||
android:tint="?colorPrimary"
|
||||
app:srcCompat="@drawable/ic_chevron_right"
|
||||
android:contentDescription="@string/all_next" />
|
||||
</io.github.wulkanowy.ui.widgets.MaterialLinearLayout>
|
||||
</FrameLayout>
|
||||
|
@ -58,39 +58,49 @@
|
||||
<io.github.wulkanowy.ui.widgets.MaterialLinearLayout
|
||||
android:id="@+id/examNavContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<ImageButton
|
||||
android:id="@+id/examPreviousButton"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start|center_vertical"
|
||||
android:insetLeft="8dp"
|
||||
android:text="@string/all_prev"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:scaleType="fitStart"
|
||||
android:tint="?colorPrimary"
|
||||
app:srcCompat="@drawable/ic_chevron_left"
|
||||
android:contentDescription="@string/all_prev"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/examNavDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:fontFamily="sans-serif"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name" />
|
||||
android:text="@string/app_name"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<ImageButton
|
||||
android:id="@+id/examNextButton"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end|center_vertical"
|
||||
android:insetLeft="8dp"
|
||||
android:text="@string/all_next"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:scaleType="fitEnd"
|
||||
android:tint="?colorPrimary"
|
||||
app:srcCompat="@drawable/ic_chevron_right"
|
||||
android:contentDescription="@string/all_next" />
|
||||
</io.github.wulkanowy.ui.widgets.MaterialLinearLayout>
|
||||
</FrameLayout>
|
||||
|
@ -58,39 +58,49 @@
|
||||
<io.github.wulkanowy.ui.widgets.MaterialLinearLayout
|
||||
android:id="@+id/homeworkNavContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<ImageButton
|
||||
android:id="@+id/homeworkPreviousButton"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start|center_vertical"
|
||||
android:insetLeft="8dp"
|
||||
android:text="@string/all_prev"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:scaleType="fitStart"
|
||||
android:tint="?colorPrimary"
|
||||
app:srcCompat="@drawable/ic_chevron_left"
|
||||
android:contentDescription="@string/all_prev"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/homeworkNavDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:fontFamily="sans-serif"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name" />
|
||||
android:text="@string/app_name"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<ImageButton
|
||||
android:id="@+id/homeworkNextButton"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end|center_vertical"
|
||||
android:insetRight="8dp"
|
||||
android:text="@string/all_next"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:scaleType="fitEnd"
|
||||
android:tint="?colorPrimary"
|
||||
app:srcCompat="@drawable/ic_chevron_right"
|
||||
android:contentDescription="@string/all_next" />
|
||||
</io.github.wulkanowy.ui.widgets.MaterialLinearLayout>
|
||||
</FrameLayout>
|
||||
|
@ -58,39 +58,48 @@
|
||||
<io.github.wulkanowy.ui.widgets.MaterialLinearLayout
|
||||
android:id="@+id/timetableNavContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<ImageButton
|
||||
android:id="@+id/timetablePreviousButton"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start|center_vertical"
|
||||
android:insetLeft="8dp"
|
||||
android:text="@string/all_prev"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:scaleType="fitStart"
|
||||
android:tint="?colorPrimary"
|
||||
app:srcCompat="@drawable/ic_chevron_left"
|
||||
android:contentDescription="@string/all_prev"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timetableNavDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:fontFamily="sans-serif"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name" />
|
||||
android:text="@string/app_name"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<ImageButton
|
||||
android:id="@+id/timetableNextButton"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end|center_vertical"
|
||||
android:insetRight="8dp"
|
||||
android:text="@string/all_next"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:scaleType="fitEnd"
|
||||
android:tint="?colorPrimary"
|
||||
app:srcCompat="@drawable/ic_chevron_right"
|
||||
android:contentDescription="@string/all_next" />
|
||||
</io.github.wulkanowy.ui.widgets.MaterialLinearLayout>
|
||||
</FrameLayout>
|
||||
|
@ -62,39 +62,49 @@
|
||||
<io.github.wulkanowy.ui.widgets.MaterialLinearLayout
|
||||
android:id="@+id/completedLessonsNavContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<ImageButton
|
||||
android:id="@+id/completedLessonsPreviousButton"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start|center_vertical"
|
||||
android:insetLeft="8dp"
|
||||
android:text="@string/all_prev"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:scaleType="fitStart"
|
||||
android:tint="?colorPrimary"
|
||||
app:srcCompat="@drawable/ic_chevron_left"
|
||||
android:contentDescription="@string/all_prev"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/completedLessonsNavDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:fontFamily="sans-serif"
|
||||
android:gravity="center"
|
||||
android:text="@string/app_name" />
|
||||
android:text="@string/app_name"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<ImageButton
|
||||
android:id="@+id/completedLessonsNextButton"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end|center_vertical"
|
||||
android:insetRight="8dp"
|
||||
android:text="@string/all_next"
|
||||
android:textColor="?android:textColorPrimary" />
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:scaleType="fitEnd"
|
||||
android:tint="?colorPrimary"
|
||||
app:srcCompat="@drawable/ic_chevron_right"
|
||||
android:contentDescription="@string/all_next" />
|
||||
</io.github.wulkanowy.ui.widgets.MaterialLinearLayout>
|
||||
</FrameLayout>
|
||||
|
Loading…
x
Reference in New Issue
Block a user