styled list article
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?selectableItemBackground">
|
||||
@@ -18,35 +19,36 @@
|
||||
<!--suppress AndroidLintContentDescription -->
|
||||
<com.example.xyzreader.ui.DynamicHeightNetworkImageView
|
||||
android:id="@+id/thumbnail"
|
||||
android:layout_width="100dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:background="@color/photo_placeholder" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/article_title"
|
||||
style="@style/TextAppearance.AppCompat.Subhead"
|
||||
<LinearLayout
|
||||
android:padding="16dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:textColor="@color/ltgray"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="4" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/article_subtitle"
|
||||
style="@style/TextAppearance.AppCompat.Body1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:textColor="#6000"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end" />
|
||||
<TextView
|
||||
tools:text="Some title that might span multiple lines stands here"
|
||||
android:id="@+id/article_title"
|
||||
style="@style/TextAppearance.AppCompat.Title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="4"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
tools:text="Some date and author that is single lined"
|
||||
android:id="@+id/article_subtitle"
|
||||
style="@style/TextAppearance.AppCompat.Caption"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
Reference in New Issue
Block a user