Add notes (#179)
This commit is contained in:

committed by
Rafał Borcz

parent
240e61df0e
commit
cb7e70471b
BIN
app/src/main/res/drawable-hdpi/ic_stat_notify_note.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_stat_notify_note.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 414 B |
BIN
app/src/main/res/drawable-mdpi/ic_stat_notify_note.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_stat_notify_note.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 302 B |
BIN
app/src/main/res/drawable-xhdpi/ic_stat_notify_note.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_stat_notify_note.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 554 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_stat_notify_note.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_stat_notify_note.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 801 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_stat_notify_note.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_stat_notify_note.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
10
app/src/main/res/drawable/ic_menu_main_note_24dp.xml
Normal file
10
app/src/main/res/drawable/ic_menu_main_note_24dp.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<!--https://materialdesignicons.com/icon/trophy-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M20.2,2H19.5H18C17.1,2 16,3 16,4H8C8,3 6.9,2 6,2H4.5H3.8H2V11C2,12 3,13 4,13H6.2C6.6,15 7.9,16.7 11,17V19.1C8.8,19.3 8,20.4 8,21.7V22H16V21.7C16,20.4 15.2,19.3 13,19.1V17C16.1,16.7 17.4,15 17.8,13H20C21,13 22,12 22,11V2H20.2M4,11V4H6V6V11C5.1,11 4.3,11 4,11M20,11C19.7,11 18.9,11 18,11V6V4H20V11Z" />
|
||||
</vector>
|
@ -1,8 +1,8 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24"
|
||||
android:viewportWidth="24">
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#000"
|
||||
android:pathData="M14 14H7v2h7m5 3H5V8h14m0-5h-1V1h-2v2H8V1H6v2H5a2
|
||||
|
96
app/src/main/res/layout/dialog_note.xml
Normal file
96
app/src/main/res/layout/dialog_note.xml
Normal file
@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/note_dialog_details"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="@string/all_details"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/all_category"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noteDialogCategory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/all_no_data"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/all_teacher"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noteDialogTeacher"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/all_no_data"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/all_date"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noteDialogDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/all_no_data"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/note_content"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noteDialogContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:text="@string/all_no_data"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/noteDialogClose"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="@string/all_close"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
51
app/src/main/res/layout/fragment_note.xml
Normal file
51
app/src/main/res/layout/fragment_note.xml
Normal file
@ -0,0 +1,51 @@
|
||||
<FrameLayout 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="match_parent">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/noteProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true" />
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/noteSwipe"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/noteRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/noteEmpty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="100dp"
|
||||
android:minHeight="100dp"
|
||||
app:srcCompat="@drawable/ic_menu_main_note_24dp"
|
||||
app:tint="?android:attr/textColorPrimary"
|
||||
tools:ignore="contentDescription" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/note_no_items"
|
||||
android:textSize="20sp" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
60
app/src/main/res/layout/item_note.xml
Normal file
60
app/src/main/res/layout/item_note.xml
Normal file
@ -0,0 +1,60 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/note_subitem_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ic_all_divider"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noteItemDate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/all_date"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noteItemTeacher"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_toEndOf="@id/noteItemDate"
|
||||
android:layout_toRightOf="@id/noteItemDate"
|
||||
android:gravity="end"
|
||||
android:text="@string/all_teacher"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noteItemType"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/noteItemDate"
|
||||
android:layout_alignStart="@id/noteItemDate"
|
||||
android:layout_alignLeft="@id/noteItemDate"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:text="@string/exam_type"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noteItemContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/noteItemType"
|
||||
android:layout_alignStart="@id/noteItemDate"
|
||||
android:layout_alignLeft="@id/noteItemDate"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:text="@string/all_description"
|
||||
android:textSize="14sp" />
|
||||
</RelativeLayout>
|
@ -11,6 +11,7 @@
|
||||
<string name="settings_title">Ustawienia</string>
|
||||
<string name="more_title">Więcej</string>
|
||||
<string name="about_title">O aplikacji</string>
|
||||
<string name="note_title">Uwagi i osiągnięcia</string>
|
||||
|
||||
|
||||
<!--Login form-->
|
||||
@ -72,6 +73,16 @@
|
||||
</plurals>
|
||||
|
||||
|
||||
<!--Note notify-->
|
||||
<string name="notify_note_channel">Nowe uwagi</string>
|
||||
<plurals name="notify_note_new_items">
|
||||
<item quantity="one">Dostałeś %1$d uwagę</item>
|
||||
<item quantity="few">"Dostałeś %1$d uwagi</item>
|
||||
<item quantity="many">Dostałeś %1$d uwag</item>
|
||||
<item quantity="other">Dostałeś %1$d uwag</item>
|
||||
</plurals>
|
||||
|
||||
|
||||
<!--Timetable-->
|
||||
<string name="timetable_lesson">Lekcja</string>
|
||||
<string name="timetable_room">Sala</string>
|
||||
@ -107,6 +118,24 @@
|
||||
<string name="about_source_code">Kod źródłowy</string>
|
||||
<string name="about_feedback">Zgłoś błąd</string>
|
||||
|
||||
<!--Note-->
|
||||
<string name="note_no_items">Brak informacji o uwagach</string>
|
||||
<string name="note_content">Treść</string>
|
||||
<plurals name="note_number_item">
|
||||
<item quantity="one">%d uwaga</item>
|
||||
<item quantity="few">%d uwagi</item>
|
||||
<item quantity="many">%d uwag</item>
|
||||
<item quantity="other">%d uwag</item>
|
||||
</plurals>
|
||||
|
||||
<plurals name="note_new_items">
|
||||
<item quantity="one">Nowa uwaga</item>
|
||||
<item quantity="few">Nowe uwagi</item>
|
||||
<item quantity="many">Nowych uwag</item>
|
||||
<item quantity="other">Nowych uwag</item>
|
||||
</plurals>
|
||||
|
||||
|
||||
<!--Generic-->
|
||||
<string name="all_description">Opis</string>
|
||||
<string name="all_no_description">Brak opisu</string>
|
||||
@ -114,6 +143,7 @@
|
||||
<string name="all_date">Data</string>
|
||||
<string name="all_color">Kolor</string>
|
||||
<string name="all_details">Szczegóły</string>
|
||||
<string name="all_category">Kategoria</string>
|
||||
<string name="all_close">Zamknij</string>
|
||||
<string name="all_cancel">Anuluj</string>
|
||||
<string name="all_no_data">Brak danych</string>
|
||||
|
@ -11,6 +11,7 @@
|
||||
<string name="settings_title">Settings</string>
|
||||
<string name="more_title">More</string>
|
||||
<string name="about_title">About</string>
|
||||
<string name="note_title">Notes and achievements</string>
|
||||
|
||||
|
||||
<!--Login form-->
|
||||
@ -64,6 +65,13 @@
|
||||
<item quantity="other">You received %1$d grades</item>
|
||||
</plurals>
|
||||
|
||||
<!--Note notify-->
|
||||
<string name="notify_note_channel">New notes</string>
|
||||
<plurals name="notify_note_new_items">
|
||||
<item quantity="one">You received %1$d note</item>
|
||||
<item quantity="other">You received %1$d notes</item>
|
||||
</plurals>
|
||||
|
||||
|
||||
<!--Timetable-->
|
||||
<string name="timetable_lesson">Lesson</string>
|
||||
@ -99,6 +107,19 @@
|
||||
<string name="about_source_code">Source code</string>
|
||||
<string name="about_feedback">Report a bug</string>
|
||||
|
||||
<!--Note-->
|
||||
<string name="note_no_items">No info about notes</string>
|
||||
<string name="note_content">Content</string>
|
||||
<plurals name="note_number_item">
|
||||
<item quantity="one">%d note</item>
|
||||
<item quantity="other">%d notes</item>
|
||||
</plurals>
|
||||
|
||||
<plurals name="note_new_items">
|
||||
<item quantity="one">New note</item>
|
||||
<item quantity="other">New notes</item>
|
||||
</plurals>
|
||||
|
||||
|
||||
<!--Generic-->
|
||||
<string name="all_description">Description</string>
|
||||
@ -107,6 +128,7 @@
|
||||
<string name="all_date">Date</string>
|
||||
<string name="all_color">Color</string>
|
||||
<string name="all_details">Details</string>
|
||||
<string name="all_category">Category</string>
|
||||
<string name="all_close">Close</string>
|
||||
<string name="all_cancel">Cancel</string>
|
||||
<string name="all_no_data">No data</string>
|
||||
|
Reference in New Issue
Block a user