<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>WEBCreate practice!! &#187; android</title>
	<atom:link href="http://study.guidebook.jp/web_create/?feed=rss2&#038;tag=android" rel="self" type="application/rss+xml" />
	<link>http://study.guidebook.jp/web_create</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Wed, 22 May 2013 02:26:09 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://study.guidebook.jp/web_create/?feed=rss2&amp;tag=android" />
		<item>
		<title>AndroidのハックはjavaScriptでやるのがBESTっぽい!!</title>
		<link>http://study.guidebook.jp/web_create/?p=297</link>
		<comments>http://study.guidebook.jp/web_create/?p=297#comments</comments>
		<pubDate>Tue, 14 May 2013 01:12:46 +0000</pubDate>
		<dc:creator>masayoshi</dc:creator>
				<category><![CDATA[javaScript]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://study.guidebook.jp/web_create/?p=297</guid>
		<description><![CDATA[タイトルに横文字ばかりで若干の「ルー語」っぽさが出てしまってますが、先日スマホサイトの構築をしていた時にiPhoneとAndroidでpaddingの数値に誤差が生じてしまい、色々調べてやってみたんですがCSSハックを使 [...]]]></description>
				<content:encoded><![CDATA[<p>タイトルに横文字ばかりで若干の「ルー語」っぽさが出てしまってますが、先日スマホサイトの構築をしていた時にiPhoneとAndroidでpaddingの数値に誤差が生じてしまい、色々調べてやってみたんですがCSSハックを使うというよりはjavaScriptでユーザーエージェントを取得して読ませるCSSを切り替える。という方法が一番しっくりきましたので、そのやり方+他のAndroidハックの紹介をしようと思います。<span id="more-297"></span><br />
&nbsp;<br />
まずは<a href="https://github.com/rafaelp/css_browser_selector" target="_blank">配布元サイト</a>からファイルをダウンロードしてきてください。解凍後&lt;head&gt;の中に下記のソースコードを記述します。</p>
<pre class="brush: xml; title: ; notranslate">
&lt;script src=&quot;css_browser_selector.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
<p>準備はこれでOKです。あとはアンドロイドで別の記述をしたいセレクターに「.android」を頭につけて記述する。</p>
<pre class="brush: css; title: ; notranslate">

p{
  text-align:right;
}

.android p{
  text-align:center;/*for-Android-*/
}
</pre>
<p>上記の様にCSSを書くとAndroidで観たときだけ&lt;p&gt;タグの中の文字列は中央揃え、それ以外のブラウザやデバイスで閲覧すると右揃えとなります。(※コメントアウトは分かりやすい様に付けているだけなので、無くても問題ありません。)</p>
<p>そして、このスクリプトのすごい所はブラウザの違いだけでなくOSの違いも判別出来るところです。例えばmacのIEやウインドウズのサファリなどの指定も出来てしまうんです。下記の例はウインドウズのサファリでの指定例です。</p>
<pre class="brush: css; title: ; notranslate">
.win.safari p{
  text-align:center;/*for-Windows safari-*/
}
</pre>
<h3><span style="color: #ff0000;">対応OS</span></h3>
<p>・win &#8211; Microsoft Windows<br />
・linux &#8211; Linux<br />
・mac &#8211; Mac OS<br />
・ipod &#8211; iPod Touch<br />
・iphone &#8211; iPhone<br />
・android &#8211; Android<br />
&nbsp;</p>
<h3><span style="color: #ff0000;">対応ブラウザ</span></h3>
<p>・ie &#8211; Internet Explorer (All versions)<br />
・ie8 &#8211; Internet Explorer 8.x<br />
・ie7 &#8211; Internet Explorer 7.x<br />
・ie6 &#8211; Internet Explorer 6.x<br />
・gecko &#8211; Mozilla, Firefox (all versions), Camino<br />
・opera &#8211; Opera (All versions)<br />
・safari &#8211; Safari<br />
・chrome &#8211; Google Chrome<br />
&nbsp;<br />
これさえあれば、IEだって怖くない!!(笑)。<br />
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://study.guidebook.jp/web_create/?feed=rss2&#038;p=297</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://study.guidebook.jp/web_create/?p=297" />
	</item>
		<item>
		<title>スマホのホーム画面アイコンの作り方</title>
		<link>http://study.guidebook.jp/web_create/?p=279</link>
		<comments>http://study.guidebook.jp/web_create/?p=279#comments</comments>
		<pubDate>Mon, 13 May 2013 03:32:02 +0000</pubDate>
		<dc:creator>masayoshi</dc:creator>
				<category><![CDATA[IT小噺]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://study.guidebook.jp/web_create/?p=279</guid>
		<description><![CDATA[ここ数年で圧倒的にユーザー数が増加したスマートフォン。僕も最初は「いやいや、別にガラケーでいいやん」というスタンスだったんですが、周囲の人のガラケー率の増加に伴いガラケーからiphoneに変えました。今はお金出してアプリ [...]]]></description>
				<content:encoded><![CDATA[<p>ここ数年で圧倒的にユーザー数が増加したスマートフォン。僕も最初は「いやいや、別にガラケーでいいやん」というスタンスだったんですが、周囲の人のガラケー率の増加に伴いガラケーからiphoneに変えました。今はお金出してアプリを買いまくるという、りっぱな信者に成長しました。今回はそんなスマホのホーム画面にサイトオリジナルのブックマークアイコンを表示させようとういお話です。<span id="more-279"></span><br />
&nbsp;<br />
これまでに、web制作をしたことがある方は「ああ、ファビコンでしょ??」ってなると思います。僕も調べるまでは「あれは多分ファビコンじゃない??」って感じでした。・・・が、いくらファビコンを設定しても出ない出ない(笑)。<br />
&nbsp;<br />
<a href="http://study.guidebook.jp/web_create/wp-content/uploads/2013/05/ip_and01.jpg"><img class="aligncenter size-full wp-image-283" alt="ip_and01" src="http://study.guidebook.jp/web_create/wp-content/uploads/2013/05/ip_and01.jpg" width="590" height="295" /></a><br />
&nbsp;<br />
ネットで調べるとすぐに解決策が判明、なんとファビコンじゃーないっっっ!!という落ちでした。前置きはこのくらいにしてさっそく作成していきましょう。<br />
&nbsp;</p>
<h2>表示させるアイコンを作る!!</h2>
<p>なにはともあれ、表示させるものを作らなければ話が進まないのでどのグラフィックソフトでも構わないです。(ｊｐｇ、gif、png、bmpの形式で保存出来れば)僕はフォトショップでやりました。</p>
<p><span style="color: #ff0000;">114px×114px</span>のカンバスで作成してください。正方形であればこのサイズより大きくても構わないらしいのですが、「114×114」が既定サイズらしいのでこのサイズで作成することを推奨します。そしてiphoneの場合(というか、Android持ってないのでAndroidがどうなのかわかりません・・・。ごめんなさい。)角丸にしなくちゃいけないんじゃないの!?って思うかもしれませんが、勝手に角丸に切り抜かれます。なので心配ご無用です。ってか角丸にしかならないんですよねー(笑)。</p>
<p>保存形式はｊｐｇ、gif、png、bmpのどれでもいいらしいんですが一番きれいなんで「png」で保存しましょう。<br />
&nbsp;</p>
<h2>HTMLマークアップ</h2>
<p>&lt;head&gt;内に下記のソースコードを追加してください。</p>
<pre class="brush: xml; title: ; notranslate">
&lt;link rel=&quot;apple-touch-icon&quot; href=&quot;画像パス&quot; /&gt;
</pre>
<p>ちなみに</p>
<pre class="brush: xml; title: ; notranslate">
&lt;link rel=&quot;apple-touch-icon-precomposed&quot; href=&quot;画像パス&quot; /&gt;
</pre>
<p>にするとiphoneの「キラリン☆」って感じのグラデーションを外せます。<br />
&nbsp;</p>
<h2>ファイルのアップ</h2>
<p>&nbsp;<br />
このホーム画面用アイコンは別にどこに配置して貰っても構わないので適宜自分のサイトの適当なところにアイコンをUPしてください。もちろんHTMLもちゃんとUPしてくださいね。<br />
&nbsp;<br />
<a href="http://study.guidebook.jp/web_create/wp-content/uploads/2013/05/ip_and02.jpg"><img class="aligncenter size-full wp-image-287" alt="ip_and02" src="http://study.guidebook.jp/web_create/wp-content/uploads/2013/05/ip_and02.jpg" width="590" height="295" /></a><br />
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://study.guidebook.jp/web_create/?feed=rss2&#038;p=279</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://study.guidebook.jp/web_create/?p=279" />
	</item>
	</channel>
</rss>
