Skip to content

Commit

Permalink
Fixed item card layout
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamGrzybkowski committed Sep 2, 2017
1 parent 67008ab commit 2487091
Showing 1 changed file with 28 additions and 22 deletions.
50 changes: 28 additions & 22 deletions app/src/main/res/layout/item_card.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="4dp"
card_view:cardBackgroundColor="@color/card_background"
card_view:cardCornerRadius="0dp"
card_view:cardElevation="3dp">
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="4dp"
card_view:cardBackgroundColor="@color/card_background"
card_view:cardCornerRadius="0dp"
card_view:cardElevation="3dp">

<android.support.constraint.ConstraintLayout
android:background="?attr/selectableItemBackground"
Expand Down Expand Up @@ -52,27 +53,34 @@
android:id="@+id/itemUser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:textSize="12sp"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintBottom_toBottomOf="@+id/itemTimeAgo"
card_view:layout_constraintEnd_toStartOf="@+id/itemTimeAgo"
tools:text="Adam Grzybkowski&#160;&#160;"
tools:layout_editor_absoluteX="187dp"
android:layout_marginTop="8dp"
card_view:layout_constraintTop_toBottomOf="@+id/itemTitle"/>
card_view:layout_constraintRight_toLeftOf="@+id/itemTimeAgo"
card_view:layout_constraintVertical_bias="0.0"
card_view:layout_constraintTop_toTopOf="@+id/itemTimeAgo"/>

<TextView
android:id="@+id/itemDomain"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:textSize="12sp"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintLeft_toLeftOf="parent"
card_view:layout_constraintStart_toStartOf="parent"
tools:ignore="MissingPrefix"
tools:text="google.com"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
card_view:layout_constraintLeft_toLeftOf="parent"/>
card_view:layout_constraintRight_toLeftOf="@+id/itemUser"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
card_view:layout_constraintTop_toBottomOf="@+id/itemTitle"
card_view:layout_constraintHorizontal_bias="0.0"
card_view:layout_constraintVertical_bias="0.0"
android:layout_marginEnd="8dp"/>

<TextView
android:id="@+id/itemPointsCount"
Expand All @@ -91,8 +99,6 @@
android:id="@+id/itemCommentsCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="0dp"
android:layout_marginStart="0dp"
android:layout_marginTop="8dp"
android:textColor="@android:color/black"
android:textSize="12sp"
Expand Down

0 comments on commit 2487091

Please sign in to comment.