diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/grade/GradeDetailsDialog.java b/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/grade/GradeDetailsDialog.java index 0c05be7a..04844644 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/grade/GradeDetailsDialog.java +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/dialogs/grade/GradeDetailsDialog.java @@ -105,7 +105,7 @@ public class GradeDetailsDialog { b.setDevMode(App.Companion.getDevMode()); - b.gradeName.setTextColor(ColorUtils.calculateLuminance(gradeColor) > 0.25 ? 0xff000000 : 0xffffffff); + b.gradeName.setTextColor(ColorUtils.calculateLuminance(gradeColor) > 0.3 ? 0xff000000 : 0xffffffff); b.gradeName.getBackground().setColorFilter(new PorterDuffColorFilter(gradeColor, PorterDuff.Mode.MULTIPLY)); AsyncTask.execute(() -> { diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/attendance/AttendanceFragment.java b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/attendance/AttendanceFragment.java index 4af8e2b7..18a6fe7d 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/attendance/AttendanceFragment.java +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/attendance/AttendanceFragment.java @@ -36,6 +36,7 @@ import pl.szczodrzynski.edziennik.R; import pl.szczodrzynski.edziennik.data.db.entity.Subject; import pl.szczodrzynski.edziennik.data.db.full.AttendanceFull; import pl.szczodrzynski.edziennik.databinding.FragmentAttendanceBinding; +import pl.szczodrzynski.edziennik.utils.SimpleDividerItemDecoration; import pl.szczodrzynski.edziennik.utils.Themes; import pl.szczodrzynski.navlib.bottomsheet.items.BottomSheetPrimaryItem; @@ -178,6 +179,7 @@ public class AttendanceFragment extends Fragment { b.attendanceView.setHasFixedSize(true); b.attendanceView.setLayoutManager(linearLayoutManager); + b.attendanceView.addItemDecoration(new SimpleDividerItemDecoration(getContext())); App.db.attendanceDao().getAll(App.Companion.getProfileId()).observe(this, attendance -> { if (app == null || activity == null || b == null || !isAdded()) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/grades/GradesListAdapter.java b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/grades/GradesListAdapter.java index debe586c..a3035353 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/grades/GradesListAdapter.java +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/grades/GradesListAdapter.java @@ -3,7 +3,6 @@ package pl.szczodrzynski.edziennik.ui.modules.grades; import android.content.Context; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; -import android.graphics.Typeface; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -65,8 +64,8 @@ public class GradesListAdapter extends RecyclerView.Adapter 0.25 ? 0xff000000 : 0xffffffff); + //holder.gradesListName.setTypeface(null, Typeface.BOLD); + holder.gradesListName.setTextColor(ColorUtils.calculateLuminance(gradeColor) > 0.3 ? 0xff000000 : 0xffffffff); holder.gradesListName.getBackground().setColorFilter(new PorterDuffColorFilter(gradeColor, PorterDuff.Mode.MULTIPLY)); if (grade.description.trim().isEmpty()) { diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/messages/MessagesListFragment.java b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/messages/MessagesListFragment.java index a7237f19..bfbf749d 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/messages/MessagesListFragment.java +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/messages/MessagesListFragment.java @@ -14,7 +14,6 @@ import androidx.annotation.Nullable; import androidx.databinding.DataBindingUtil; import androidx.fragment.app.Fragment; import androidx.interpolator.view.animation.FastOutSlowInInterpolator; -import androidx.recyclerview.widget.DividerItemDecoration; import androidx.recyclerview.widget.LinearLayoutManager; import java.util.ArrayList; @@ -27,6 +26,7 @@ import pl.szczodrzynski.edziennik.data.db.entity.Message; import pl.szczodrzynski.edziennik.data.db.full.MessageFull; import pl.szczodrzynski.edziennik.data.db.full.MessageRecipientFull; import pl.szczodrzynski.edziennik.databinding.MessagesListBinding; +import pl.szczodrzynski.edziennik.utils.SimpleDividerItemDecoration; import pl.szczodrzynski.edziennik.utils.Themes; import static androidx.recyclerview.widget.RecyclerView.NO_POSITION; @@ -164,7 +164,7 @@ public class MessagesListFragment extends Fragment { viewParent = (ViewGroup) view.getParent(); b.emailList.setLayoutManager(new LinearLayoutManager(view.getContext())); - b.emailList.addItemDecoration(new DividerItemDecoration(view.getContext(), LinearLayoutManager.VERTICAL)); + b.emailList.addItemDecoration(new SimpleDividerItemDecoration(view.getContext())); b.emailList.setAdapter(messagesAdapter); if (messageType == Message.TYPE_RECEIVED) { diff --git a/app/src/main/res/layout/dialog_grade_details.xml b/app/src/main/res/layout/dialog_grade_details.xml index 1cae5c1b..3a3d6173 100644 --- a/app/src/main/res/layout/dialog_grade_details.xml +++ b/app/src/main/res/layout/dialog_grade_details.xml @@ -45,14 +45,16 @@ android:layout_width="72dp" android:layout_height="72dp" android:background="@drawable/bg_rounded_16dp" - android:fontFamily="sans-serif-medium" + android:fontFamily="serif-monospace" android:gravity="center" + android:padding="8dp" android:text="@{grade.name}" android:textIsSelectable="true" android:textSize="36sp" - app:autoSizeMaxTextSize="36sp" + android:textStyle="bold" + app:autoSizeMaxTextSize="56sp" app:autoSizeTextType="uniform" - tools:background="#ff0000" + tools:background="#ff4caf50" tools:text="1-" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/row_grades_list_item.xml b/app/src/main/res/layout/row_grades_list_item.xml index 9b8a6f0f..70e06b1d 100644 --- a/app/src/main/res/layout/row_grades_list_item.xml +++ b/app/src/main/res/layout/row_grades_list_item.xml @@ -1,10 +1,11 @@ - @@ -15,86 +16,89 @@ android:layout_marginStart="8dp" android:layout_marginLeft="8dp" android:background="@drawable/bg_rounded_8dp" - android:fontFamily="sans-serif-light" + android:fontFamily="serif-monospace" android:gravity="center" + android:padding="2dp" android:textSize="24sp" - app:autoSizeMaxTextSize="24sp" - app:autoSizeTextType="uniform" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - tools:background="#4caf50" - tools:text="5+" /> - - - - - - + app:autoSizeMaxTextSize="32sp" + app:autoSizeTextType="uniform" + tools:background="#4caf50" + tools:text="NB" /> - + android:orientation="vertical"> - - \ No newline at end of file + + + + + + + + + + + + + + + + +