自定义背景的按钮目前有2种方式实现,矢量和位图。 1. 矢量图形绘制的方式 矢量图形绘制的方式实现简单,适合对于按钮形状和图案要求不高的场合。步骤如下: (a) 使用xml定义一个圆角矩形,外围轮廓线实线、内填充渐变色,xml代码如下。 //bg_alibuybutton_default.xml...
效果图: 1.Activity布局文件: xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawabl...
效果图1: 效果图2: 1.主Activity代码: package com.jun.activity; imp...
效果图: 1.layout布局文件: xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/acti...
放置比较少的ListView组件效果图: Item布局文件 list_view_item.xml 布局文件的内容: xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layo...
效果图: 实现以上圆角ListView有两种方法: 一、我们先来看第一种通过配置文件来生成: 1.设置默认ListView组件背景样式:bg_list_view.xml 文件内容 android:shape="rectangle" > android:dashGap="0.0dip"...
效果图: 1.src文件夹下 ShowActivity.java文件内容: package com.jun.activity; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import com.jun.adapter.MyAdapter; import android.os...
效果图: 1. main.xml文件的内容: android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent" > android:orientation="v...
1.Android 2.3 源代码下载地址:http://download.csdn.net/detail/qq435757399/4550168 2.在Eclipse中:选中框架层中的类 F3 如下: 3.可以进入到配置页面: 选择Attch source 找到下载好的Android 2.3源码压缩包配置进Eclipse 4.重新进行第二步的...