首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

右下标的实现

2012-09-16 
右上标的实现回家休息了20多天 嘿嘿今天看见别人做了一个右上角图标的东西,感觉不错 本以为是用.9.png格式

右上标的实现

回家休息了20多天 嘿嘿今天看见别人做了一个右上角图标的东西,感觉不错 本以为是用.9.png格式实现的原来不是

仔细看了一下原来如下:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
??????? android:layout_width="fill_parent"
??????? android:layout_height="fill_parent">
?
??????? <Button android:id="@+id/discounts_button"
??????????????? android:layout_width="wrap_content"?
??????????????? android:layout_height="wrap_content"?
???????????????
??????????????? android:text="我要进行测试"
??????????????? android:textColor="#FFFFFF"
??????????????? android:textSize="20sp"
???????????????
??????????????? android:layout_marginTop="40dp"
??????????????? android:layout_marginLeft="20dp"/>
?
??????? <RelativeLayout android:layout_width="wrap_content"?
??????????????? android:layout_height="wrap_content"
??????????????? android:layout_gravity="top|left">
?
??????????? <ImageView android:layout_width="wrap_content"?
??????????????????? android:layout_height="wrap_content"
??????????????????? android:adjustViewBounds="true"
??????????????????? android:src="@drawable/a1"
??????????????????? android:layout_centerInParent="true"/>
?
???????????? <TextView android:layout_width="wrap_content"?
?????????????????????????? android:layout_height="wrap_content"
?????????????????????????? android:textStyle="bold"
?????????????????????????? android:text="20"
?????????????????????????? android:layout_centerInParent="true" />
???????? </RelativeLayout>
</FrameLayout>

1 楼 gaomingjun 2010-08-23   提个建议:你要是贴上相应的图示大伙看起来就很直观了。

热点排行