Skip to content

Commit

Permalink
Listview example layout fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-vasiliev committed Feb 7, 2018
1 parent d5ce220 commit 4685ec4
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 3 deletions.
Expand Up @@ -27,6 +27,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:text="@string/price_mock"
android:textColor="@android:color/white"
android:textSize="20sp"
Expand All @@ -35,6 +36,7 @@
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:src="@drawable/menu_icon" />
Expand All @@ -59,8 +61,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/head_image"
android:layout_alignLeft="@id/head_image"
android:layout_alignStart="@id/head_image"
android:paddingBottom="10dp"
android:paddingLeft="20dp"
android:paddingStart="20dp"
android:text="@string/requests_count_mock" />

Expand All @@ -69,7 +73,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/head_image_left_text"
android:layout_alignLeft="@id/head_image_left_text"
android:layout_alignStart="@id/head_image_left_text"
android:paddingLeft="20dp"
android:paddingStart="20dp"
android:text="@string/requests_count_badge" />

Expand All @@ -80,15 +86,18 @@
android:layout_height="wrap_content"
android:layout_alignBottom="@id/head_image"
android:layout_alignEnd="@id/head_image"
android:layout_alignRight="@id/head_image"
android:paddingBottom="10dp"
android:paddingEnd="20dp"
android:paddingRight="20dp"
android:text="@string/weight_mock" />

<TextView
style="@style/ContentImageBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/head_image_right_text"
android:layout_alignLeft="@id/head_image_right_text"
android:layout_alignStart="@id/head_image_right_text"
android:text="@string/weight_badge" />

Expand All @@ -107,6 +116,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/head_image_center_text"
android:layout_alignLeft="@id/head_image_center_text"
android:layout_alignStart="@id/head_image_center_text"
android:text="@string/pledge_badge" />

Expand Down Expand Up @@ -134,6 +144,7 @@
style="@style/ContentMainBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginBottom="5dp"
android:text="@string/sender_badge" />
Expand All @@ -152,8 +163,10 @@
android:layout_height="wrap_content"
android:layout_alignTop="@id/content_avatar"
android:layout_marginBottom="2dp"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp"
android:layout_toEndOf="@id/content_avatar"
android:layout_toRightOf="@id/content_avatar"
android:text="@string/client_name_mock"
android:textColor="@color/mainTextColor"
android:textSize="18sp"
Expand All @@ -163,6 +176,7 @@
android:id="@+id/content_rating_stars"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_name_view"
android:layout_alignStart="@id/content_name_view"
android:layout_below="@id/content_name_view"
android:src="@drawable/stars" />
Expand All @@ -172,8 +186,10 @@
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/content_rating_stars"
android:layout_marginBottom="-2dp"
android:layout_marginLeft="3dp"
android:layout_marginStart="3dp"
android:layout_toEndOf="@id/content_rating_stars"
android:layout_toRightOf="@id/content_rating_stars"
android:text="@string/rating_mock"
android:textColor="@color/contentBadgeTitle"
android:textSize="12sp" />
Expand All @@ -182,6 +198,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/arrow" />

Expand Down Expand Up @@ -212,13 +229,15 @@
style="@style/ContentMainBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text="@string/from_badge" />

<TextView
android:id="@+id/content_from_address_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_from_badge"
android:layout_alignStart="@id/content_from_badge"
android:layout_below="@id/content_from_badge"
android:text="@string/content_from1_mock"
Expand All @@ -230,6 +249,7 @@
android:id="@+id/content_from_address_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_from_address_1"
android:layout_alignStart="@id/content_from_address_1"
android:layout_below="@id/content_from_address_1"
android:text="@string/content_from2_mock"
Expand All @@ -248,13 +268,15 @@
style="@style/ContentMainBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text="@string/to_badge" />

<TextView
android:id="@+id/content_to_address_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_to_badge"
android:layout_alignStart="@id/content_to_badge"
android:layout_below="@id/content_to_badge"
android:text="@string/content_to1_mock"
Expand All @@ -266,6 +288,7 @@
android:id="@+id/content_to_address_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_to_address_1"
android:layout_alignStart="@id/content_to_address_1"
android:layout_below="@id/content_to_address_1"
android:text="@string/content_to2_mock"
Expand All @@ -276,6 +299,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/arrow" />

Expand Down Expand Up @@ -308,13 +332,15 @@
style="@style/ContentMainBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text="@string/delivery_date_badge" />

<TextView
android:id="@+id/content_delivery_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_delivery_date_badge"
android:layout_alignStart="@id/content_delivery_date_badge"
android:layout_below="@id/content_delivery_date_badge"
android:text="@string/delivery_time_mock"
Expand All @@ -326,6 +352,7 @@
android:id="@+id/content_delivery_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_delivery_time"
android:layout_alignStart="@id/content_delivery_time"
android:layout_below="@id/content_delivery_time"
android:text="@string/delivery_date_mock"
Expand All @@ -344,13 +371,15 @@
style="@style/ContentMainBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text="@string/deadline_badge" />

<TextView
android:id="@+id/content_deadline_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_deadline_badge"
android:layout_alignStart="@id/content_deadline_badge"
android:layout_below="@id/content_deadline_badge"
android:text="@string/deadline_time_mock"
Expand All @@ -362,6 +391,7 @@
android:id="@+id/content_deadline_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/content_deadline_time"
android:layout_alignStart="@id/content_deadline_time"
android:layout_below="@id/content_deadline_time"
android:text=""
Expand Down
Expand Up @@ -23,6 +23,7 @@
android:id="@+id/title_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textColor="@android:color/white"
android:textSize="26sp" />
Expand All @@ -32,6 +33,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textColor="@android:color/white"
android:textSize="14sp" />
Expand All @@ -41,6 +43,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/title_time_label"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textColor="@android:color/white"
android:textSize="12sp" />
Expand All @@ -55,15 +58,19 @@
android:background="@color/bgTitleRight"
android:paddingBottom="20dp"
android:paddingEnd="20dp"
android:paddingLeft="15dp"
android:paddingRight="20dp"
android:paddingStart="15dp"
android:paddingTop="20dp">

<ImageView
android:id="@+id/title_from_to_dots"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginEnd="10dp"
android:layout_marginRight="10dp"
android:src="@drawable/from_to_purple" />

<TextView
Expand All @@ -73,6 +80,7 @@
android:layout_alignTop="@+id/title_from_to_dots"
android:layout_marginTop="-5dp"
android:layout_toEndOf="@+id/title_from_to_dots"
android:layout_toRightOf="@+id/title_from_to_dots"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
Expand All @@ -87,6 +95,7 @@
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:layout_toEndOf="@+id/title_from_to_dots"
android:layout_toRightOf="@+id/title_from_to_dots"
android:src="@color/contentDividerLine" />

<TextView
Expand All @@ -95,6 +104,7 @@
android:layout_height="wrap_content"
android:layout_below="@id/title_from_to_dots_divider"
android:layout_toEndOf="@id/title_from_to_dots"
android:layout_toRightOf="@id/title_from_to_dots"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
Expand All @@ -108,13 +118,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />

<TextView
style="@style/TitleBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/title_requests_count"
android:layout_alignLeft="@id/title_requests_count"
android:layout_alignStart="@id/title_requests_count"
android:text="@string/requests_count_badge" />

Expand All @@ -125,13 +137,15 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:text="@string/weight_mock" />

<TextView
style="@style/TitleBadgeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/title_weight"
android:layout_alignLeft="@id/title_weight"
android:layout_alignStart="@id/title_weight"
android:text="@string/weight_badge" />

Expand All @@ -148,6 +162,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/title_pledge"
android:layout_alignLeft="@id/title_pledge"
android:layout_alignStart="@id/title_pledge"
android:text="@string/pledge_badge" />

Expand Down
@@ -1,5 +1,4 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
2 changes: 0 additions & 2 deletions folding-cell-listview-example/src/main/res/values/styles.xml
@@ -1,8 +1,6 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:typeface">sans</item>
Expand Down

0 comments on commit 4685ec4

Please sign in to comment.