2012-08-01から1ヶ月間の記事一覧
Android Asset Studio という アイコン、Device frame , Action Bar Style Generation 便利なサイトがある。 http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html short cut http://j.mp/androidassetstudio
Mac の環境で動かすアプリ2個 Art Text Lite PaintCode 特にこの PaintCode は、Objective-C のコードにエクスポートしてくれるので、便利
android.widget.CheckedTextView を使った Android 標準の android.R.layout.simple_list_item_single_choice を ArrayAdapter で指定して ListView で表示する方法は、 チェックボックス(or radio)は、右側になってしまう。 とても便利だけど、Web の HTM…
android.app.Service を起動する前に実行中か確認してから起動したい。 ActivityManager で、実行中の service のリストを取得すれば良いだろう。 以下のようにすれば良い。 ActivityManager manager = (ActivityManager)getSystemService(Context.ACTIVITY_…
Bluetooth のペアリングを自動で実行しようと思い、BluetoothDevice の createBond() と、 setPin(byte) を呼ぼうとしたが、Android OSバージョン 2.1 で既には隠されたメソッドになっている。 しかたないので、リフレクションで実行を試してみる。 Method c…
Android 2.3.3 で 相手 Bluetooth 機器のUUID を下記サイトを参考に調べていたら、 http://digitalhacksblog.blogspot.jp/2012/05/android-example-bluetooth-discover-and.html 公式API どおりに、BluetoothDevice.ACTION_UUID (API Level 15) を IntentFil…
Bluetooth 接続履歴のあるデバイス情報取得は、 BluetoothAdapter badapter = BluetoothAdapter.getDefaultAdapter(); Set<BluetoothDevice> set = badapter.getBondedDevices(); で一括取得できるが、新たにスキャンして検出するには、Bluetooth をONにする時と同様に Broa</bluetoothdevice>…
iPad で、パスワード付きの Excel を UIWebView で開こうとすると以下のエラーが出る。 exception: Could not find the end of central directory record EXCEPTION SFUZipEndOfCentralDirectoryError: Could not find the end of central directory record …
今度、試そうかと思ったけど、Logcat は、そのまま使いたいのでやめようかと。。 http://code.google.com/p/android-logging-log4j/
横向きの ListView を作る方法があった。 MITライセンスで公開されてる。 http://www.dev-smart.com/archives/34 このページに書いてある Git-Hub のリンクは切れてるようで、 https://github.com/lempere/Android_HorizontalListView からダウンロードで…
AutoCompleteTextView は、ソフトキーボード入力で、改行キーや Done を押しても キーボードを閉じてくれない。 TextView.OnEditorActionListener で、onEditorAction が false を返すようにしないと キーボードを閉じてくれない。 以下のようにすると、閉じ…
AutoCompleteTextView の紹介を見て参考に作成すると、 ドロップダウンで表示するリストが真っ白で、何が候補に表示されてるのか 見えない、ひどい有様になる。 これでは使いものにならない。 これを解決するのは、android:popupBackground を指定することで…
UIAlertView で表示するメッセージを左寄せにするには、、 以下のように。 UIAlertView* view = [ [UIAlertView alloc] initWithTitle:nil message:@"message" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil ]; ((UILabel *)[[view subviews]…
WebView findAll を実行して、検索ヒットしたワードをハイライトをするためには、 公式API ドキュメントに載ってない setFindIsUp を実行するしかない。 try{ Method m = WebView.class.getMethod("setFindIsUp", Boolean.TYPE); m.invoke(webView, true); }…
Macで Eclipse の補完機能 Windows では、ctrl+SPACEキー を実行しているが、、Macでは、環境設定が必要 (1)システム環境設定で、キーバインドのデフォルトを変更する。 以下のように、「システム環境設定」→ キーを選択 「キーボードショートカッ…