九片图像不工作我的设备上? [英] Nine patch image not working on my device?

查看:76
本文介绍了九片图像不工作我的设备上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次用九标图像在我的Andr​​oid应用程序。它使stupit。当我$ Eclipse的布局编辑器p $ PVIEW,它的工作。但是,当我建立在真实的设备(HTC启发4G,HTC资源管理器,...)应用事实并非如此。

This is the first time i use nine-patch image on my android app. It so stupit. When I preview on eclipse layout editor, it work. But when I build the application on real device (HTC Inspire 4g, HTC Explorer,...) it's not.

<LinearLayout
                        android:layout_width="0dip"
                        android:layout_height="fill_parent"
                        android:layout_margin="5dp"
                        android:layout_weight="1"
                        android:background="@drawable/shadow_border"
                        android:gravity="center"
                        android:padding="0dip" >

                        <TextView
                            android:id="@+id/itemdetail_textview_price"
                            style="@style/textview_nomalBold"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="$10"
                            android:textColor="#F00"
                            android:textSize="32dp" />

                        <TextView
                            android:id="@+id/itemdetail_textview_originalPrice"
                            style="@style/textview_nomalBold"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginLeft="15dp"
                            android:text="$20"
                            android:textSize="32dp" />
                    </LinearLayout>

有什么问题吗?

更新:

  • 我写的应用程序为Android 2.2及以上。

  • I am writing the app for Android 2.2 and above.

我的手机采用Android 2.3

My Phones use Android 2.3

推荐答案

我解决了我的自我,但我不明白为什么它的工作原理。

I solved it by my self but I don't understand why it works.

在九个补丁,我画2线在顶部和图像的左边(见2黑线的图片)

In nine-patch, I draw 2 line at the top and the left of image (see 2 black lines at the picture)

这篇关于九片图像不工作我的设备上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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