[英]Label Triangle with text in android
you can use android:background attribute, to set textview like above 您可以使用android:background属性,像上面一样设置textview
Example: 例:
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dip" >
<TextView
android:id="@+id/Name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/cal"
android:ellipsize="end"
android:gravity="start|center_vertical"
android:padding="5dp"
android:singleLine="true"
android:text="Name"
android:textColor="@color/darkslate"
android:textSize="18sp"
android:textStyle="bold" />
</android.support.v7.widget.CardView >
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.