<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>woshidan</author_name>
  <author_url>https://blog.hatena.ne.jp/woshidan/</author_url>
  <blog_title>woshidan's blog</blog_title>
  <blog_url>https://woshidan.hatenablog.com/</blog_url>
  <categories>
    <anon>Android</anon>
    <anon>Drawable</anon>
  </categories>
  <description>前回の続き的なノリで、コードでボタンのStateによって色を変えるように指定するコードを書いてみます。 API21以上の場合 API21以上の場合は、以下のように記述できます。 Button button = (Button) findViewById(R.id.button_bg_code); // 角丸の設定 int roundRadius = getResources().getDimensionPixelSize(R.dimen.button_round_radius); GradientDrawable gradientDrawable = new GradientDrawable(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwoshidan.hatenablog.com%2Fentry%2F2017%2F05%2F24%2F083000&quot; title=&quot;コードでボタンのStateによって色を変えるようにする - woshidan&amp;#39;s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-05-24 08:30:00</published>
  <title>コードでボタンのStateによって色を変えるようにする</title>
  <type>rich</type>
  <url>https://woshidan.hatenablog.com/entry/2017/05/24/083000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
