Widgets基础篇(上)

文章参照自:<wbr style="line-height:25px"><a target="_blank" rel="nofollow" href="http://developer.android.com/guide/topics/appwidgets/index.html" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">http://developer.android.com/guide/topics/appwidgets/index.html</a> <div style="line-height:25px"> <div style="line-height:25px"><span style="line-height:25px"><span style="font-size:16px; line-height:28px">一、前言</span></span></div> <div style="line-height:25px"><span style="color:#003366; line-height:25px">所谓App Widgets就是微型应用程序的意思,它可以嵌入在其他应用程序(如主屏幕),并能定期更新其View。</span></div> <div style="line-height:25px"><span style="color:#003366; line-height:25px">这些View被当成用户界面的小部件,您可以使用App Widget provider来发布App Widgets。</span></div> <div style="line-height:25px"> <span style="color:#003366; line-height:25px">一个能容纳其他的App Widgets的应用程序的组件,我们称之为App Widget host。</span><span style="line-height:25px">图1</span><span style="color:#003366; line-height:25px">就是一个音乐App Widget的截图。</span> </div> <div style="line-height:25px"><span style="line-height:25px">图1</span></div> </div> <div style="line-height:25px"> <div style="line-height:25px; font-weight:bold"><img alt="Widgets基础篇(上) - hubingforever - 民主与科学" src="http://developer.android.com/images/appwidget.png" style="line-height:25px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial; max-width:100%; margin-top:0px; margin-right:10px; margin-bottom:0px; margin-left:0px"></div> <span style="color:#000080; line-height:25px">在下面的文章中,我们将讲述如何使用App Widget provider来发布App Widget</span> </div> <div style="line-height:25px"><span style="line-height:25px"><span style="font-size:16px; line-height:28px">二、基本原理</span></span></div> <div style="line-height:25px"><span style="color:#003366; line-height:25px">为了创建一个App Widget,你需要以下三部分:</span></div> <div style="line-height:25px"><span style="line-height:25px">AppWidgetProviderInfo</span></div> <div style="line-height:25px"><span style="color:#000080; line-height:25px">AppWidgetProviderInfo用于对App Widgets的元数据(metadata)进行描述,如App Widgets的布局,更新频率,和AppWidgetProvider类。它应该是在XML中定义。</span></div> <div style="line-height:25px"><span style="line-height:25px">AppWidgetProvider</span></div> <div style="line-height:25px"> <div style="line-height:25px; color:rgb(0,0,128)">AppWidgetProvider定义了一些基本方法,通过这些方法你可以很方便和App Widget进行交互。</div> <div style="line-height:25px; color:rgb(0,0,128)">AppWidgetProvider基于广播事件。当App Widget进行更新,启用,禁用和删除时,在AppWidgetProvider中,您将收到其对应的广播。</div> <div style="line-height:25px"><span style="line-height:25px">视图布局文件</span></div> <div style="line-height:25px; color:rgb(0,0,128)">为了让App Widget能进行显示,我们还需要为App Widget的提供一个布局文件</div> <div style="line-height:25px"><span style="color:#003366; line-height:25px">另外,你还可以实现一个用于对App Widget进行配置的Activity.该Activity是可选的,当用户添加App Widget时,该Acitivity将被启动。通过它可以在App Widget被创建时,做一些对App Widget的设置。这里的设置是指和App Widget的事务相关的设置,不是指AppWidgetProviderInfo的内容。</span></div> </div> <div style="line-height:25px"><span style="line-height:25px"><span style="font-size:16px; line-height:28px">三、在Manifest中声明App Widget</span></span></div> <div style="line-height:25px"> <span style="color:#003366; line-height:25px">首先,需要在你的应用程序的</span><span style="color:#0000ff; line-height:25px">AndroidManifest.xm</span><span style="color:#003366; line-height:25px">文件中声明一个</span><span style="line-height:25px; font-family:monospace"><a rel="nofollow" href="http://developer.android.com/reference/android/appwidget/AppWidgetProvider.html" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">AppWidgetProvider</a></span><span style="color:#003366; line-height:25px">类,</span><span style="font-size:13px; line-height:23px">比如<span style="line-height:23px">示例1.</span></span> </div> <div style="line-height:25px"><span style="font-size:13px; line-height:23px"><span style="line-height:20px"><span style="line-height:23px">示例1</span></span></span></div> <div style="line-height:25px"> <div style="line-height:23px; font-size:13px; color:rgb(0,0,255)">&lt;receiver android:name="ExampleAppWidgetProvider" &gt;</div> <div style="line-height:23px; font-size:13px; color:rgb(0,0,255)"> &lt;intent-filter&gt;</div> <div style="line-height:23px; font-size:13px; color:rgb(0,0,255)"> &lt;action android:name="android.appwidget.action.APPWIDGET_UPDATE" /&gt;</div> <div style="line-height:23px; font-size:13px; color:rgb(0,0,255)"> &lt;/intent-filter&gt;</div> <div style="line-height:23px; font-size:13px; color:rgb(0,0,255)"> &lt;meta-data android:name="android.appwidget.provider"</div> <div style="line-height:23px; font-size:13px; color:rgb(0,0,255)"> android:resource="@xml/example_appwidget_info" /&gt;</div> <div style="line-height:23px; font-size:13px; color:rgb(0,0,255)">&lt;/receiver&gt;</div> <div style="line-height:23px; font-size:13px"> <div style="line-height:23px"><span style="color:#000080; line-height:23px">&lt;receiver&gt;元素的android:name属性必须要进行设置, 该属性说明了我将使用哪个AppWidgetProvidere来提供App Widget。</span></div> <div style="line-height:23px"><span style="color:#000080; line-height:23px">&lt;intent-filter&gt;元素必须包含android:name属性为"android.appwidget.action.APPWIDGET_UPDATE"的Action,</span></div> <div style="line-height:23px"><span style="color:#000080; line-height:23px">即&lt;action android:name="android.appwidget.action.APPWIDGET_UPDATE" /&gt;。该属性说明了AppWidgetProvider可以接收<a target="_blank" rel="nofollow" href="http://developer.android.com/reference/android/appwidget/AppWidgetManager.html#ACTION_APPWIDGET_UPDATE" style="color:rgb(207,121,28); line-height:23px; text-decoration:none">ACTION_APPWIDGET_UPDATE</a>广播。</span></div> <div style="line-height:23px"><span style="color:#000080; line-height:23px">该广播是唯一你必须要声明接受的广播。<a target="_blank" rel="nofollow" href="http://developer.android.com/reference/android/appwidget/AppWidgetManager.html" style="color:rgb(207,121,28); line-height:23px; text-decoration:none">AppWidgetManager</a>能自动的把其他所有的App Widget广播发送到AppWidgetProvider</span></div> </div> <div style="line-height:23px; font-size:13px"> <div style="line-height:23px; color:rgb(0,0,128)">在&lt;meta-data&gt;元素中,必须要指定AppWidgetProviderInfo资源文件,必须要定义以下2个属性:</div> <div style="line-height:23px"> <span style="color:#000080; line-height:23px"> </span><span style="line-height:23px"><span style="color:#ff6600; line-height:23px">* android:name</span></span><span style="color:#000080; line-height:23px">- 它用于定义metadata元素的名字. 必须把该属性设置为“android.appwidget.provider”以表明该&lt;meta-data&gt;元素是用于描述AppWidgetProviderInfo资源文件位置的.</span> </div> <div style="line-height:23px"> <span style="line-height:23px; color:rgb(0,0,128)"> <span style="line-height:23px"></span></span><span style="color:#ff6600; line-height:23px"><span style="line-height:23px">* android:resource</span></span><span style="color:#000080; line-height:23px"><span style="line-height:23px"></span>-该属性用于说明AppWidgetProviderInfo资源文件的位置。</span> </div> </div> <div style="line-height:25px"><span style="line-height:25px"><span style="font-size:16px; line-height:28px">四、编写AppWidgetProviderInfo配置文件</span></span></div> <div style="line-height:25px"> <div style="line-height:23px; font-size:13px; color:rgb(0,0,128)">AppWidgetProviderInfo用于定义App Widget的基本属性,如显示的最小尺寸,其初始布局资源,更新频率,</div> <div style="line-height:23px; font-size:13px; color:rgb(0,0,128)">和(可选)configuration Activity,该Activity将在其App Widget被创建时被启动。</div> <div style="line-height:23px; font-size:13px; color:rgb(0,0,128)">AppWidgetProviderInfo的定义必须在一个只有单一的&lt;appwidget-provider&gt;元素的XML资源文件中进行,该文件必须放在res/xml目录下。</div> <div style="line-height:23px; font-size:13px"> <span style="line-height:23px">示例2</span><span style="color:#000080; line-height:23px">:</span> </div> <div style="line-height:23px; font-size:13px"> <div style="line-height:23px"><span style="color:#0000ff; line-height:23px">&lt;appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"</span></div> <div style="line-height:23px"><span style="color:#0000ff; line-height:23px"> android:minWidth="294dp"</span></div> <div style="line-height:23px"><span style="color:#0000ff; line-height:23px"> android:minHeight="72dp"</span></div> <div style="line-height:23px"><span style="color:#0000ff; line-height:23px"> android:updatePeriodMillis="86400000"</span></div> <div style="line-height:23px"><span style="color:#0000ff; line-height:23px"> android:previewImage="@drawable/preview"</span></div> <div style="line-height:23px"><span style="color:#0000ff; line-height:23px"> android:initialLayout="@layout/example_appwidget"</span></div> <div style="line-height:23px"><span style="color:#0000ff; line-height:23px"> android:configure="com.example.android.ExampleAppWidgetConfigure"</span></div> <div style="line-height:23px"><span style="color:#0000ff; line-height:23px"> android:resizeMode="horizontal|vertical"&gt;</span></div> <div style="line-height:23px"><span style="color:#0000ff; line-height:23px">&lt;/appwidget-provider&gt;</span></div> </div> <div style="line-height:25px"><span style="font-size:13px; line-height:23px"><span style="line-height:20px"><span style="color:#000080; line-height:23px">以下是关于</span><span style="color:#ff6600; line-height:23px">&lt;appwidget-provider&gt;</span>一些<span style="color:#000080; line-height:23px">属性的介绍:</span></span></span></div> </div> </div> <div style="line-height:25px"> <span style="font-size:13px; color:#ff6600; line-height:23px"><span style="line-height:23px">minWidth</span></span><span style="font-size:13px; color:#000080; line-height:23px">和</span><span style="font-size:13px; color:#ff6600; line-height:23px"><span style="line-height:23px">minHeight</span></span><span style="font-size:13px; color:#000080; line-height:23px">属性用于说明App Widget在屏幕上至少要占用多大的空间 。</span> </div> <div style="line-height:25px"><span style="font-size:13px; color:#000080; line-height:23px">默认的Home screen在放置App Widgets时,是以网格为基本单位,而不是以像素,这里的网格是指拥有一定的像素的长方形区域。</span></div> <div style="line-height:25px"><span style="font-size:13px; color:#000080; line-height:23px">因为home屏幕的布局方向可能改变(网格的大小就会随之改变),所以你应该考虑最坏的情况,此时网格拥有74个像素的长和高。</span></div> <div style="line-height:25px"><span style="font-size:13px; color:#000080; line-height:23px">然而你必须减去2个像素,以便避免在计算网格数量时,对像素进行取整,发生错误。</span></div> <div style="line-height:25px"> <span style="font-size:13px; color:#000080; line-height:23px">你应该使用下面的公式计算</span><span style="line-height:20px; color:rgb(0,0,255); font-size:13px">android:minWidth</span><span style="line-height:20px; color:rgb(0,0,128); font-size:13px">和</span><span style="line-height:20px; color:rgb(0,0,255); font-size:13px">android:minHeight</span><span style="line-height:20px; font-size:13px"><span style="color:#000080; line-height:23px">:</span></span> </div> <div style="line-height:25px"><span style="font-size:13px; color:#000080; line-height:23px"><span style="line-height:20px">(number of cells * 74) - 2</span></span></div> <div style="line-height:25px"> <span style="font-size:13px; color:#000080; line-height:23px"><span style="line-height:20px">根据上面的公式,如果想你的App Widget占用</span></span><span style="line-height:20px; color:rgb(0,0,128); font-size:13px">4个网格的宽,</span><span style="font-size:13px; color:#000080; line-height:23px"><span style="line-height:20px">1个网格的高话,那么</span></span><span style="line-height:20px; color:rgb(0,0,255); font-size:13px">android:minWidth</span><span style="line-height:20px; color:rgb(0,0,128); font-size:13px">和</span><span style="line-height:20px; color:rgb(0,0,255); font-size:13px">android:minHeigh</span><span style="line-height:20px; font-size:13px"><span style="color:#000080; line-height:23px">t应该分别为</span></span><span style="line-height:20px; color:rgb(0,0,255); font-size:13px">"294dp"</span><span style="line-height:20px; font-size:13px"><span style="color:#000080; line-height:23px">和</span></span><span style="line-height:20px; color:rgb(0,0,255); font-size:13px">"72dp"</span> </div> <div style="line-height:25px"> <span style="font-size:13px; color:#000080; line-height:23px"><span style="line-height:20px">注意:为了让你的App Widget能在各类平台上运行,你的App Widget不要超过4X4网格的尺寸。关于App Widget的设计的更多内容请参考</span></span><a rel="nofollow" href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html#sizes" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">App Widget Design Guidelines</a> </div> <div style="line-height:25px"> <span style="line-height:25px"><span style="color:#ff6600; line-height:25px">updatePeriodMillis</span></span><span style="color:#000080; line-height:25px">属性用于说明App Widget框架请求</span><span style="color:#0000ff; line-height:25px">AppWidgetProvider</span><span style="color:#000080; line-height:25px">的</span><span style="color:#0000ff; line-height:25px">onUpdate()</span><span style="color:#000080; line-height:25px">方法来更新</span><span style="color:#0000ff; line-height:25px">App Widget</span><span style="color:#000080; line-height:25px">的频率。但是这个频率是无法完全保证的,我们建议尽量减少更新的频率。有时可能一小时才更新一次,以便节约电池。你也可以提供一个配置,让用户自己设置更新的频率。有些人可能想15分钟就更新股票的价格,而有些人仅想1天就更新股票4次。</span> </div> <div style="line-height:25px"> <span style="color:#000080; line-height:25px">注意:如果手机在处于休眠状态时,而对App Widget进行更新的时间有到了,这时设备将醒来以便进行App Widget的更新。如果更新频率低于一个小时一次的话,并不会引起明显的电池消耗。如果你的更新非常频繁或你不想手机在处于休眠时还进行App Widget更新的话,请通过一个alarm来进行更新。你可以用</span><code style="line-height:25px"><a rel="nofollow" href="http://developer.android.com/reference/android/app/AlarmManager.html" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">AlarmManager</a></code><span style="line-height:25px; color:rgb(0,0,128)">来设置一个定期发送</span><span style="line-height:25px; color:rgb(0,0,255)">AppWidgetProvider</span><span style="color:#000080; line-height:25px">的Intent的Alarm,且把Alarm的类型设置为</span><code style="line-height:25px"><a rel="nofollow" href="http://developer.android.com/reference/android/app/AlarmManager.html#ELAPSED_REALTIME" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">ELAPSED_REALTIME</a></code>or<code style="line-height:25px"><a rel="nofollow" href="http://developer.android.com/reference/android/app/AlarmManager.html#RTC" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">RTC</a>,<span style="color:#000080; line-height:25px">这两种类型的Alarm只有在系统处于awake状态才会发送。另外此时,要把</span></code><span style="line-height:20px; color:rgb(0,0,255); font-size:13px">android:updatePeriodMillis</span><span style="line-height:20px; font-size:13px"><span style="color:#000080; line-height:23px">设置为</span></span><span style="line-height:20px; color:rgb(0,0,255); font-size:13px">"0"</span> </div> <div style="line-height:25px"><span style="font-size:13px; line-height:23px"><span style="line-height:20px"><span style="line-height:23px; color:rgb(255,102,0)"><span style="line-height:23px">initialLayout</span></span><span style="color:#000080; line-height:23px">属性用于设置App Widget的布局文件。</span></span></span></div> <div style="line-height:25px"><span style="font-size:13px; line-height:23px"><span style="color:#000080; line-height:23px">configure属性用于说明在App Widget在被添加到Home Screen时,哪个configure Activity将首先启动。这是一个可选属性,关于次的更多内容请阅读后文。</span></span></div> <div style="line-height:25px"><span style="font-size:13px; line-height:23px"><span style="color:#ff6600; line-height:23px"><span style="line-height:23px">previewImage</span></span><span style="color:#000080; line-height:23px">属性在Android 3.0版本中才被添加,它用于指明 App Widget的预览图片,它用于在用户选中该App Widget的图标,打算添加该App Widget时,进行显示,以便用户了解该App Widget的界面。如果没提供预览图标的话,显示的将是你的App Widget的启动图标。该属性和AndroidManifest.xml中的&lt;receiver&gt;元素的android:previewImage的属性一致。关于此的更多内容请参照后文。</span></span></div> <div style="line-height:25px"><span style="font-size:13px; line-height:23px"><span style="color:#000080; line-height:23px">The</span><span style="line-height:23px"><span style="color:#ff6600; line-height:23px">autoAdvanceViewId</span></span><span style="color:#000080; line-height:23px">attribute specifies the view ID of the app widget subview that should be auto-advanced by the widget's host. Introduced in</span><span style="color:#0000ff; line-height:23px">Android 3.0</span><span style="color:#000080; line-height:23px">.</span></span></div> <div style="line-height:25px"><span style="font-size:13px; line-height:23px"><span style="color:#ff6600; line-height:23px"><span style="line-height:23px">resizeMode</span></span><span style="color:#000080; line-height:23px">属性在Android 3.1中才被添加,它用于说明App Widget重新调整大小的规则。通过该属性,你可以设置在什么方向允许调整App Widget的大小,可以是垂直、水平、或同时垂直和水平两个方向。用户可以按住App Widget来显示大小调整handle,通过在水平或垂直方向拖动handle来调整</span></span></div> <div style="line-height:25px"><span style="font-size:13px; line-height:23px"><span style="color:#000080; line-height:23px">App Widget在垂直或水平方向的尺寸。</span><span style="color:#ff6600; line-height:23px">resizeMode</span><span style="color:#000080; line-height:23px">属性的值可以是"</span><span style="color:#0000ff; line-height:23px">horizontal</span><span style="color:#000080; line-height:23px">", "</span><span style="color:#0000ff; line-height:23px">vertical</span><span style="color:#000080; line-height:23px">", "</span><span style="color:#0000ff; line-height:23px">none</span><span style="color:#000080; line-height:23px">"和"</span><span style="color:#0000ff; line-height:23px">horizontal</span>|<span style="color:#0000ff; line-height:23px">vertical</span><span style="color:#000080; line-height:23px">"</span></span></div> <div style="line-height:25px"><span style="font-size:13px; line-height:23px"><span style="line-height:20px"><span style="color:#ff6600; line-height:23px"><span style="line-height:23px">icon</span></span><span style="color:#000080; line-height:23px">属性用于说明你的AppWidget在AppWidget picker列表中显示的图标,它应该和AndroidManifest.xml中的&lt;receiver&gt;元素的android:</span><span style="color:#ff6600; line-height:23px">icon</span><span style="color:#000080; line-height:23px">的属性一致</span></span></span></div> <div style="line-height:25px"><span style="font-size:13px; line-height:23px"><span style="line-height:23px"><span style="color:#ff6600; line-height:23px">label</span></span><span style="color:#000080; line-height:23px">属性用于说明你的AppWidget在AppWidget picker列表中显示的名字,它应该和AndroidManifest.xml中的&lt;receiver&gt;元素的android:</span><span style="color:#ff6600; line-height:23px">label</span><span style="color:#000080; line-height:23px">的属性一致。</span></span></div> <div style="line-height:25px"> <span style="font-size:13px; line-height:23px"><span style="color:#000080; line-height:23px">关于</span></span><span style="line-height:20px; font-size:13px"><span style="color:#ff6600; line-height:20px">&lt;appwidget-provider&gt;</span><span style="color:#000080; line-height:20px">属性的更多内容请参照</span></span><span style="line-height:25px; font-family:monospace"><a rel="nofollow" href="http://developer.android.com/reference/android/appwidget/AppWidgetProviderInfo.html" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">AppWidgetProviderInfo</a></span> </div> <div style="line-height:25px"><span style="font-size:16px; line-height:28px"><span style="line-height:28px">五、编写App Widget布局文件</span></span></div> <div style="line-height:25px"> <span style="font-size:13px; line-height:23px"><span style="color:#000080; line-height:23px">你必须在XML文件中定义你的App Widget的布局文件,并把它保存在res/layout/目录下。你可以在 App Widget中使用如下的View,但是请你在开始你的App Widget的布局时请阅读</span></span><a rel="nofollow" href="http://developer.android.com/guide/practices/ui_guidelines/widget_design.html" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">App Widget Design Guidelines</a>.</div> <div style="line-height:25px"> <span style="line-height:20px; color:rgb(0,0,128); font-size:13px">如果你熟悉在XML中如何进行布局文件的编写,那么编写App Widget布局文件将非常的简单。因为App Widget的布局是基于</span><span style="line-height:25px; font-family:monospace"><a rel="nofollow" href="http://developer.android.com/reference/android/widget/RemoteViews.html" style="color:rgb(207,121,28); line-height:25px; text-decoration:none">RemoteViews</a>对象,</span><span style="line-height:20px; font-size:13px"><span style="color:#000080; line-height:23px">所以它并不能支持所有的View.</span></span> </div> <div style="line-height:25px"><span style="font-size:13px; color:#000080; line-height:23px"><span style="line-height:20px">RemoteViews对象支持如下的一些View及其子类:</span></span></div> <div style="line-height:25px"> <span style="font-size:13px; color:#000080; line-height:23px"><span style="line-height:20px"></span></span> <ul style="line-height:23px; margin-top:5px; margin-right:0px; margin-bottom:5px; margin-left:40px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px"> <li style="line-height:23px"><code style="line-height:21px"><a rel="nofollow" href="http://developer.android.com/reference/android/widget/FrameLayout.html" style="color:rgb(207,121,28); line-height:21px; text-decoration:none">FrameLayout</a></code></li> <li style="line-height:23px"><code style="line-height:21px"><a rel="nofollow" href="http://developer.android.com/reference/android/widget/LinearLayout.html" style="color:rgb(207,121,28); line-height:21px; text-decoration:none">LinearLayout</a></code></li> <li style="line-height:23px"><code style="line-height:21px"><a rel="nofollow" href="http://developer.android.com/reference/android/widget/RelativeLayout.html" style="color:rgb(207,121,28); line-height:21px; text-decoration:none">RelativeLayout</a></code></li> </ul> <ul style="line-height:23px; margin-top:5px; margin-right:0px; margin-bottom:5px; margin-left:40px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px"> <li style="line-height:23px"><code style="line-height:21px"><a rel="nofollow" href="http://developer.android.com/reference/android/widget/AnalogClock.html" style="color:rgb(207,121,28); line-height:21px; text-decoration:none">AnalogClock</a></code></li> <li style="line-height:23px"><code style="line-height:21px"><a rel="nofollow" href="http://developer.android.com/reference/android/widget/Button.html" style="color:rgb(207,121,28); line-height:21px; text-decoration:none">Button</a></code></li> <li style="line-height:23px"><code style="line-height:21px"><a rel="nofollow" href="http://developer.android.com/reference/android/widget/Chronometer.html" style="color:rgb(207,121,28); line-height:21px; text-decoration:none">Chronometer</a></code></li> <li style="line-height:23px"><code style="line-height:21px"><a rel="nofollow" href="http://developer.android.com/reference/android/widget/ImageButton.html" style="color:rgb(207,121,28); line-height:21px; text-decoration:none">ImageButton</a></code></li> <li style="line-height:23px"><code style="line-height:21px"><a rel="nofollow" href="http://developer.android.com/reference/android/widget/ImageView.html" style="color:rgb(207,121,28); line-height:21px; text-decoration:none">ImageView</a></code></li> <li style="line-height:23px"><code style="line-height:21px"><a rel="nofollow" href="http://developer.android.com/reference/android/widget/ProgressBar.html" style="color:rgb(207,121,28); line-height:21px; text-decoration:none">ProgressBar</a></code></li> <li style="line-height:23px"><code style="line-height:21px"><a rel="nofollow" href="http://developer.android.com/reference/android/widget/TextView.html" style="color:rgb(207,121,28); line-height:21px; text-decoration:none">TextView</a></code></li> <li style="line-height:23px"><code style="line-height:21px"><a rel="nofollow" href="http://developer.android.com/reference/android/widget/ViewFlipper.html" style="color:rgb(207,121,28); line-height:21px; text-decoration:none">ViewFlipper</a></code></li> </ul> </div> </wbr>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值