Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 43 additions & 38 deletions app/src/main/res/layout/fragment_block.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#364d5a"
android:orientation="vertical">

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
Expand All @@ -14,13 +15,13 @@
android:id="@+id/warning"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_warning"
android:tint="@android:color/white"
android:visibility="invisible"
tools:visibility="visible"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true" />
tools:visibility="visible" />

<ImageButton
android:id="@+id/play_full"
Expand All @@ -42,10 +43,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<RelativeLayout
android:id="@+id/block_write"
android:layout_width="wrap_content"
android:layout_height="180dp"
android:layout_height="120dp"
android:background="#364d5a"
android:paddingTop="2dp">

Expand All @@ -62,25 +64,26 @@

<TextView
android:id="@+id/tv_write"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/play_write"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:layout_marginTop="5dp"
android:layout_toLeftOf="@+id/play_write"
android:gravity="bottom"
android:textColor="#9fb7cc"
android:textSize="12sp"
tools:text="@string/simple_write" />

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/legend_write"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_write"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:layout_marginTop="5dp"
android:layout_toLeftOf="@+id/play_write"
android:gravity="bottom"
android:text="@string/chart_label"
android:textColor="#9fb7cc"
Expand All @@ -103,53 +106,54 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_write_result"
android:layout_marginBottom="35dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="-15dp"
android:layout_marginTop="5dp"
chart:chart_axisColor="#30547d99"
chart:chart_typeface="OpenSans-Regular.ttf" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/block_read"
android:layout_width="wrap_content"
android:layout_height="180dp"
android:layout_height="120dp"
android:background="#364d5a">

<ImageButton
android:id="@+id/play_read"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_play_toolbar" />
android:id="@+id/play_read"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_play_toolbar" />


<TextView
android:id="@+id/tv_read"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/play_read"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:layout_marginTop="5dp"
android:layout_toLeftOf="@+id/play_read"
android:gravity="bottom"
android:textColor="#9fb7cc"
android:textSize="12sp"
tools:text="@string/simple_read" />

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/legend_read"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_read"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:layout_marginTop="5dp"
android:layout_toLeftOf="@+id/play_read"
android:gravity="bottom"
android:text="@string/chart_label"
android:textColor="#9fb7cc"
Expand All @@ -172,18 +176,18 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_read_result"
android:layout_marginBottom="35dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="-15dp"
android:layout_marginTop="5dp"
chart:chart_axisColor="#30547d99"
chart:chart_typeface="OpenSans-Regular.ttf" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/block_update"
android:layout_width="wrap_content"
android:layout_height="180dp"
android:layout_height="120dp"
android:background="#364d5a"
android:paddingTop="2dp">

Expand All @@ -201,25 +205,26 @@

<TextView
android:id="@+id/tv_update"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/play_update"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:layout_marginTop="5dp"
android:layout_toLeftOf="@+id/play_update"
android:gravity="bottom"
android:textColor="#9fb7cc"
android:textSize="12sp"
tools:text="@string/simple_update" />

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/legend_update"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_update"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:layout_marginTop="5dp"
android:layout_toLeftOf="@+id/play_update"
android:gravity="bottom"
android:text="@string/chart_label"
android:textColor="#9fb7cc"
Expand All @@ -242,18 +247,18 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_update_result"
android:layout_marginBottom="35dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="-15dp"
android:layout_marginTop="5dp"
chart:chart_axisColor="#30547d99"
chart:chart_typeface="OpenSans-Regular.ttf" />
</RelativeLayout>

<RelativeLayout
android:id="@+id/block_delete"
android:layout_width="wrap_content"
android:layout_height="180dp"
android:layout_height="120dp"
android:background="#364d5a"
android:paddingTop="2dp">

Expand All @@ -271,25 +276,26 @@

<TextView
android:id="@+id/tv_delete"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/play_delete"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:layout_marginTop="5dp"
android:layout_toLeftOf="@+id/play_delete"
android:gravity="bottom"
android:textColor="#9fb7cc"
android:textSize="12sp"
tools:text="@string/simple_delete" />

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/legend_delete"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_delete"
android:layout_marginLeft="40dp"
android:layout_marginStart="40dp"
android:layout_marginTop="5dp"
android:layout_toLeftOf="@+id/play_delete"
android:gravity="bottom"
android:text="@string/chart_label"
android:textColor="#9fb7cc"
Expand All @@ -307,16 +313,15 @@
android:textColor="#ffffff"
android:textSize="30sp" />

<com.db.chart.view.LineChartView
xmlns:chart="http://schemas.android.com/apk/res-auto"
<com.db.chart.view.LineChartView xmlns:chart="http://schemas.android.com/apk/res-auto"
android:id="@+id/chart_delete"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_delete_result"
android:layout_marginBottom="35dp"
android:layout_marginBottom="5dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginTop="-15dp"
android:layout_marginTop="5dp"
chart:chart_axisColor="#30547d99"
chart:chart_typeface="OpenSans-Regular.ttf" />
</RelativeLayout>
Expand Down
2 changes: 1 addition & 1 deletion app/src/sqlite/java/com/study/benchmarkorm/model/Book.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public Book(String author,String title,
this.pagesCount = pagesCount;
this.bookId = bookId;
this.libraryId = library.getId();
this.Library = library;
this.library = library;
}

public long getId() {
Expand Down