problem about shapedrawable-Collection of common programming errors


  • shaylh
    android android-xml radial-gradients shapedrawable
    I’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:<?xml version=”1.0″ encoding=”utf-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android”android:shape=”rectangle” ><gradientandroid:endColor=”#000″android:gradientRadius=”50%p”android:startColor=”#5d2456″android:type=”radial” /> </shape>But it doens’t seem to work. if I remove the

  • DixieFlatline
    android widget remoteview shapedrawable
    I receive color for my texview’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

Web site is in building