使ってみる 初めてのアプリを作成することから始めてみましょう。トレーニング コースを活用して理解を深めるほか、ご自身でアプリ開発を習得することもできます。
2011年02月02日21:43 カテゴリRemoteViews RemoteViewsの仕組み AppWidgetProviderで使っているRemoteViewsクラスの仕組みについて調べてみた。 Widgetは、表示領域を提供するAppWidgetHost(大抵はホームアプリ)に、部品を提供するAppWidgetProviderから表示情報を送る形で構成されている。 ホームアプリとAppWidgetProviderは別プロセスなので、AppWidgetManager~AppWidgetSeriveを通してBinderでIPCで情報を送っている。 AppWidgetHostではMessageを使って別スレッドで動作しているが、細かいところを省略すると以下のシーケンスになる。 要するにAppWidgetManagerに渡したRemoteViewsがHost側まで渡され、そこでapply(
ベースとなる package は android.app.widget です。 app widget とは、ホームスクリーンのような別のアプリに埋め込むことができるミニチュアアプリのようなもので、新しい Activity を起動せずにアプリケーションのデータやサービスに簡単にすばやくアクセスすることができます。 詳しくは App Widget developer guide を参照すること。 どんなアプリケーションでも app widget provider として app widget を発行できます。app widget を発行するためにアプリケーションが行うことは ACTION_APPWIDGET_UPDATE intent を受け取る BroadcastReceiver と app widget についての metadata を提供することだけです。Android では、Broad
Androidの開発をやっていると、Viewの更新をぐりぐりやる処理を作ったりする。 WidgetのImageViewに対してServiceからRemoteViewを経由して setImageViewBitmapを更新する処理の開発を行っている時にどうもカクカク(処理遅延の様な)したり更新されなかったりする時が有る。 そんな時LOGには !!! FAILED BINDER TRANSACTION !!! が連発している事が多いですが、その原因と対処法について 原因は、RemoteViewのsetImageViewBitmapを呼び出すと引数のBitmapを シリアル化して渡す、その時のメモリが累積してIPCの許容を超えると発生します。 1.RemoteViewをService内で使いまわしている 2.大きな画像をBitmapに指定している 対処法として 1の場合は、 RemoteViews
こんにちは。harukaです。 前回、アドレス帳作成の過程を紹介します!と意気込んだのですが、 アドレス帳よりも遊び心あるティッカーを載せたい!と思い、予定を変更して 今回はティッカーもどきの作り方を紹介します。 具体的にはこんな感じになります。↓↓ わかりにくいかもしれませんが、文字が動いています。 ではこれから具体的な作り方を見ていきます。 基本的なウィジェットの作り方はこちらをご参照ください。 ウィジェットの作り方 | テックファーム まずはじめにティッカーとして表示させる文字列を編集します。 values配下のstring.xmlに表示させたい文字列を追加します。 <string name = "marquee">We wish you a Merry Christmas, And a Happy New Year!!</string> 次にlayout配下のmain.
ベースとなる package は android.app.widget です。 app widget とは、ホームスクリーンのような別のアプリに埋め込むことができるミニチュアアプリのようなもので、新しい Activity を起動せずにアプリケーションのデータやサービスに簡単にすばやくアクセスすることができます。 詳しくは App Widget developer guide を参照すること。 どんなアプリケーションでも app widget provider として app widget を発行できます。app widget を発行するためにアプリケーションが行うことは ACTION_APPWIDGET_UPDATE intent を受け取る BroadcastReceiver と app widget についての metadata を提供することだけです。Android では、Broad
Android開発【SDK】 -1- AppWidget設定画面の作り方ユーザーのカスタマイズをウィジェットに反映するために 前回ホームスクリーンウィジェット(以下AppWidget)の基本は 『AppWidgetProviderを継承』する。 と書かせていただきました。 今回は設定画面についてまとめようと思います。 基本は、 AndroidManifest.xmlとAppWidet用XMLファイルに設定画面に使うべきクラスを定義するRemoteViewsとAppWidgetManager です。 AndroidManifest.xml ・ ・ </activity> <receiver android:name="AppWidgetProviderを継承したクラス名"> <intent-filter> <action android:name="android.appwidget.a
jNTrainのウィジェット対応、結構時間がかかりました。 が、何とか必要最小限の機能は実装できたのでそろそろ公開したいなと思ってます。 この開発がひと段落着けばjWezの開発も始めたいところなので、備忘録としてウィジェット開発時の個人的なポイントをメモメモ。 Androidの基本的な開発に関してはググればいくらでも出てくるので助かるのですが、ビギナー向けなのか、スケルトンを動かしただけでOKとしているサイトも多く、ちょっと実践的な処理を行おうとすると詰まってしまうことも多かったのですね。 特にウィジェットの複数配置(でなおかつそれぞれ違う動作をさせたい場合)に関しては余り言及されてないような気がする。 ■ウィジェットの構成 ●AppWidgetProviderInfo ウィジェットのサイズ、レイアウトxmlの指定、更新間隔を定義しておく。 サイズ違いのウィジェットを複数作成したい場合はこ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く