Skip to content

Instantly share code, notes, and snippets.

@smartherd
Last active October 27, 2020 12:12
Show Gist options
  • Save smartherd/b42bc047a5b9003d59aa7ba3225bb11b to your computer and use it in GitHub Desktop.
Save smartherd/b42bc047a5b9003d59aa7ba3225bb11b to your computer and use it in GitHub Desktop.
9-patch Drawable
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello!"
android:background="@drawable/chat_raster"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:textSize="20sp"
android:textColor="@android:color/black"/>
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment