Android的绘制讲话泡沫 [英] Android drawable speech bubble

查看:103
本文介绍了Android的绘制讲话泡沫的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看了好几天,找不到我如何可以得出一个泡沫或者平局9片图像是作为背景使用任何好的线索。我是一个糟糕的艺术家--Can谁能帮助?

I've looked for days and can not find any good leads on how I can draw a bubble or where a draw 9 patch images is to use as a background. i am a terrible artist --Can anyone help?

我找到了最好的样品是在这里计算器,但它写在目标C

the best sample i found is here on stackoverflow, but it's written in objective c

如何绘制"讲话泡沫"在iPhone?

感谢您

推荐答案

下面是一个简单的讲话泡沫绘我做了。我们希望,它开始有人朝着正确的方向。这可绘制在需要使用的至少70-80dp高度和类似最小宽度视图正确显示。

Here is a simple speech bubble drawable I made. Hopefully, it's start in the right direction for someone. The view that this drawable is used in needs a height of at least 70-80dp and a similar minimum width to show properly.

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

    <item android:top="30dp">
        <rotate
            android:fromDegrees="-45"
            android:pivotX="0%"
            android:pivotY="0%"
            android:toDegrees="0" >
            <shape android:shape="rectangle" >
                <solid android:color="#CCC" />
            </shape>
        </rotate>
    </item>
    <item android:left="20dp">
        <shape android:shape="rectangle" >
            <solid android:color="#CCC" />

            <corners android:radius="5dp" />
        </shape>
    </item>

</layer-list>

Android的可绘制离开,他们是绘制任何稍微复杂的是如何使用的术语来了很多有待改进。

Android Drawables leave a lot to be desired in terms of how usable they are for drawing anything even slightly complex.

这篇关于Android的绘制讲话泡沫的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆