Allow to set status, score and last chapter read in MAL. Other minor changes

This commit is contained in:
inorichi
2015-12-20 20:10:04 +01:00
parent 5f44e5d492
commit 50d6632d0e
15 changed files with 370 additions and 153 deletions

View File

@@ -29,7 +29,6 @@
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1"
android:background="@color/white" />
android:layout_weight="1"/>
</LinearLayout>

View File

@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/myanimelist_title_layout"
android:layout_width="match_parent"
android:layout_height="?android:listPreferredItemHeightSmall"
android:paddingLeft="?android:listPreferredItemPaddingLeft"
android:paddingRight="?android:listPreferredItemPaddingRight"
android:background="?attr/selectableItemBackground"
android:clickable="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="Title"/>
<TextView
android:id="@+id/myanimelist_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:text="Edit..."/>
</RelativeLayout>
<View
android:id="@+id/divider1"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="@id/myanimelist_title_layout"
android:background="@color/list_choice_pressed_bg_light" />
<RelativeLayout
android:id="@+id/myanimelist_status_layout"
android:layout_width="match_parent"
android:layout_height="?android:listPreferredItemHeightSmall"
android:layout_below="@id/divider1"
android:paddingLeft="?android:listPreferredItemPaddingLeft"
android:paddingRight="?android:listPreferredItemPaddingRight"
android:background="?attr/selectableItemBackground"
android:clickable="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="@string/status"/>
<TextView
android:id="@+id/myanimelist_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
tools:text="Reading"/>
</RelativeLayout>
<View
android:id="@+id/divider2"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="@id/myanimelist_status_layout"
android:background="@color/list_choice_pressed_bg_light" />
<RelativeLayout
android:id="@+id/myanimelist_chapters_layout"
android:layout_width="match_parent"
android:layout_height="?android:listPreferredItemHeightSmall"
android:layout_below="@id/divider2"
android:paddingLeft="?android:listPreferredItemPaddingLeft"
android:paddingRight="?android:listPreferredItemPaddingRight"
android:background="?attr/selectableItemBackground"
android:clickable="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="Chapters"/>
<TextView
android:id="@+id/myanimelist_chapters"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
tools:text="12/24"/>
</RelativeLayout>
<View
android:id="@+id/divider3"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_below="@id/myanimelist_chapters_layout"
android:background="@color/list_choice_pressed_bg_light" />
<RelativeLayout
android:id="@+id/myanimelist_score_layout"
android:layout_width="match_parent"
android:layout_height="?android:listPreferredItemHeightSmall"
android:layout_below="@id/divider3"
android:paddingLeft="?android:listPreferredItemPaddingLeft"
android:paddingRight="?android:listPreferredItemPaddingRight"
android:background="?attr/selectableItemBackground"
android:clickable="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="@string/score"/>
<TextView
android:id="@+id/myanimelist_score"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
tools:text="10"/>
</RelativeLayout>
</RelativeLayout>

View File

@@ -0,0 +1,16 @@
<?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"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<eu.kanade.mangafeed.widget.MinMaxNumberPicker
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:id="@+id/chapters_picker"
app:min="0"
app:max="9999"/>
</LinearLayout>

View File

@@ -0,0 +1,16 @@
<?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"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<eu.kanade.mangafeed.widget.MinMaxNumberPicker
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:id="@+id/score_picker"
app:min="0"
app:max="10"/>
</LinearLayout>

View File

@@ -19,6 +19,7 @@
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:descendantFocusability="blocksDescendants"
android:background="@color/white"
tools:listitem="@layout/item_chapter">
</android.support.v7.widget.RecyclerView>

View File

@@ -1,84 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp">
<LinearLayout
android:layout_width="wrap_content"
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="MyAnimeList title:" />
<include layout="@layout/card_myanimelist_personal"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/myanimelist_title" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Last chapter read" />
<EditText
android:layout_width="56dp"
android:layout_height="wrap_content"
android:inputType="number"
android:ems="10"
android:id="@+id/last_chapter_read"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/action_update"
android:id="@+id/update_button"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Score"
android:layout_marginRight="10dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/score"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Status"
android:layout_marginRight="10dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/status"/>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>