LoginSignup
1
0

More than 5 years have passed since last update.

titaniumでtabのiconをカスタマイズする時に気をつける事

Last updated at Posted at 2014-03-11

titanium × alloyでtabのiconをカスタマイズしている時に
ちょっとした事でつまり時間をとられたので備忘録として。。

つまったところ

retina display対策としてiphone用に2倍の解像度のアイコンを1つ用意。
iconプロパティからurlを指定して読み込ませたが、画像が大きいままひずんでしまった。。

解決した方法

android用の小さい画像とiphone用の2倍解像度の2つの画像を同じディレクトリに配置するとひずまなく表示できた。
tabicon.png
tabicon@2x.png

alloyで書いてるけどtssは小さいものを読むようにするといいみたい。

"#tab": {
    icon: "tabicon.png"
}

ちなみに参考にしたのはここ

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0