自定义形状的LinearLayout与弯曲身边,我想使字形的LinearLayout像下面android系统
我试图让只有一侧弯曲的自定义。尝试角落半径,但它没有提供与上面相同的外观。
已经尝试过这样的背景形状如下: -
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#3F51B5" />
<padding
android:bottom="7dp"
android:left="7dp"
android:right="7dp"
android:top="7dp" />
<corners
android:bottomLeftRadius="50dp"
android:bottomRightRadius="50dp"
android:topLeftRadius="0dp"
android:topRightRadius="0dp" />
</shape>
只四舍五入的角落和保值增值形状不保留它变得太圆。我想要的曲线,而不是圆角
你可以用这个弧形灯罩创建图像,并可以添加Layout'的'背景。 –
我不确定它是否会在所有分辨率上看起来一样,所以我避免了这一点。会吗? –
您可以将dimen用于所有决议并使其轻松工作。 –