Skip to content

Instantly share code, notes, and snippets.

@DiegoGSantos
Last active April 5, 2018 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DiegoGSantos/ca6305f27a2c7ac30de48490fb932008 to your computer and use it in GitHub Desktop.
Save DiegoGSantos/ca6305f27a2c7ac30de48490fb932008 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.example.diegosantos.constraintlayoutexample.MainActivity">
<View
android:id="@+id/leftLine"
android:layout_width="0dp"
android:layout_height="6dp"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="@id/circle"
app:layout_constraintRight_toLeftOf="@id/circle"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/circle" />
<View
android:id="@+id/circle"
android:layout_width="120dp"
android:layout_height="120dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/circle" />
<View
android:id="@+id/bus"
android:layout_width="50dp"
android:layout_height="50dp"
app:layout_constraintStart_toStartOf="@id/circle"
app:layout_constraintEnd_toEndOf="@id/circle"
app:layout_constraintTop_toTopOf="@id/circle"
app:layout_constraintBottom_toBottomOf="@id/circle"
android:background="@drawable/bus" />
<View
android:id="@+id/rightLine"
android:layout_width="0dp"
android:layout_height="6dp"
app:layout_constraintTop_toTopOf="@id/circle"
app:layout_constraintBottom_toBottomOf="@id/circle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/circle"
android:background="@color/black" />
<TextView
android:id="@+id/companyName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="30sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/circle"
android:text="@string/company_name"/>
</android.support.constraint.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment