Notice: Undefined index: adsensem-show-ad in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 280

Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /home/araki/blog.ceed.jp/wp-includes/functions.php on line 3361

Strict Standards: Redefining already defined constructor for class SyntaxHighlighter in /home/araki/blog.ceed.jp/wp-content/plugins/syntax-highlighter/syntax_highlighter.php on line 118

Strict Standards: Redefining already defined constructor for class wokScriptManager in /home/araki/blog.ceed.jp/wp-content/plugins/syntax-highlighter/includes/common-controller.php on line 315

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method adsensem::init() should not be called statically in /home/araki/blog.ceed.jp/wp-includes/plugin.php on line 470

Strict Standards: Non-static method adsensem::setup_is_valid() should not be called statically in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 110

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method adsensem::init_widgets() should not be called statically in /home/araki/blog.ceed.jp/wp-includes/plugin.php on line 470

Notice: Undefined variable: args in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 145

Strict Standards: Non-static method adsensem::register_widget() should not be called statically in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 145

Notice: Undefined variable: _adsensem in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 162

Notice: Undefined variable: args in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 151

Strict Standards: Non-static method adsensem::register_widget() should not be called statically in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 151

Notice: Undefined variable: _adsensem in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 162

Notice: Undefined variable: args in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 151

Strict Standards: Non-static method adsensem::register_widget() should not be called statically in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 151

Notice: Undefined variable: _adsensem in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 162

Notice: Undefined variable: args in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 151

Strict Standards: Non-static method adsensem::register_widget() should not be called statically in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 151

Notice: Undefined variable: _adsensem in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 162

Notice: Undefined variable: args in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 151

Strict Standards: Non-static method adsensem::register_widget() should not be called statically in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 151

Notice: Undefined variable: _adsensem in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 162

Notice: Undefined variable: args in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 151

Strict Standards: Non-static method adsensem::register_widget() should not be called statically in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 151

Notice: Undefined variable: _adsensem in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 162
androidのshapeのバグ | CEED
Notice: Use of undefined constant user_level - assumed 'user_level' in /home/araki/blog.ceed.jp/wp-content/plugins/ultimate_ga_1.6.0/ultimate_ga_1.6.0.php on line 524

androidのshapeのバグ


Notice: get_settings の使用はバージョン 2.1 から非推奨になっています! 代わりに get_option() を使ってください。 in /home/araki/blog.ceed.jp/wp-includes/functions.php on line 3194

Notice: get_settings の使用はバージョン 2.1 から非推奨になっています! 代わりに get_option() を使ってください。 in /home/araki/blog.ceed.jp/wp-includes/functions.php on line 3194

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method adsensem::filter_ads() should not be called statically in /home/araki/blog.ceed.jp/wp-includes/plugin.php on line 192

Strict Standards: Non-static method adsensem::filter_ad_callback() should not be called statically in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 198

Strict Standards: Non-static method adsensem::filter_ad_callback() should not be called statically in /home/araki/blog.ceed.jp/wp-content/plugins/adsense-manager/adsense-manager.php on line 201

Notice: Use of undefined constant user_level - assumed 'user_level' in /home/araki/blog.ceed.jp/wp-content/plugins/ultimate_ga_1.6.0/ultimate_ga_1.6.0.php on line 524

Notice: Array to string conversion in /home/araki/blog.ceed.jp/wp-content/plugins/ultimate_ga_1.6.0/ultimate_ga_1.6.0.php on line 701

Notice: Array to string conversion in /home/araki/blog.ceed.jp/wp-content/plugins/ultimate_ga_1.6.0/ultimate_ga_1.6.0.php on line 701

androidのshapeに関して、APIレベル10以下で左右が逆になるバグがあるのですが、これに関して日本語の情報があまり見当たらなかったので書いておこうと思います。
例えば下記

のような形を描きたい時に、普通に考えれば下のようなXMLを書くと思います。

<shape android:shape="rectangle">
<corners
  android:topLeftRadius="10dp"
  android:topRightRadius="0.1dp"
  android:bottomLeftRadius="10dp"
  android:bottomRightRadius="0.1dp"/>
</shape>

ところが、これを実行すると、APIレベル11(Android3.0)以上では期待通り上のような形が描画されるのですが、APIレベル10以下ではなぜか下記のような形に描画がされます。

あれれれ?な感じですが…
これは、APIレベル10以下のバグで、下辺の左右の指定が逆に扱われてしまうのです。なんともお粗末のバグですが…
で、仕方なく下辺の左右の指定を逆にして

<shape android:shape="rectangle">
<corners
  android:topLeftRadius="10dp"
  android:topRightRadius="0.1dp"
  android:bottomLeftRadius="0.1dp"
  android:bottomRightRadius="10dp"/>
</shape>

こんな風に書くとAPIレベル10以下で正常になるのですが、当然APIレベル11(Android3.0)以上の方がおかしなことになります。
でどうするかというと、drawable-v11 というディレクトリを、res 配下に配置してそれぞれ使い分けられるようにします。
具体的にはdrawable-v11に上のXMLを、drawableに下のXMLを置いてあげると、それぞれのXMLが適用されるので、どちらも丸く収まるという感じです。
ちなみに、0.1dpとしているのは、0dpと指定するとAPIレベル7などで、radiusが効かなくなってしまうためやむを得ず微小なradiusを指定しているものです。
どうにも残念な仕様ですね…

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Notice: Use of undefined constant user_level - assumed 'user_level' in /home/araki/blog.ceed.jp/wp-content/plugins/ultimate_ga_1.6.0/ultimate_ga_1.6.0.php on line 524

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method adsensem::footer() should not be called statically in /home/araki/blog.ceed.jp/wp-includes/plugin.php on line 470
getting health insurance in new york buy clomid online UK major health insurance companies buy levitra uk online what are wells fargo hours buy finasteride affordable health insurance for children accutane no prescription medical center of trinity viagra online uten resept midwestern university wellness center dapoxetine top individual health insurance companies viagra ireland

Notice: Use of undefined constant user_level - assumed 'user_level' in /home/araki/blog.ceed.jp/wp-content/plugins/ultimate_ga_1.6.0/ultimate_ga_1.6.0.php on line 524