Skip to content

Instantly share code, notes, and snippets.

@douglasiacovelli
Created January 23, 2018 12:01
Show Gist options
  • Save douglasiacovelli/8608b8919fc15fad7c805d9d1f13ad32 to your computer and use it in GitHub Desktop.
Save douglasiacovelli/8608b8919fc15fad7c805d9d1f13ad32 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.iacovelli.customview.MainActivity">
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16sp"
android:clipToPadding="false"
android:scrollbars="none">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12sp"
android:orientation="horizontal">
<com.iacovelli.customview.BenefitView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:text="Apply and chat with our hosts"
app:image="@drawable/first_image"
android:layout_marginEnd="12dp"/>
<com.iacovelli.customview.BenefitView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:text="Support before, during and after your trip"
app:image="@drawable/second_image"
android:layout_marginEnd="12dp"/>
<com.iacovelli.customview.BenefitView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:text="Exclusive Discounts in Products and Accommodation"
app:image="@drawable/third_image" />
</LinearLayout>
</HorizontalScrollView>
</android.support.constraint.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment