The custom view can be used like both sides aligned text.
<com.abblcg.common.ui.BothsidesAlignTextView
android:layout_width="300dp"
android:layout_height="100dp"
android:background="@android:color/holo_orange_light"
android:paddingLeft="10dp"
android:paddingRight="10dp"
custom:abbText="我的身份证号"
custom:abbTextColor="#ffffff"
custom:abbTextSize="25sp"/>