{"id":3256,"date":"2014-03-20T21:12:13","date_gmt":"2014-03-20T21:12:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/20\/problem-about-shapedrawable-collection-of-common-programming-errors\/"},"modified":"2014-03-20T21:12:13","modified_gmt":"2014-03-20T21:12:13","slug":"problem-about-shapedrawable-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/20\/problem-about-shapedrawable-collection-of-common-programming-errors\/","title":{"rendered":"problem about shapedrawable-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/graph.facebook.com\/633641379\/picture?type=large\" \/><br \/>\nshaylh<br \/>\nandroid android-xml radial-gradients shapedrawable<br \/>\nI&#8217;m trying to create a shape drawable with radial gradient background, with radius that will adjust to the screen size (take a look at the relevant documentation).This is my code:&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt; &lt;shape xmlns:android=&#8221;http:\/\/schemas.android.com\/apk\/res\/android&#8221;android:shape=&#8221;rectangle&#8221; &gt;&lt;gradientandroid:endColor=&#8221;#000&#8243;android:gradientRadius=&#8221;50%p&#8221;android:startColor=&#8221;#5d2456&#8243;android:type=&#8221;radial&#8221; \/&gt; &lt;\/shape&gt;But it doens&#8217;t seem to work. if I remove the<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/2f0086aee0bbb0aaa6545e8a80969494?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDixieFlatline<br \/>\nandroid widget remoteview shapedrawable<br \/>\nI receive color for my texview&#8217;s background from my backend. Then i create shapedrawable with rounded corners like this (in my activity):float[] outerR = new float[] { 7, 7, 7, 7, 7, 7, 7, 7 }; ShapeDrawable sd = new ShapeDrawable(new RoundRectShape( outerR, null, null)); sd.getPaint().setColor(Color.parseColor(myObjectFromBackend.getColor())); myTextView.setBackgroundDrawable(sd);Now i want to do this in my widget, but i cant find the right method.The closest one that i found is:row.setInt(R.id<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>shaylh android android-xml radial-gradients shapedrawable I&#8217;m trying to create a shape drawable with radial gradient background, with radius that will adjust to the screen size (take a look at the relevant documentation).This is my code:&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt; &lt;shape xmlns:android=&#8221;http:\/\/schemas.android.com\/apk\/res\/android&#8221;android:shape=&#8221;rectangle&#8221; &gt;&lt;gradientandroid:endColor=&#8221;#000&#8243;android:gradientRadius=&#8221;50%p&#8221;android:startColor=&#8221;#5d2456&#8243;android:type=&#8221;radial&#8221; \/&gt; &lt;\/shape&gt;But it doens&#8217;t seem to work. if I remove the DixieFlatline android widget remoteview [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3256","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3256"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3256\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}