Re: [android-developers] Set bounds for one layer of LayerDrawable?
Thanks Dianne for your input. I've been working on a two drawable solution since earlier today. My motivation for using LayerDrawable was to model Android's ProgressBar, where the layer with id=android:id/progress is either a ClipDrawable or a ScaleDrawable (depending on API level). Thus far with ScaleDrawable and ClipDrawable, I've only seen ways to set gravity, whereas I need finer control of the region being drawn. Is there some way to accomplish what I'm after using either of those classes? On Monday, July 30, 2012 6:00:23 PM UTC-7, Dianne Hackborn wrote: > > No, the bounds are where the drawable will actually render itself. If you > want two different bounds, that should technically be two different > drawables. > > If you need to have this all in one drawable, the only option I can think > of is to make your own subclass of Drawable that computes the different > bounds as you want them. > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ImageView with progress spinner
I ended up putting it in a FrameLayout with an indeterminate ProgressBar on top of it, then setting the ProgressBar to GONE once the image has loaded. The effect is the same, so that's what I'm going with. On Wednesday, June 13, 2012 12:02:03 PM UTC-7, Paul Turchenko wrote: > > Try implementing your own Drawable. This way you could draw spinner while > actual image loads. As soon as you have image to display, your drawable > could handle that as well. Use setImageDrawable() call to apply. > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ImageView with progress spinner
*Short version*: Can I use the indeterminate progress spinner as the source image for an ImageView? *Long version*: I have an ImageView with a custom background (it's actually a custom widget that extends ImageView and implements extra drawing in onDraw). While the source image is loading, I want to show the indeterminate progress spinner. Thus far all the solutions I've seen have involved rotating the entire ImageView, which I cannot use for this. I've tried replicating the drawable xml used by the system and setting that as the source image, but the result is always a static image that doesn't spin. Is there some way to set a rotating drawable as the source image? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: File download failing
Forgot to include link to same question: http://stackoverflow.com/questions/10741980/android-file-download-throwing-errors -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Seekbar thumb (scrubber control) clipping and offset
Someone please help me with this, it has me stuck for two days. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: RadioGroup divider
This problem has been solved. That code up there does work. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] RadioGroup divider
Is there a simple way to add a divider between RadioButtons in a RadioGroup? I just want a thin line between the items in the group. I've tried using the "divider" xml attribute, and it had no effect. In case it's relevant, the RadioGroup in my layout file is empty and I'm adding RadioButtons programmatically. That being the case, I also tried this ... for (int i = 0; i < items.size(); i++) { if (i > 0) { View v = new View(this); v.setLayoutParams(new RadioGroup.LayoutParams(LayoutParams.MATCH_PARENT, 1)); v.setBackgroundColor(android.R.color.darker_gray); mRadioGroup.addView(v) } /* Create and add RadioButton here */ } ... and it had no effect. To be more precise, the Views are present in the view hierarchy (they are showing up in Hierarchy Viewer), but for some reason they are not visible. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Inflate exception on custom view calling super
Thanks, I probably never would have found that on my own. But this means that on devices below API 11, I can't have a default style/behavior set for this widget. Are there any workarounds for lower API levels? I want to avoid doing something this ... setClickable(true); ... in the constructor, because even though I might expect this widget to be clickable, another developer might want to use it differently. If he puts clickable="false" in the xml, then this line of code undermines his design. On Friday, May 18, 2012 10:25:57 AM UTC-7, Kostya Vasilyev wrote: > > The three-argument version of LinearLayout constructor is only available > with API 11 and higher -- i.e. Android 3.0. > > This dependency has to be satisfied at runtime by the actual Android > version running on the device. > > -- K > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What causes soft input to appear?
Additionally, also please help me understand how inputType is involved in the process to show a certain type of keyboard (like numbers only). On Friday, May 11, 2012 10:55:57 AM UTC-7, Karakuri Dev wrote: > > I'd like to understand programmatically what happens to make the soft > input (keyboard) appear when a user clicks on an EditText. I am making a > custom view that takes input, but extends something that normally doesn't > show soft input. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] What causes soft input to appear?
I'd like to understand programmatically what happens to make the soft input (keyboard) appear when a user clicks on an EditText. I am making a custom view that takes input, but extends something that normally doesn't show soft input. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Custom pin code view
Hi all, I'm working on a custom view for entering a pin code. Rather than a standard EditText, this has a box for each character and the boxes fill as the user types his pin. So far I'm making good progress: I can focus on the view, enter text, and fill/clear the boxes as characters are typed/deleted. Areas where I'm having problems: 1. The soft keyboard does not appear when the view gains focus, regardless of whether it's through my tapping on it or having in the xml. 2. My custom view extends LinearLayout, but I'd like to be able to use some xml attributes normally applicable to EditTexts, such as imeOptions (once I get the keyboard to show). Can anyone provide some guidance for these issues? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en