Questions tagged [compound-drawables]

40 questions
3
votes
1 answer

CompoundButton Checkbox where/how is the width of checkbox drawable being measured

In an attempt to create a checkbox on the right side I was looking at the code in Android. But I was puzzled at where android was measuring the width for the checkbox icon/drawable. The Checkbox extends the CompoundButton class and only overrides…
pt123
  • 2,146
  • 1
  • 32
  • 57
2
votes
0 answers

Background color on individual view in ListView

I'm building an android GUI and currently i'm building an ListView. I've based the rest of the appearence of my GUI on the backgroundcolor of individual views. I tried to do the same with my layout in the ListView but the commands do nothing. I've…
SverkerSbrg
  • 503
  • 1
  • 9
  • 23
1
vote
2 answers

Check CompundDrawable of TextView with Espresso

I am new to Espresso tests and Android. I am trying to test if the correct Icon is shown next to the text. The icon is set with: public void setLabelTextIcon(@DrawableRes int iconResId) { …
1
vote
1 answer

TextInputEditText - CompoundDrawable is not centered

Im trying to add a suffix to my TextInputEditText by creating a TextDrawable then setting that using compoundDrawable. Everything is going fairly well except the drawable gets clipped outside to right of the component. What could be causing this? So…
1
vote
0 answers

TextView drawableStart wrap_content doesn't work well

I want to display a textview with a compound drawable which wraps the content - the shape and the text. Here is my code:
Vin Norman
  • 2,749
  • 1
  • 22
  • 33
1
vote
1 answer

Drawing background on TextView (not on its full width)

I would like to set a background drawable (or resource) on a TextView, not taking into account its compound drawable width (and paddings). Getting the width of the compound (left one to be more precise), and its paddings should not be a problem,…
DoruAdryan
  • 1,314
  • 3
  • 20
  • 35
1
vote
1 answer

Android: Compound Drawables With Intrinsic Bounds on 4.2.2 and below

I try to use checkbox with left Compound Drawable like this: holder.selCategoryCheckBox.setCompoundDrawablesWithIntrinsicBounds(imageResource, 0, 0,…
Tomas
  • 4,652
  • 6
  • 31
  • 37
1
vote
1 answer

Blink Animation in left drawable of textview in android

I want to set the blink animation, in the compound drawable(left) of textview. i followed the link: http://chiuki.github.io/advanced-android-textview/#/4 its helped me and also working like a charm. but, i failed to achieve blink animation, please…
AlexR
  • 15
  • 6
1
vote
1 answer

setCompoundDrawables on drawable shape with no effect

I'm trying to set an overline to a TextView using Compound Drawables. I've created a line shape in an XML drawable resource which looks like this:
user3523375
  • 153
  • 3
  • 12
1
vote
2 answers

Sony Xperia S (LT26i) does not seem to show compound drawables

We are testing our new app and we use compound drawables for several textviews. Unfortunately the Sony Xperia S (LT26i) ignores setCompoundDrawables & setCompoundDrawablesWithIntrinsicBounds. Can anybody confirm this bug? Or does anybody have a…
Benjamin
  • 451
  • 3
  • 6
1
vote
1 answer

Load image in Compound Drawable From URL

I have a listview with CompoundDrawable, the images in the compound drawable need to be loaded from the web. How can i load images to CompoundDrawable from the URL. i think that i can get bitmap image from the URL convert it into Drawable and then…
null pointer
  • 5,874
  • 4
  • 36
  • 66
1
vote
1 answer

Draw compound drawable outside EditText background

I'm trying to create an EditText with custom background, and a compound drawable to the left, but outside the background (currently it's appearing overlapped to the background); something like this.- Is this possible?
ssantos
  • 16,001
  • 7
  • 50
  • 70
1
vote
1 answer

Get different events on setCompoundDrawables with differnet drawables

I have an EditText in which I'm setting drawables to the right of the EditText. I'm switching those drawables with different scenarios. I have clearText and refreshIcon as my drawables. These both are changing correctly but I'm not able to get…
1
vote
1 answer

DrawableTop not showing drawable

I am trying to use drawableTop to show a picture above a text in a button. My picture is from sdcard, not a drawable. Also, the size of the button may change depending on how many buttons are show. More buttons, smaller buttons, then, smaller…
Carlos Pereira
  • 1,914
  • 6
  • 24
  • 35