如何回合的android TextView中一侧的角落 [英] How to round the corner of one side of textview in android
本文介绍了如何回合的android TextView中一侧的角落的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
强文我要舍文本视图只有一面像左上圆和一回合
右上圆我用这个code。但它不会工作。
<?XML版本=1.0编码=UTF-8&GT?;
<形状的xmlns:机器人=http://schemas.android.com/apk/res/android>[固体机器人:色=@色/ login_layout/><中风
机器人:宽=1DP
机器人:颜色=@色/ login_layout/><填充
机器人:底部=1DP
机器人:左=1DP
机器人:右=1DP
机器人:顶部=1DP/><角落
机器人:bottomLeftRadius =0dip
机器人:bottomRightRadius =0dip
机器人:topLeftRadius =10dip
机器人:topRightRadius =10dip/>< /形状>
解决方案
有时它不会显示仿真器和图形布局
尝试在真实设备运行code和检查
strong text i want to round the only one side of text-view like round from top left and one round from top right round and i use this code. But it not work..
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="@color/login_layout" />
<stroke
android:width="1dp"
android:color="@color/login_layout" />
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
android:top="1dp" />
<corners
android:bottomLeftRadius="0dip"
android:bottomRightRadius="0dip"
android:topLeftRadius="10dip"
android:topRightRadius="10dip" />
</shape>
解决方案
sometimes It wont show in emulator and graphical layout try to run the code in a real device and check
这篇关于如何回合的android TextView中一侧的角落的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文