You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitProject1/01src/net/micode/notes/widget/NoteWidgetProvider_4x.java....

65 lines
3.0 KiB

<html>
<head>
<title>NoteWidgetProvider_4x.java</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.s0 { color: #8c8c8c; font-style: italic;}
.s1 { color: #080808;}
.s2 { color: #0033b3;}
</style>
</head>
<body bgcolor="#ffffff">
<table CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#c0c0c0" >
<tr><td><center>
<font face="Arial, Helvetica" color="#000000">
NoteWidgetProvider_4x.java</font>
</center></td></tr></table>
<pre><span class="s0">/*
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
*
* Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/</span>
<span class="s2">package </span><span class="s1">net.micode.notes.widget;</span>
<span class="s2">import </span><span class="s1">android.appwidget.AppWidgetManager;</span>
<span class="s2">import </span><span class="s1">android.content.Context;</span>
<span class="s2">import </span><span class="s1">net.micode.notes.R;</span>
<span class="s2">import </span><span class="s1">net.micode.notes.data.Notes;</span>
<span class="s2">import </span><span class="s1">net.micode.notes.tool.ResourceParser;</span>
<span class="s2">public class </span><span class="s1">NoteWidgetProvider_4x </span><span class="s2">extends </span><span class="s1">NoteWidgetProvider {</span>
<span class="s1">@Override</span>
<span class="s2">public void </span><span class="s1">onUpdate(Context context, AppWidgetManager appWidgetManager, </span><span class="s2">int</span><span class="s1">[] appWidgetIds) {</span>
<span class="s2">super</span><span class="s1">.update(context, appWidgetManager, appWidgetIds);</span>
<span class="s1">}</span>
<span class="s2">protected int </span><span class="s1">getLayoutId() {</span>
<span class="s2">return </span><span class="s1">R.layout.widget_4x;</span>
<span class="s1">}</span>
<span class="s1">@Override</span>
<span class="s2">protected int </span><span class="s1">getBgResourceId(</span><span class="s2">int </span><span class="s1">bgId) {</span>
<span class="s2">return </span><span class="s1">ResourceParser.WidgetBgResources.getWidget4xBgResource(bgId);</span>
<span class="s1">}</span>
<span class="s1">@Override</span>
<span class="s2">protected int </span><span class="s1">getWidgetType() {</span>
<span class="s2">return </span><span class="s1">Notes.TYPE_WIDGET_4X;</span>
<span class="s1">}</span>
<span class="s1">}</span>
</pre>
</body>
</html>