android应用开发,圆角背景,shape中设置topLeftRadius后四个角都变化
阿神
阿神 2017-04-17 13:44:58
0
2
478

RT,使用shape设定形状时,设置corners的topLeftRadius后,界面上显示控件四个角都有变化,而且设置bottomRightRadius、bottomLeftRadius、bottomRightRadius这三项没有用,圆角半径仍然为topLeftRadius的值。

这是shape中标签属性的代码,然后修改VIEW的background为这个shape后显示四个角的半径都为20dp,而不是只有上面两个角为20dp。

  
阿神
阿神

闭关修行中......

reply all (2)
刘奇

我用View和ImageView,
分别在Layout文件中设置background和src或background
在代码中设置setBackgroundResource()
均能正常显示,没有你描述的这种现象。
建议你新建一个testDemo,单独测试View或ImageView试试

    PHPzhong

    Eclipse预览是这样,运行到手机就好了。

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!