Skip to content

Commit

Permalink
increase list item heights if phone number is shown
Browse files Browse the repository at this point in the history
  • Loading branch information
tibbi committed Sep 27, 2018
1 parent 0200229 commit 15f09bd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions app/src/main/res/layout/item_contact_with_number.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
<RelativeLayout
android:id="@+id/contact_holder"
android:layout_width="match_parent"
android:layout_height="@dimen/contact_item_height"
android:layout_height="@dimen/contact_item_with_number_height"
android:paddingTop="@dimen/tiny_margin"
android:paddingRight="@dimen/activity_margin">

<ImageView
android:id="@+id/contact_tmb"
android:layout_width="@dimen/normal_icon_size"
android:layout_height="@dimen/normal_icon_size"
android:layout_height="match_parent"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_person"/>

Expand All @@ -31,15 +32,15 @@
android:layout_toRightOf="@+id/contact_tmb"
android:ellipsize="end"
android:maxLines="1"
android:textSize="@dimen/bigger_text_size"
android:textSize="@dimen/big_text_size"
tools:text="John Doe"/>

<TextView
android:id="@+id/contact_number"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/contact_name"
android:layout_below="@+id/contact_name"
android:layout_alignLeft="@+id/contact_name"
android:layout_toRightOf="@+id/contact_tmb"
android:maxLines="1"
android:textSize="@dimen/bigger_text_size"
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/res/layout/item_recent_call.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
<android.support.constraint.ConstraintLayout
android:id="@+id/recent_call_holder"
android:layout_width="match_parent"
android:layout_height="@dimen/contact_item_height"
android:gravity="center_vertical"
android:layout_height="@dimen/contact_item_with_number_height"
android:paddingLeft="@dimen/activity_margin"
android:paddingRight="@dimen/activity_margin">

<TextView
android:id="@+id/recent_call_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="1"
android:paddingRight="@dimen/activity_margin"
android:textSize="@dimen/big_text_size"
Expand All @@ -39,6 +39,7 @@
android:layout_height="wrap_content"
android:layout_below="@+id/recent_call_name"
android:maxLines="1"
android:paddingBottom="@dimen/tiny_margin"
android:textSize="@dimen/bigger_text_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/recent_call_date_time"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<dimen name="contact_actions_size">45dp</dimen>
<dimen name="contact_icons_size">40dp</dimen>
<dimen name="contact_item_height">52dp</dimen>
<dimen name="contact_item_with_number_height">56dp</dimen>
<dimen name="create_new_contact_height">68dp</dimen>
<dimen name="dialpad_button_size">60dp</dimen>
<dimen name="dialpad_text_size">44sp</dimen>
Expand Down

0 comments on commit 15f09bd

Please sign in to comment.