diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-29 16:16:15 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-29 16:16:15 -0700 |
commit | bfb16f2d56dd4da8d302a924efb7ea119582fde0 (patch) | |
tree | 2fd6ae1f5ffe305ce761ad88609692c163e6ebb3 /library/src/main/res | |
parent | 8f2e56eb5ecfc6b5ce2f1530ead6fe73f5bfe89c (diff) | |
download | kau-bfb16f2d56dd4da8d302a924efb7ea119582fde0.tar.gz kau-bfb16f2d56dd4da8d302a924efb7ea119582fde0.tar.bz2 kau-bfb16f2d56dd4da8d302a924efb7ea119582fde0.zip |
Finalize about activity
Diffstat (limited to 'library/src/main/res')
-rw-r--r-- | library/src/main/res/layout/kau_about_iitem_library.xml | 107 | ||||
-rw-r--r-- | library/src/main/res/layout/kau_iitem_card.xml | 25 | ||||
-rw-r--r-- | library/src/main/res/layout/kau_iitem_header.xml | 17 | ||||
-rw-r--r-- | library/src/main/res/layout/kau_iitem_library.xml | 124 | ||||
-rw-r--r-- | library/src/main/res/values/ids.xml | 3 |
5 files changed, 157 insertions, 119 deletions
diff --git a/library/src/main/res/layout/kau_about_iitem_library.xml b/library/src/main/res/layout/kau_about_iitem_library.xml deleted file mode 100644 index 0129512..0000000 --- a/library/src/main/res/layout/kau_about_iitem_library.xml +++ /dev/null @@ -1,107 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - android:id="@+id/lib_item_card" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingBottom="8dp" - android:paddingTop="8dp" - android:clickable="true" - android:foreground="?selectableItemBackground" - android:layoutDirection="ltr"> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="6dp"> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center_vertical" - android:orientation="horizontal" - android:paddingLeft="8dp" - android:paddingRight="8dp"> - - <TextView - android:id="@+id/lib_item_name" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="5" - android:ellipsize="end" - android:gravity="start" - android:maxLines="1" - android:textSize="@dimen/textSizeLarge_openSource" - android:textStyle="normal" - tools:text="Library name" /> - - <TextView - android:id="@+id/lib_item_author" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginTop="2dp" - android:layout_weight="2" - android:gravity="end" - android:maxLines="2" - android:textSize="@dimen/textSizeSmall_openSource" - android:textStyle="normal" - tools:text="Author" /> - </LinearLayout> - - <View - android:id="@+id/lib_item_top_divider" - android:layout_width="match_parent" - android:layout_height="1px" - android:layout_marginTop="4dp" /> - - <TextView - android:id="@+id/lib_item_description" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:maxLines="20" - android:padding="8dp" - android:textSize="@dimen/textSizeSmall_openSource" - android:textStyle="normal" - tools:text="Description"/> - - <View - android:id="@+id/lib_item_bottom_divider" - android:layout_width="match_parent" - android:layout_height="1px" - android:layout_marginTop="4dp" /> - - <LinearLayout - android:id="@+id/lib_item_bottom_container" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center_vertical" - android:orientation="horizontal" - android:paddingLeft="8dp" - android:paddingRight="8dp" - android:paddingTop="4dp"> - - <TextView - android:id="@+id/lib_item_version" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:gravity="start" - android:maxLines="1" - android:textSize="@dimen/textSizeSmall_openSource" - android:textStyle="normal" - tools:text="Version" /> - - <TextView - android:id="@+id/lib_item_license" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:gravity="end" - android:maxLines="1" - android:textSize="@dimen/textSizeSmall_openSource" - android:textStyle="normal" - tools:text="License" /> - </LinearLayout> - </LinearLayout> -</android.support.v7.widget.CardView>
\ No newline at end of file diff --git a/library/src/main/res/layout/kau_iitem_card.xml b/library/src/main/res/layout/kau_iitem_card.xml index 4967a2e..621da2e 100644 --- a/library/src/main/res/layout/kau_iitem_card.xml +++ b/library/src/main/res/layout/kau_iitem_card.xml @@ -3,22 +3,21 @@ <!-- 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:background="?android:selectableItemBackground" + android:minHeight="?android:listPreferredItemHeight"> <android.support.constraint.ConstraintLayout android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:paddingBottom="@dimen/kau_padding_normal" + android:paddingEnd="@dimen/kau_padding_normal" + android:paddingTop="@dimen/kau_padding_normal"> <ImageView android:id="@+id/kau_card_image" @@ -27,11 +26,12 @@ 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" + android:visibility="gone" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> + <TextView android:id="@+id/kau_card_title" android:layout_width="0dp" @@ -39,7 +39,8 @@ android:textAppearance="@style/TextAppearance.AppCompat.Subhead" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@id/kau_card_image" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" + app:layout_goneMarginStart="@dimen/kau_padding_normal" /> <TextView android:id="@+id/kau_card_description" @@ -48,7 +49,8 @@ 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" /> + app:layout_constraintTop_toBottomOf="@id/kau_card_title" + app:layout_goneMarginStart="@dimen/kau_padding_normal" /> <LinearLayout android:id="@+id/kau_card_bottom_row" @@ -59,7 +61,8 @@ 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"> + app:layout_constraintTop_toBottomOf="@id/kau_card_description" + app:layout_goneMarginStart="@dimen/kau_padding_normal"> <Button android:id="@+id/kau_card_button" diff --git a/library/src/main/res/layout/kau_iitem_header.xml b/library/src/main/res/layout/kau_iitem_header.xml new file mode 100644 index 0000000..fa5a595 --- /dev/null +++ b/library/src/main/res/layout/kau_iitem_header.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/kau_header_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/kau_padding_normal" + android:orientation="vertical"> + + <TextView + android:id="@+id/kau_header_text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/kau_spacing_xlarge" + android:padding="@dimen/kau_padding_normal" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + +</android.support.v7.widget.CardView>
\ No newline at end of file diff --git a/library/src/main/res/layout/kau_iitem_library.xml b/library/src/main/res/layout/kau_iitem_library.xml new file mode 100644 index 0000000..f486ac0 --- /dev/null +++ b/library/src/main/res/layout/kau_iitem_library.xml @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/lib_item_card" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/kau_padding_normal" + android:foreground="?selectableItemBackground" + android:clickable="true"> + + <android.support.constraint.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingBottom="@dimen/kau_padding_normal" + android:paddingEnd="@dimen/kau_padding_normal" + android:paddingStart="@dimen/kau_padding_normal" + android:paddingTop="@dimen/kau_padding_normal"> + + <android.support.constraint.Guideline + android:id="@+id/lib_g_m_v" + android:layout_width="1dp" + android:layout_height="wrap_content" + android:orientation="vertical" + app:layout_constraintGuide_percent="0.5" /> + + <TextView + android:id="@+id/lib_item_name" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:ellipsize="end" + android:gravity="start" + android:maxLines="1" + android:textSize="@dimen/textSizeLarge_openSource" + android:textStyle="normal" + app:layout_constraintEnd_toStartOf="@id/lib_g_m_v" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:text="Library name" /> + + <TextView + android:id="@+id/lib_item_author" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="2dp" + android:gravity="end" + android:maxLines="2" + android:textSize="@dimen/textSizeSmall_openSource" + android:textStyle="normal" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/lib_g_m_v" + app:layout_constraintTop_toTopOf="parent" + tools:text="Author" /> + + <android.support.constraint.Barrier + android:id="@+id/lib_item_top_divider" + android:layout_width="wrap_content" + android:layout_height="1px" + android:layout_marginTop="@dimen/kau_spacing_micro" + app:barrierDirection="bottom" + app:constraint_referenced_ids="lib_item_name,lib_item_author" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + + <TextView + android:id="@+id/lib_item_description" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:maxLines="20" + android:paddingBottom="@dimen/kau_spacing_normal" + android:paddingTop="@dimen/kau_spacing_normal" + android:textSize="@dimen/textSizeSmall_openSource" + android:textStyle="normal" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/lib_item_top_divider" + tools:text="Description" /> + + <View + android:id="@+id/lib_item_bottom_divider" + android:layout_width="match_parent" + android:layout_height="1px" + android:layout_marginTop="@dimen/kau_spacing_micro" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/lib_item_description" /> + + <TextView + android:id="@+id/lib_item_version" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/kau_spacing_normal" + android:layout_marginTop="@dimen/kau_spacing_micro" + android:layout_weight="1" + android:gravity="start" + android:maxLines="1" + android:textSize="@dimen/textSizeSmall_openSource" + android:textStyle="normal" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@id/lib_g_m_v" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/lib_item_bottom_divider" + tools:text="Version" /> + + <TextView + android:id="@+id/lib_item_license" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/kau_spacing_normal" + android:layout_marginTop="@dimen/kau_spacing_micro" + android:layout_weight="1" + android:gravity="end" + android:maxLines="1" + android:textSize="@dimen/textSizeSmall_openSource" + android:textStyle="normal" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/lib_g_m_v" + app:layout_constraintTop_toBottomOf="@id/lib_item_bottom_divider" + tools:text="License" /> + + </android.support.constraint.ConstraintLayout> + +</android.support.v7.widget.CardView>
\ No newline at end of file diff --git a/library/src/main/res/values/ids.xml b/library/src/main/res/values/ids.xml index fe0d411..dd42392 100644 --- a/library/src/main/res/values/ids.xml +++ b/library/src/main/res/values/ids.xml @@ -9,7 +9,8 @@ <item name="kau_item_pref_plain_text" type="id" /> <item name="kau_item_search" type="id" /> <item name="kau_item_cutout" type="id" /> + <item name="kau_item_header_big_margin_top" type="id" /> <item name="kau_item_card" type="id" /> - <item name="kau_item_about_library" type="id" /> + <item name="kau_item_library" type="id" /> <item name="kau_item_about_main" type="id" /> </resources>
\ No newline at end of file |