<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    xmlns:dots="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingLeft="16dp">

    <android.support.v7.widget.CardView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="left"
        card_view:cardBackgroundColor="@color/black"
        card_view:cardCornerRadius="8dp"
        card_view:cardUseCompatPadding="true">

        <pl.tajchert.sample.DotsTextView
            android:id="@+id/dots"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_margin="8dp"
            android:textColor="@color/white"
            android:textSize="45sp"
            dots:autoplay="true"
            dots:period="1000" />

    </android.support.v7.widget.CardView>


</FrameLayout>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    xmlns:dots="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingStart="16dp"
    android:paddingLeft="16dp">

    <android.support.v7.widget.CardView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="left"
        card_view:cardBackgroundColor="@color/black"
        card_view:cardCornerRadius="8dp"
        card_view:cardUseCompatPadding="true">

        <pl.tajchert.sample.DotsTextView
            android:id="@+id/dots"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_margin="8dp"
            android:textColor="@color/white"
            android:textSize="45sp"
            dots:autoplay="true"
            dots:period="1000" />

    </android.support.v7.widget.CardView>


</FrameLayout>
Replace left and right settings with start and end instead.
Replace left and right settings with start and end instead.
