TitaniumのAlloyについて調べたメモ2 までで、だいたいなんとなく、たぶん、わかってきたので、実際にアプリをいじくってみる。 TitaniumのAlloyについて調べたメモ でりんご画像を出すように変えちゃったindexをぜんぶappleに変えて、indexは元通りにする。で、indexにボタンを置いて、それをクリックするとapple画面に遷移するようにしてみる。 index画面とapple画面のファイル構成はこんな感じになっている。 とりあえずViewについてざっくり調べて、ボタンを置けるようにする。 http://docs.appcelerator.com/titanium/3.0/#!/guide/Alloy_Views http://docs.appcelerator.com/titanium/3.0/#!/guide/Alloy_XML_Markup XMLダリー見にき
テーブルビューを使ってると、長押し(longpress)イベントを使いたいことがある。 そんなときどうすればいいのか。試してみた。 longpress or longclick ? 公式サイトのドキュメントを見ると、TableViewRowにlongclickというイベントがあるようだが、これがうまく動かない。 しょうがないのでいろいろ試した結果。以下のようにすると動くっぽい。(iPhone Simulatorのみ動作確認済み) とりあえず、サンプルを作成しつつ見ていく。 (サンプルなので実際に使う場合は、データの追加処理などが必要だろう。) 画面 まず、画面をデザインしておく。 <Alloy> <Collection src="todo" /> <Window class="container"> <TableView dataCollection="todos" onLongpress
あまり情報がない? http://matome.naver.jp/odai/2135869348273901001 参考にした。 僕は「ti.admob-android-2.1.0.zip」をどこからかダウンロードしてきた。 https://github.com/appcelerator/titanium_modules/tree/master/admob/mobile/android/dist かな? 「作成したプロジェクトの直下に手順3のmodulesフォルダをコピー」っていうのがわかりにくい。 解答したものの、modulesフォルダ以下の ・「documentation」フォルダを削除 ・「example」フォルダを削除 を行った。 置くのはmodulesフォルダの中に、androidを入れた。 <android xmlns:android="http://schemas.andro
Titaniumには素晴らしいサポートサイト( http://support.titanium-mobile.jp/ )があるので、これまでQiitaには何も投稿していませんでしたが、先日のユーザー会でこのままでは地味すぎて世間から忘れられてしまいそうだという懸念が提出されましたので、投稿してみます。 で、表題の件ですが。まあ、ありがちですよね。例えば、WebViewを表示して、戻るボタンなどのコントロール用のViewをフッタ部分に表示するとします。 <Alloy> <Window> <WebView id="webview" url="http://www.google.com/" /> <View id="footer"> <Button>戻る</Button> <Button>進む</Button> <Button>再読込</Button> </View> </Window> </A
AlloyとはTitanium用のMVCフレームワークです。 以前のTitaniumではapp.jsから始まり、必要に応じてファイルを分割してrequireとexportを使って読み込んでいくようにしてました。 Alloyを使うとModel、View、Controllerに分かれているので、 どのファイルで何をしているのかなどがわかりやすいです。 今後Titaniumでアプリを開発することがあるのであれば、alloyを使っていきましょう。 Titaniumは遅いとか、なんだかんだでネイティブの方がいいじゃん、みたいなことが結構あったみたいなんですがアプリを作ったことがない状態で2週間程度でアプリを作成できるのでやっぱり便利だなと思いました。 もっともっとはやって、ネイティブと大差ないぐらいになってくれればいいなーと思ってます。他の言語覚えるのが面倒、(;´・д・) Backb
競馬ニュースアプリみたいなのを作る 競馬をやるときに、シンプルにニュースだけ読みたいアプリがあったらいいなと思っていました。そこでTitaniumでRSSフィードを読み込んで表示するだけのものを作ってみることにしました。 ニュース元はJRAが配信しているニュースから引っ張ってきました。 すべてのニュース JRA まだまだ完成度は低いですが、現時点でやってきたことを書いていこうと思います。 フィードを読み込む クエリを作成 var feedURL = "http://www.jra.go.jp/rss/jra-info.rdf"; //読み込み件数 var limit = 5; //読み込むフィードの位置 var offset = 1; var query = "select * from rss where url='"+feedURL+"'limit "+limit+" offset "
Titanium Studio のデフォルトのAndroidエミュレータは重いですよね。 これまではわざわざ実機に転送していたので、アプリが起動するまで約1分半ほどかかっていました。 Titanium Studio から 軽快な Androidエミュレータが起動できるようにしたいなーと常々思っていたのですが、先週の「Titaniumもくもく会」で磯部さん(@k0sukey)から「Genymotion∞ 使った方がいいよ」と教えてもらったので、今回それを試してみようと思います。 なお、今回の操作は @k0sukey さんのまとめたインストールガイドを全面的に参考にさせていただきました。 http://titanium-install-guide-ja.github.io/#environment-06-02 1. Genymotion のインストール 「Genymotion∞」は軽快な An
さあ、いよいよWindowsにTitanium Studioを導入するわよ。 MacOSでも基本同じプロセスだけど、違うところは「MacOSの開発環境だべし!」を参照あれ! Titanium Studio 3.1はバージョンアップを重ね、前提ソフトのインストーラがすべてTitanium Studioのインストーラに内包されたわ。 Titanium Studio 1.xの時代に比べたら、ずいぶん簡単になったわね。 インストール自体は簡単になったけれど、エミュレータやコンパイルがうまく動かなかったり、まだまだ問題点があるわね。 導入するソフトの一覧を記述しておくわ。 すべてTitanium Studio 3.1に内包されているので、個別にインストールする必要はないけれど、導入されるソフトを知っておくことは、重要ね。 Android SDK R22 Java SE Development Kit
AdMobに関して ・Googleアカウントでサクッと登録。 ・アプリをリリースしていなくても利用できる。 ・appcelerator製のモジュールをすぐに利用可能。 ・報酬受取のためにPayPalアカウントを作っておくことを推奨。 ・最初の利用登録の際に審査がある(私の場合は翌日結果到着) ・広告の審査がある。(現在審査中なので後に追記予定) ・Titanium用モジュールを問い合わせて送ってもらう必要がある。(10分で到着) ・Titaniumモジュールに日本語マニュアルが付いてきてきてちょっと幸せ。 ・テスト用の広告コードがマニュアルに乗っているので動作確認がすぐに可能。 ・モジュール自体はAdMobのものと似たような感じ。 モジュールの取得 ※ ここから先は上記のサービスに登録し、広告の登録を済ませたらとゆうことで・・ ・Admob Admob ti.admob-iphone-1.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く