首页 \ 问答 \ 在android中创建带有两个侧弯角的矩形形状(Create rectangle shape drawable with two side curved corner in android)

在android中创建带有两个侧弯角的矩形形状(Create rectangle shape drawable with two side curved corner in android)

我创建了一个形状可绘制资源xml文件,用于创建具有两个侧弯角的背景。
在这里,我发布了Shape drawable的代码。 但它没有给我正确的结果。 它给我4侧弯曲图像。 所以我只是想知道如何创建2侧弯曲形状的图像。

谢谢

<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#0579CD" />
<corners
    android:bottomLeftRadius="0dp"
    android:bottomRightRadius="0dp"
    android:topLeftRadius="15dp"
    android:topRightRadius="15dp" />
<padding
    android:bottom="8dp"
    android:left="8dp"
    android:right="8dp"
    android:top="8dp" />


I create a shape drawable resource xml file for a create a background with two side curved corner.
Here I post my code of Shape drawable. But it not give me right result. It give me 4 side curved image. So I just wanted to know how to create 2 side curved shape image.

Thanks

<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#0579CD" />
<corners
    android:bottomLeftRadius="0dp"
    android:bottomRightRadius="0dp"
    android:topLeftRadius="15dp"
    android:topRightRadius="15dp" />
<padding
    android:bottom="8dp"
    android:left="8dp"
    android:right="8dp"
    android:top="8dp" />


原文:https://stackoverflow.com/questions/17855342
更新时间:2023-08-26 13:08

最满意答案

com文件夹放在 .fla 相同的目录中,在代码中,在顶部,使用import导入文件:

import com.coreyoneil.collision.*;

查看文件,看起来您现在可以调用以下函数:

CDK.addItem(), CDK.removeItem(), CollisionGroup.checkCollisions(), CollisionList.swapTarget(target), CollisionList.checkCollisions(), etc.

阅读更多


Put the com folder in the same directory as your .fla and in your code, at the top, use import to import the files:

import com.coreyoneil.collision.*;

Looking at the files, it looks as you can now call functions like:

CDK.addItem(), CDK.removeItem(), CollisionGroup.checkCollisions(), CollisionList.swapTarget(target), CollisionList.checkCollisions(), etc.

Read More

相关问答

更多
  • PostGIS需要根据数据库安装。 现有数据库不会自动更改。 按如下所示运行安装脚本。 在PostgreSQL 8.4中,您可能还需要创建语言plpgsql。 对于9.0以上版本,它是默认的过程语言并自动安装。 在你的数据库中: createlang plpgsql yourdatabase 不能伤害。 如果plpgsql已经安装,它只会产生一个错误告诉你。 转到安装目录。 在Debian Squeeze中,contrib软件包在这里(在Ubuntu中可能有所不同)。 在一个shell中: cd /usr ...
  • http://en.support.wordpress.com/themes/adding-new-themes/ “由于WordPress.com技术基础设施的设计方式,我们无法支持在我们的服务中上传自定义WordPress主题。” “你可以将你的WordPress.com博客移动到一个可以编辑和上传完全自定义主题的网页主机,你可以在这里找到合适的主机。” 较早的博客文章,但我确定它仍然适用。 看起来不像是一种选择。 看起来你需要自己的主机。 http://en.support.wordpress.com ...
  • 如果您尝试在iOS设备中安装自己开发的应用程序并遇到此问题,则可能存在以下任何原因导致此错误。 您可能尚未创建正确的IPA文件。 再次重新生成您的IPA文件。 您正在尝试在iOS设备中安装未在开发者帐户中注册/与您的应用相关联的应用。 获取iOS设备的UDID,并在开发者帐户中将其注册到您的应用中。 更新您的配置文件并重新生成您的IPA。 用于安装应用程序的应用程序安装介质的问题,即Diawi或任何其他..重新上传您的IPA文件(在源位置更新IPA文件)。 逐个浏览每一个。 你会得到解决方案。 If you ...
  • 一个快速的谷歌告诉我,您正在尝试编译的代码是可以在这里找到的: https : //github.com/cprados/towitoko-linux这绝对是一个Linux驱动程序,并没有在Windows操作系统中工作认真的工作。 我不确定是否有适用于Windows的类似产品。 A quick google tells me that the code you are trying to compile is what can be found here: https://github.com/cprado ...
  • 好问题。 实现此目的的最简单方法是将插件下载到您的计算机,并通过FTP一次性将其添加到网站。 如果您想了解更多信息,我会非常乐意提供详细说明=) 一些主题允许您预安装插件的原因是,因为它们是从头开始构建的。 Wordpress已经构建和编码以执行某些操作,因此如果您希望Wordpress在安装时获取某些插件。 您必须下载Wordpress 3.6并手动编码才能执行此功能。 我希望这能回答你的问题,如果没有,我真的很抱歉。 good question. the easiest way to achieve t ...
  • 将com文件夹放在与 .fla 相同的目录中,在代码中,在顶部,使用import导入文件: import com.coreyoneil.collision.*; 查看文件,看起来您现在可以调用以下函数: CDK.addItem(), CDK.removeItem(), CollisionGroup.checkCollisions(), CollisionList.swapTarget(target), CollisionList.checkCollisions(), etc. 阅读更多 Put the ...
  • 您可能需要检查您的IE安全设置:默认情况下,未签名的ActiveX控件将被忽略。 这是另一种可能性: 您是否将您的控件标记为“对于脚本安全”和“对于初始化安全”? 我不确定这是否是您遇到的问题,因为1)您的示例HTML代码未显示您在脚本中使用该控件,并且2)所述HTML代码段未显示您设置了控件属性。 然而,这是一个常见的陷阱,所以如果我是你,我会看看。 IIRC可以通过实现IObjectSafety接口或使用注册表设置来实现。 这和这两个指针让你开始。 You might want to check you ...
  • PSCX(2.0)以zip形式提供,您只需将zip文件的内容复制到您的模块文件夹 - $env:Home\Documents\WindowsPowerShell\Modules (对于用户)或$PSHome\Modules (对于系统) ) - 当你想使用它时,发出import-module pscx 。 阅读发行说明以获取更多详细信息。 PSCX (2.0) is available as a zip and all you have to do is copy the contents of the z ...
  • 在此处下载,解压缩,然后将文件复制到开发系统的根目录中。 不要将其安装在生产系统上。 Download it here, unzip it, and copy the files into the root directory of your development system. Don't install it on a production system.
  • 只需将新JDK安装在不同的目录中,就可以在一台计算机上安装许多不同的JVM和版本。 您不应该影响任何其他用户。 相关: 如何安装第二个JVM? Just install the new JDK in a different directory, you can have many different JVMs and versions installed on one computer. You shouldn't affect any of the other users. Related: How to ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)