mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-02-20 13:54:43 +01:00
[Dialog/Events] Make new event list dialog.
This commit is contained in:
parent
47d395de71
commit
d1265dc1f2
@ -84,24 +84,44 @@ class LessonFull(profileId: Int, id: Long) : Lesson(profileId, id) {
|
||||
})
|
||||
}
|
||||
|
||||
val changeSubjectName: String
|
||||
get() {
|
||||
val first = when (type) {
|
||||
TYPE_CHANGE, TYPE_CANCELLED, TYPE_SHIFTED_SOURCE -> oldSubjectName
|
||||
else -> subjectName
|
||||
}
|
||||
|
||||
val second = when (type) {
|
||||
TYPE_CHANGE -> subjectName
|
||||
else -> null
|
||||
}
|
||||
|
||||
return when (second) {
|
||||
null -> first ?: ""
|
||||
else -> "$first -> $second"
|
||||
}
|
||||
private fun changeText(actual: String?, old: String?): String {
|
||||
val first = when (type) {
|
||||
TYPE_CHANGE, TYPE_CANCELLED, TYPE_SHIFTED_SOURCE -> old
|
||||
else -> actual
|
||||
}
|
||||
|
||||
val second = when (type) {
|
||||
TYPE_CHANGE -> actual
|
||||
else -> null
|
||||
}
|
||||
|
||||
return when (second) {
|
||||
null -> first ?: ""
|
||||
first -> second
|
||||
else -> "$first -> $second"
|
||||
}
|
||||
}
|
||||
|
||||
val changeSubjectName: String
|
||||
get() = changeText(subjectName, oldSubjectName)
|
||||
|
||||
val isSubjectNameChanged: Boolean
|
||||
get() = type == TYPE_CHANGE && subjectName != oldSubjectName
|
||||
|
||||
|
||||
val changeTeacherName: String
|
||||
get() = changeText(teacherName, oldTeacherName)
|
||||
|
||||
val isTeacherNameChanged: Boolean
|
||||
get() = type == TYPE_CHANGE && teacherName != oldTeacherName
|
||||
|
||||
|
||||
val changeClassroom: String
|
||||
get() = changeText(classroom, oldClassroom)
|
||||
|
||||
val isClassroomChanged: Boolean
|
||||
get() = type == TYPE_CHANGE && classroom != oldClassroom
|
||||
|
||||
// metadata
|
||||
var seen: Boolean = false
|
||||
var notified: Boolean = false
|
||||
|
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (c) Kacper Ziubryniewicz 2019-11-30
|
||||
*/
|
||||
|
||||
package pl.szczodrzynski.edziennik.ui.dialogs.event
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.PorterDuff
|
||||
import android.graphics.PorterDuffColorFilter
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.MainActivity
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.events.Event
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.events.EventFull
|
||||
import pl.szczodrzynski.edziennik.databinding.RowDialogEventListItemBinding
|
||||
import pl.szczodrzynski.edziennik.utils.Utils.bs
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
|
||||
class EventListAdapter(
|
||||
val context: Context,
|
||||
val eventList: List<EventFull>,
|
||||
val parentDialog: EventListDialog
|
||||
) : RecyclerView.Adapter<EventListAdapter.ViewHolder>() {
|
||||
|
||||
private val app by lazy { context.applicationContext as App }
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val inflater = LayoutInflater.from(parent.context)
|
||||
val view: RowDialogEventListItemBinding = DataBindingUtil.inflate(inflater, R.layout.row_dialog_event_list_item, parent, false)
|
||||
return ViewHolder(view)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
val event = eventList[position]
|
||||
|
||||
holder.apply {
|
||||
b.eventListItemRoot.background.colorFilter = when (event.type) {
|
||||
Event.TYPE_HOMEWORK -> PorterDuffColorFilter((0xffffffff).toInt(), PorterDuff.Mode.CLEAR)
|
||||
else -> PorterDuffColorFilter(event.color, PorterDuff.Mode.MULTIPLY)
|
||||
}
|
||||
|
||||
b.eventListItemStartTime.text = if (event.startTime == null) app.getString(R.string.event_all_day) else event.startTime?.stringHM
|
||||
b.eventListItemTeamName.text = bs(event.teamName)
|
||||
b.eventListItemTeacherName.text = app.getString(R.string.concat_2_strings, bs(null, event.teacherFullName, "\n"), bs(event.subjectLongName))
|
||||
b.eventListItemAddedDate.text = Date.fromMillis(event.addedDate).formattedStringShort
|
||||
b.eventListItemType.text = event.typeName
|
||||
b.eventListItemTopic.text = event.topic
|
||||
b.eventListItemHomework.visibility = if (event.type == Event.TYPE_HOMEWORK) View.VISIBLE else View.GONE
|
||||
b.eventListItemSharedBy.text = app.getString(R.string.event_shared_by_format, if (event.sharedBy == "self") app.getString(R.string.event_shared_by_self) else event.sharedByName)
|
||||
b.eventListItemSharedBy.visibility = if (event.sharedByName.isNullOrBlank()) View.GONE else View.VISIBLE
|
||||
|
||||
b.eventListItemEdit.visibility = if (event.addedManually) View.VISIBLE else View.GONE
|
||||
b.eventListItemEdit.setOnClickListener {
|
||||
parentDialog.dismiss()
|
||||
|
||||
EventManualV2Dialog(
|
||||
context as MainActivity,
|
||||
event.profileId,
|
||||
editingEvent = event,
|
||||
onShowListener = parentDialog.onShowListener,
|
||||
onDismissListener = parentDialog.onDismissListener
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = eventList.size
|
||||
|
||||
class ViewHolder(val b: RowDialogEventListItemBinding) : RecyclerView.ViewHolder(b.root)
|
||||
}
|
@ -3,14 +3,15 @@ package pl.szczodrzynski.edziennik.ui.dialogs.event;
|
||||
import android.content.Context;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mikepenz.iconics.view.IconicsImageView;
|
||||
import com.mikepenz.iconics.view.IconicsTextView;
|
||||
|
||||
@ -20,21 +21,21 @@ import pl.szczodrzynski.edziennik.App;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.events.Event;
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.events.EventFull;
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date;
|
||||
import pl.szczodrzynski.edziennik.utils.Utils;
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date;
|
||||
|
||||
import static pl.szczodrzynski.edziennik.data.db.modules.events.Event.TYPE_HOMEWORK;
|
||||
import static pl.szczodrzynski.edziennik.utils.Utils.bs;
|
||||
import static pl.szczodrzynski.edziennik.utils.Utils.d;
|
||||
|
||||
public class EventListAdapter extends RecyclerView.Adapter<EventListAdapter.ViewHolder> {
|
||||
private static final String TAG = "EventListAdapter";
|
||||
public class EventListAdapterOld extends RecyclerView.Adapter<EventListAdapterOld.ViewHolder> {
|
||||
private static final String TAG = "EventListAdapterOld";
|
||||
private Context context;
|
||||
private List<EventFull> examList;
|
||||
private EventListDialog parentDialog;
|
||||
private EventListDialogOld parentDialog;
|
||||
|
||||
//getting the context and product list with constructor
|
||||
public EventListAdapter(Context mCtx, List<EventFull> examList, EventListDialog parentDialog) {
|
||||
public EventListAdapterOld(Context mCtx, List<EventFull> examList, EventListDialogOld parentDialog) {
|
||||
this.context = mCtx;
|
||||
this.examList = examList;
|
||||
this.parentDialog = parentDialog;
|
||||
@ -42,15 +43,15 @@ public class EventListAdapter extends RecyclerView.Adapter<EventListAdapter.View
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public EventListAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
public EventListAdapterOld.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
//inflating and returning our view holder
|
||||
LayoutInflater inflater = LayoutInflater.from(context);
|
||||
View view = inflater.inflate(R.layout.row_dialog_event_list_item, parent, false);
|
||||
return new EventListAdapter.ViewHolder(view);
|
||||
return new EventListAdapterOld.ViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull EventListAdapter.ViewHolder holder, int position) {
|
||||
public void onBindViewHolder(@NonNull EventListAdapterOld.ViewHolder holder, int position) {
|
||||
App app = (App) context.getApplicationContext();
|
||||
|
||||
EventFull event = examList.get(position);
|
@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Copyright (c) Kacper Ziubryniewicz 2019-11-30
|
||||
*/
|
||||
|
||||
package pl.szczodrzynski.edziennik.ui.dialogs.event
|
||||
|
||||
import android.graphics.Typeface
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import pl.szczodrzynski.edziennik.App
|
||||
import pl.szczodrzynski.edziennik.R
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.timetable.Lesson
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.timetable.LessonFull
|
||||
import pl.szczodrzynski.edziennik.databinding.DialogEventListBinding
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||
import pl.szczodrzynski.edziennik.utils.models.Time
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
|
||||
class EventListDialog(
|
||||
val activity: AppCompatActivity,
|
||||
val profileId: Int,
|
||||
val date: Date,
|
||||
val time: Time? = null,
|
||||
val onShowListener: ((tag: String) -> Unit)? = null,
|
||||
val onDismissListener: ((tag: String) -> Unit)? = null
|
||||
) : CoroutineScope {
|
||||
|
||||
companion object {
|
||||
const val TAG = "EventListDialog"
|
||||
}
|
||||
|
||||
private lateinit var job: Job
|
||||
override val coroutineContext: CoroutineContext
|
||||
get() = job + Dispatchers.Main
|
||||
|
||||
private val app by lazy { activity.application as App }
|
||||
private lateinit var b: DialogEventListBinding
|
||||
private lateinit var dialog: AlertDialog
|
||||
|
||||
private var lesson: LessonFull? = null
|
||||
|
||||
init {
|
||||
run {
|
||||
if (activity.isFinishing)
|
||||
return@run
|
||||
job = Job()
|
||||
onShowListener?.invoke(TAG)
|
||||
b = DialogEventListBinding.inflate(activity.layoutInflater)
|
||||
|
||||
dialog = MaterialAlertDialogBuilder(activity)
|
||||
.setTitle(date.formattedString + (time?.let { ", " + it.stringHM } ?: ""))
|
||||
.setView(b.root)
|
||||
.setPositiveButton(R.string.close) { dialog, _ -> dialog.dismiss() }
|
||||
.setNeutralButton(R.string.add) { _, _ ->
|
||||
EventManualV2Dialog(
|
||||
activity,
|
||||
lesson?.profileId ?: profileId,
|
||||
lesson,
|
||||
onShowListener = onShowListener,
|
||||
onDismissListener = onDismissListener
|
||||
)
|
||||
}
|
||||
.setOnDismissListener {
|
||||
onDismissListener?.invoke(TAG)
|
||||
}
|
||||
.show()
|
||||
|
||||
app.db.timetableDao().getForDate(profileId, date).observe(activity, Observer { lessons ->
|
||||
lesson = lessons.firstOrNull { it.displayStartTime == time }
|
||||
update()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fun dismiss() = dialog.dismiss()
|
||||
|
||||
private fun update() {
|
||||
b.eventListLessonDetails.visibility = if (lesson == null) View.GONE else View.VISIBLE
|
||||
|
||||
if (lesson != null) {
|
||||
dialog.setTitle(if (time == null) date.formattedString else (lesson?.displaySubjectName
|
||||
?: date.formattedString) + ", " + time.stringHM)
|
||||
|
||||
b.eventListLessonDate.text = app.getString(R.string.date_time_format, date.formattedString, "")
|
||||
|
||||
if (lesson?.type == Lesson.TYPE_CANCELLED) {
|
||||
b.eventListLessonChange.text = app.getString(R.string.lesson_cancelled)
|
||||
b.eventListLessonChange.setTypeface(null, Typeface.BOLD_ITALIC)
|
||||
b.eventListTeacher.visibility = View.GONE
|
||||
b.eventListClassroom.visibility = View.GONE
|
||||
} else {
|
||||
b.eventListLessonChange.text = lesson?.changeSubjectName
|
||||
b.eventListLessonChange.setTypeface(null, Typeface.ITALIC)
|
||||
b.eventListLessonChange.visibility = if (lesson?.isSubjectNameChanged == true) View.VISIBLE else View.GONE
|
||||
|
||||
b.eventListTeacher.text = lesson?.changeTeacherName
|
||||
b.eventListTeacher.setTypeface(null, if (lesson?.isTeacherNameChanged == true) Typeface.ITALIC else Typeface.NORMAL)
|
||||
|
||||
b.eventListClassroom.text = lesson?.changeClassroom
|
||||
b.eventListClassroom.setTypeface(null, if (lesson?.isClassroomChanged == true) Typeface.ITALIC else Typeface.NORMAL)
|
||||
}
|
||||
}
|
||||
|
||||
b.eventListView.apply {
|
||||
setHasFixedSize(false)
|
||||
isNestedScrollingEnabled = true
|
||||
layoutManager = LinearLayoutManager(context)
|
||||
}
|
||||
|
||||
app.db.eventDao().getAllByDateTime(profileId, date, time).observe(activity, Observer { events ->
|
||||
if (events.isNullOrEmpty()) {
|
||||
b.eventListView.visibility = View.GONE
|
||||
b.textNoEvents.visibility = View.VISIBLE
|
||||
} else {
|
||||
val adapter = EventListAdapter(activity, events, this)
|
||||
b.eventListView.adapter = adapter
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
@ -8,14 +8,14 @@ import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.afollestad.materialdialogs.MaterialDialog;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.afollestad.materialdialogs.MaterialDialog;
|
||||
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.lessons.LessonChange;
|
||||
@ -26,16 +26,16 @@ import pl.szczodrzynski.edziennik.ui.dialogs.teacherabsence.TeacherAbsenceDialog
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date;
|
||||
import pl.szczodrzynski.edziennik.utils.models.Time;
|
||||
|
||||
public class EventListDialog {
|
||||
public class EventListDialogOld {
|
||||
private App app;
|
||||
private Context context;
|
||||
private int profileId;
|
||||
|
||||
public EventListDialog(Context context) {
|
||||
public EventListDialogOld(Context context) {
|
||||
this.context = context;
|
||||
this.profileId = App.profileId;
|
||||
}
|
||||
public EventListDialog(Context context, int profileId) {
|
||||
public EventListDialogOld(Context context, int profileId) {
|
||||
this.context = context;
|
||||
this.profileId = profileId;
|
||||
}
|
||||
@ -47,7 +47,7 @@ public class EventListDialog {
|
||||
public boolean callDismissListener = true;
|
||||
private LessonFull lesson;
|
||||
|
||||
public EventListDialog withDismissListener(DialogInterface.OnDismissListener dismissListener) {
|
||||
public EventListDialogOld withDismissListener(DialogInterface.OnDismissListener dismissListener) {
|
||||
this.dismissListener = dismissListener;
|
||||
return this;
|
||||
}
|
||||
@ -222,7 +222,7 @@ public class EventListDialog {
|
||||
dialogView.findViewById(R.id.textNoEvents).setVisibility(View.VISIBLE);
|
||||
}
|
||||
else {
|
||||
EventListAdapter adapter = new EventListAdapter(context, events, this);
|
||||
EventListAdapterOld adapter = new EventListAdapterOld(context, events, this);
|
||||
examsView.setAdapter(adapter);
|
||||
}
|
||||
});
|
@ -194,6 +194,8 @@ class EventManualV2Dialog(
|
||||
b.teamDropdown.select(it.teamId)
|
||||
b.subjectDropdown.select(it.subjectId)
|
||||
b.teacherDropdown.select(it.teacherId)
|
||||
b.topic.setText(it.topic)
|
||||
b.shareSwitch.isChecked = true
|
||||
b.typeDropdown.select(it.type)?.let { item ->
|
||||
customColor = (item.tag as EventType).color
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ public class AgendaFragment extends Fragment {
|
||||
int scrolledDate = Date.fromCalendar(calendar).getValue();
|
||||
if (unreadEventDates.contains(scrolledDate)) {
|
||||
AsyncTask.execute(() -> app.db.eventDao().setSeenByDate(App.profileId, Date.fromYmd(intToStr(scrolledDate)), true));
|
||||
unreadEventDates.remove(unreadEventDates.indexOf(scrolledDate));
|
||||
unreadEventDates.remove((Integer) scrolledDate);
|
||||
}
|
||||
}
|
||||
|
||||
@ -319,9 +319,23 @@ public class AgendaFragment extends Fragment {
|
||||
public void onEventSelected(CalendarEvent calendarEvent) {
|
||||
if (calendarEvent instanceof BaseCalendarEvent) {
|
||||
if (!calendarEvent.isPlaceholder() && !calendarEvent.isAllDay()) {
|
||||
new EventListDialog(activity).show(app, Date.fromCalendar(calendarEvent.getInstanceDay()), Time.fromMillis(calendarEvent.getStartTime().getTimeInMillis()), true);
|
||||
// new EventListDialogOld(activity).show(app, Date.fromCalendar(calendarEvent.getInstanceDay()), Time.fromMillis(calendarEvent.getStartTime().getTimeInMillis()), true);
|
||||
new EventListDialog(
|
||||
activity,
|
||||
App.profileId,
|
||||
Date.fromCalendar(calendarEvent.getInstanceDay()),
|
||||
Time.fromMillis(calendarEvent.getStartTime().getTimeInMillis()),
|
||||
null,
|
||||
null);
|
||||
} else {
|
||||
new EventListDialog(activity).show(app, Date.fromCalendar(calendarEvent.getInstanceDay()));
|
||||
// new EventListDialogOld(activity).show(app, Date.fromCalendar(calendarEvent.getInstanceDay()));
|
||||
new EventListDialog(
|
||||
activity,
|
||||
App.profileId,
|
||||
Date.fromCalendar(calendarEvent.getInstanceDay()),
|
||||
null,
|
||||
null,
|
||||
null);
|
||||
}
|
||||
} else if (calendarEvent instanceof LessonChangeEvent) {
|
||||
new LessonChangeDialog(activity).show(app, Date.fromCalendar(calendarEvent.getInstanceDay()));
|
||||
@ -403,10 +417,18 @@ public class AgendaFragment extends Fragment {
|
||||
int scrolledDate = dayDate.getValue();
|
||||
if (unreadEventDates.contains(scrolledDate)) {
|
||||
AsyncTask.execute(() -> app.db.eventDao().setSeenByDate(App.profileId, Date.fromYmd(intToStr(scrolledDate)), true));
|
||||
unreadEventDates.remove(unreadEventDates.indexOf(scrolledDate));
|
||||
unreadEventDates.remove((Integer) scrolledDate);
|
||||
}
|
||||
|
||||
new EventListDialog(getContext()).show(app, dayDate);
|
||||
// new EventListDialogOld(getContext()).show(app, dayDate);
|
||||
new EventListDialog(
|
||||
activity,
|
||||
App.profileId,
|
||||
dayDate,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
});
|
||||
b_calendar.progressBar.setVisibility(View.GONE);
|
||||
});
|
||||
|
@ -224,8 +224,8 @@ class HomeTimetableCard(
|
||||
|
||||
private val LessonFull?.subjectSpannable: CharSequence
|
||||
get() = if (this == null) "?" else when {
|
||||
isCancelled -> displaySubjectName.asStrikethroughSpannable()
|
||||
isChange -> displaySubjectName.asItalicSpannable()
|
||||
isCancelled -> displaySubjectName?.asStrikethroughSpannable() ?: "?"
|
||||
isChange -> displaySubjectName?.asItalicSpannable() ?: "?"
|
||||
else -> displaySubjectName ?: "?"
|
||||
}
|
||||
|
||||
|
@ -5,16 +5,17 @@ import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.AsyncTask;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.text.Html;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mikepenz.iconics.IconicsColor;
|
||||
import com.mikepenz.iconics.IconicsDrawable;
|
||||
import com.mikepenz.iconics.IconicsSize;
|
||||
@ -27,11 +28,11 @@ import pl.szczodrzynski.edziennik.R;
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.events.EventFull;
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.lessons.LessonChange;
|
||||
import pl.szczodrzynski.edziennik.data.db.modules.lessons.LessonFull;
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventListDialog;
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date;
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventListDialogOld;
|
||||
import pl.szczodrzynski.edziennik.utils.SpannableHtmlTagHandler;
|
||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||
import pl.szczodrzynski.edziennik.utils.Utils;
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date;
|
||||
|
||||
import static pl.szczodrzynski.edziennik.data.db.modules.events.Event.TYPE_HOMEWORK;
|
||||
|
||||
@ -159,7 +160,7 @@ public class TimetableAdapter extends RecyclerView.Adapter<TimetableAdapter.View
|
||||
}
|
||||
}
|
||||
|
||||
holder.timetableItemCard.setOnClickListener(v -> new EventListDialog(context).show(app, lessonDate, lesson.startTime));
|
||||
holder.timetableItemCard.setOnClickListener(v -> new EventListDialogOld(context).show(app, lessonDate, lesson.startTime));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -11,13 +11,13 @@ import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import pl.szczodrzynski.edziennik.App;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
import pl.szczodrzynski.edziennik.MainActivity;
|
||||
import pl.szczodrzynski.edziennik.R;
|
||||
import pl.szczodrzynski.edziennik.WidgetTimetable;
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventListDialog;
|
||||
import pl.szczodrzynski.edziennik.ui.dialogs.event.EventListDialogOld;
|
||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||
import pl.szczodrzynski.edziennik.utils.models.Date;
|
||||
import pl.szczodrzynski.edziennik.utils.models.Time;
|
||||
import pl.szczodrzynski.edziennik.utils.Themes;
|
||||
|
||||
import static android.content.Intent.FLAG_ACTIVITY_REORDER_TO_FRONT;
|
||||
|
||||
@ -52,7 +52,7 @@ public class LessonDetailsActivity extends AppCompatActivity {
|
||||
Time startTime = Time.fromHms(extras.getString("startTime", "20181109"));
|
||||
//Time endTime = Time.fromHms(extras.getString("endTime", "20181109"));
|
||||
|
||||
new EventListDialog(this, profileId)
|
||||
new EventListDialogOld(this, profileId)
|
||||
.withDismissListener((dialog -> {
|
||||
finish();
|
||||
Intent intent = new Intent(app.getContext(), WidgetTimetable.class);
|
||||
|
@ -1,99 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/detailsLayout"
|
||||
<layout>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/lessonChangeContainer"
|
||||
layout="@layout/row_lesson_change_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<include
|
||||
android:id="@+id/teacherAbsenceContainer"
|
||||
layout="@layout/row_teacher_absence_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/eventListLessonDetails"
|
||||
android:id="@+id/detailsLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListLessonDate"
|
||||
<include
|
||||
android:id="@+id/lessonChangeContainer"
|
||||
layout="@layout/row_lesson_change_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="21 października 2018, 9:05" />
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<include
|
||||
android:id="@+id/teacherAbsenceContainer"
|
||||
layout="@layout/row_teacher_absence_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/eventListLessonDetails"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListLessonDate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="21 października 2018, 9:05" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListLessonChange"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="italic"
|
||||
tools:text="Lekcja odwołana" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListTeacher"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="italic"
|
||||
tools:text="Jan Kowalski -> John Doe" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListClassroom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="italic"
|
||||
tools:text="029 informatyczna -> 016 językowa" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListLessonChange"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/textNoEvents"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="32dp"
|
||||
android:text="@string/dialog_event_list_no_data"
|
||||
android:textStyle="italic"
|
||||
tools:text="Lekcja odwołana" />
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListTeacher"
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/eventListView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="italic"
|
||||
tools:text="Jan Kowalski -> John Doe" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListClassroom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="italic"
|
||||
tools:text="029 informatyczna -> 016 językowa" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="24dp"
|
||||
android:paddingBottom="8dp"
|
||||
tools:listitem="@layout/row_dialog_event_list_item" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textNoEvents"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_margin="32dp"
|
||||
android:text="@string/dialog_event_list_no_data"
|
||||
android:textStyle="italic"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/eventListView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="24dp"
|
||||
android:paddingBottom="8dp"
|
||||
tools:listitem="@layout/row_dialog_event_list_item" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</layout>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:agendaCalendar="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:agendaCalendar="http://schemas.android.com/apk/res-auto">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -33,8 +32,5 @@
|
||||
agendaCalendar:layout_constraintTop_toTopOf="parent"
|
||||
agendaCalendar:layout_constraintVertical_bias="1.0" >
|
||||
</com.github.tibolte.agendacalendarview.AgendaCalendarView>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
</layout>
|
||||
|
@ -1,166 +1,165 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
<layout>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="4dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/eventListItemRoot"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_rounded_8dp_outline"
|
||||
android:padding="8dp">
|
||||
android:layout_margin="5dp"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/eventListItemRoot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:background="@drawable/bg_rounded_8dp_outline"
|
||||
android:padding="8dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsTextView
|
||||
android:id="@+id/eventListItemClock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="{cmd-clock}"
|
||||
tools:text=" "
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeamName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemStartTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/eventListItemClock"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeamName"
|
||||
tools:text="startTime" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemAddedDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView9"
|
||||
tools:text="TextView" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView9"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/event_added_time"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemClock" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemTeamName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemTeacherName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintEnd_toStartOf="@+id/eventListItemEdit"
|
||||
app:layout_constraintStart_toEndOf="@+id/eventListItemHomework"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView\nTextView" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/eventListItemEdit"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:visibility="visible"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-pencil"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@android:drawable/ic_partial_secure" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeacherName"
|
||||
tools:text="zadanie domowe" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemTopic"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:textAppearance="@style/NavView.TextView.Medium"
|
||||
android:textIsSelectable="true"
|
||||
android:autoLink="all"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemType"
|
||||
tools:text="TextView" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsTextView
|
||||
android:id="@+id/eventListItemClock"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/eventListItemSharedBy"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="{cmd-clock}"
|
||||
tools:text=" "
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeamName" />
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
tools:text="{cmd-share-variant} przez Jan Kowalski"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemTopic" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemStartTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/eventListItemClock"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeamName"
|
||||
tools:text="startTime" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemAddedDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView9"
|
||||
tools:text="TextView" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView9"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/event_added_time"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemClock" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemTeamName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView" />
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/eventListItemHomework"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:visibility="gone"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-home"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/eventListItemTeacherName"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
|
||||
app:layout_constraintTop_toTopOf="@+id/eventListItemTeacherName"
|
||||
tools:src="@android:drawable/star_big_on" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemTeacherName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/NavView.TextView.Helper"
|
||||
app:layout_constraintEnd_toStartOf="@+id/eventListItemEdit"
|
||||
app:layout_constraintStart_toEndOf="@+id/eventListItemHomework"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="TextView\nTextView" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/eventListItemEdit"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:visibility="visible"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-pencil"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:srcCompat="@android:drawable/ic_partial_secure" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemTeacherName"
|
||||
tools:text="zadanie domowe" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/eventListItemTopic"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:textAppearance="@style/NavView.TextView.Medium"
|
||||
android:textIsSelectable="true"
|
||||
android:autoLink="all"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemType"
|
||||
tools:text="TextView" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsTextView
|
||||
android:id="@+id/eventListItemSharedBy"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
tools:text="{cmd-share-variant} przez Jan Kowalski"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eventListItemTopic" />
|
||||
|
||||
<com.mikepenz.iconics.view.IconicsImageView
|
||||
android:id="@+id/eventListItemHomework"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:visibility="gone"
|
||||
app:iiv_color="?android:textColorSecondary"
|
||||
app:iiv_icon="cmd-home"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/eventListItemTeacherName"
|
||||
app:layout_constraintStart_toEndOf="@+id/constraintLayout"
|
||||
app:layout_constraintTop_toTopOf="@+id/eventListItemTeacherName"
|
||||
tools:src="@android:drawable/star_big_on" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
@ -1056,4 +1056,5 @@
|
||||
<string name="home_timetable_lesson_not_started">Za chwilę: %s</string>
|
||||
<string name="home_timetable_lessons_remaining">Pozostało lekcji: %d - do %s</string>
|
||||
<string name="grade_subject_format">z %s</string>
|
||||
<string name="concat_2_strings" translatable="false">%s%s</string>
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user