Merge pull request #4 from icanit/master

Chapter item improvements
This commit is contained in:
inorichi 2015-11-30 20:56:13 +01:00
commit 665eb232a7
13 changed files with 33 additions and 26 deletions

View file

@ -7,6 +7,7 @@ import android.support.v7.widget.RecyclerView;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import java.text.SimpleDateFormat;
@ -27,7 +28,7 @@ public class ChaptersHolder extends RecyclerView.ViewHolder implements
@Bind(R.id.chapter_title) TextView title;
@Bind(R.id.download_text) TextView downloadText;
@Bind(R.id.chapter_menu) ImageView chapterMenu;
@Bind(R.id.chapter_menu) RelativeLayout chapterMenu;
@Bind(R.id.chapter_pages) TextView pages;
@Bind(R.id.chapter_date) TextView date;

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

View file

@ -44,7 +44,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:ellipsize="middle"
android:ellipsize="end"
android:maxLines="1"
android:paddingLeft="8dp"
android:paddingRight="8dp"

View file

@ -3,8 +3,11 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:padding="6dip"
android:background="@drawable/selector_chapter_light">
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:background="@drawable/selector_chapter_light"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
android:paddingRight="?android:attr/listPreferredItemPaddingRight">
<RelativeLayout
android:layout_width="fill_parent"
@ -52,33 +55,36 @@
android:layout_height="wrap_content"
android:layout_alignWithParentIfMissing="true"
android:gravity="center_vertical"
android:textSize="20sp"
android:textSize="18dp"
android:ellipsize="end"
android:maxLines="1"
tools:text="Title"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_toStartOf="@+id/relativeLayout2"
android:layout_toLeftOf="@+id/relativeLayout2"/>
<RelativeLayout
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentTop="true"
android:layout_above="@+id/relativeLayout"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_gravity="center_vertical"
android:gravity="center"
android:id="@+id/relativeLayout2"
android:layout_above="@+id/relativeLayout">
<ImageView
android:layout_alignParentTop="true"
android:paddingRight="30dp"/>
<RelativeLayout
android:id="@+id/chapter_menu"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitXY"
android:src="@drawable/ic_more_horiz_black_36dp"
android:background="?android:selectableItemBackground"/>
android:layout_width="40dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:gravity="center|end"
android:layout_alignRight="@+id/chapter_title"
android:layout_alignEnd="@+id/chapter_title"
android:layout_alignBottom="@+id/relativeLayout"
android:paddingBottom="18dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_more_horiz_black_24dp"
android:background="?android:selectableItemBackground"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="false"/>
</RelativeLayout>