diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-29 00:29:46 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-29 00:29:46 -0700 |
commit | 8f2e56eb5ecfc6b5ce2f1530ead6fe73f5bfe89c (patch) | |
tree | f6e3d074c1f5d21faac6375f356607408e1e465c /library/src/main/res/layout/kau_iitem_card.xml | |
parent | b45156a92f9b2f3fcce62fd58d25474196048f1a (diff) | |
download | kau-8f2e56eb5ecfc6b5ce2f1530ead6fe73f5bfe89c.tar.gz kau-8f2e56eb5ecfc6b5ce2f1530ead6fe73f5bfe89c.tar.bz2 kau-8f2e56eb5ecfc6b5ce2f1530ead6fe73f5bfe89c.zip |
Completely rewrite about activity
Diffstat (limited to 'library/src/main/res/layout/kau_iitem_card.xml')
-rw-r--r-- | library/src/main/res/layout/kau_iitem_card.xml | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/library/src/main/res/layout/kau_iitem_card.xml b/library/src/main/res/layout/kau_iitem_card.xml new file mode 100644 index 0000000..4967a2e --- /dev/null +++ b/library/src/main/res/layout/kau_iitem_card.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- + Generic card with an imageview, title, description, and button + --> + +<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/kau_card_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/kau_padding_normal" + android:foreground="?android:selectableItemBackground" + android:minHeight="?android:listPreferredItemHeight" + android:paddingBottom="@dimen/kau_padding_normal" + android:paddingEnd="@dimen/kau_padding_normal" + android:paddingTop="@dimen/kau_padding_normal"> + + <android.support.constraint.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <ImageView + android:id="@+id/kau_card_image" + android:layout_width="@dimen/kau_avatar_bounds" + android:layout_height="@dimen/kau_avatar_bounds" + android:layout_marginEnd="@dimen/kau_avatar_margin" + android:layout_marginStart="@dimen/kau_avatar_margin" + android:padding="@dimen/kau_avatar_padding" + android:visibility="gone" + android:scaleType="fitCenter" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/kau_card_title" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.AppCompat.Subhead" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/kau_card_image" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/kau_card_description" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/kau_card_image" + app:layout_constraintTop_toBottomOf="@id/kau_card_title" /> + + <LinearLayout + android:id="@+id/kau_card_bottom_row" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/kau_card_image" + app:layout_constraintTop_toBottomOf="@id/kau_card_description"> + + <Button + android:id="@+id/kau_card_button" + style="?android:borderlessButtonStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/kau_spacing_normal" + android:textColor="?attr/colorAccent" /> + + </LinearLayout> + + </android.support.constraint.ConstraintLayout> + +</android.support.v7.widget.CardView> |