android文本视图样式,左侧有垂直线
有没有什么方法可以让我的TextView[不使用其他小部件]有一个类似下面截图中注释的样式?[左边的垂直线]android文本视图样式,左侧有垂直线,android,styles,textview,Android,Styles,Textview,有没有什么方法可以让我的TextView[不使用其他小部件]有一个类似下面截图中注释的样式?[左边的垂直线] 你能做一些类似的事情吗 <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" > <LinearLayout android:id="@+id/linearLayout1"
你能做一些类似的事情吗
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="5dp"
android:layout_height="match_parent"
android:background="#000000"
android:orientation="vertical" >
</LinearLayout>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/linearLayout1"
android:text="TextView" />
</RelativeLayout>
尝试使用android:drawableLeft for textview在textview左侧使用您想要的任何图像
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/button_icon" />
谢谢,这是可行的,但我真的不想使用它,因为textview的可见性在运行时会发生很大变化,所以会很麻烦,所以我不想使用任何widgetsthanks这是我一直在寻找的…但是可以根据textview中的文本动态调整可绘制图像的高度吗?我建议为可绘制图像创建9个补丁。然后,高度将自行调整