Re: [android-developers] Custom view's attributes

2012-09-05 Thread Pau Rodríguez Coloma
Thanks to all for your help. MagouyaWare, you are right , I've this line in my XML file but not in the correct place, I've the xmlns:android at the beginning of my main RelativeLayout and the xmlns:app at the end of this RelativeLayout. I don't know how it has come there, I've never seen

[android-developers] Custom view's attributes

2012-09-03 Thread Pau Rodríguez Coloma
Hi, I'm sublcassing an ImageView and adding one custom attribute like this in a res/values/attrs file: resources declare-styleable name=CustomImageView attr name=pattern format=integer / /declare-styleable /resources In my layout file I can use it like this:

Re: [android-developers] Re: tileMode = repeat with stretching the image in order to get an exact number of repetitions.

2012-08-30 Thread Pau Rodríguez Coloma
Thanks MagouyaWare for your help, but there are a problem with this solution. First, there are a known issue with dashed lines in ICS (http://code.google.com/p/android/issues/detail?id=29944) that makes it always drawn as a solid line. On the other hand, if I use this shape, at the end I've

[android-developers] Re: Use of shapes for background

2012-08-29 Thread Pau Rodríguez Coloma
this is not only a necessity it is also a personal challenge. Thanks in advance. El martes, 28 de agosto de 2012 23:11:02 UTC+2, bob escribió: Why not extend android.widget.RelativeLayout and implement your own onDraw method? On Friday, August 24, 2012 5:08:54 AM UTC-5, Pau Rodríguez Coloma wrote

[android-developers] tileMode = repeat with stretching the image in order to get an exact number of repetitions.

2012-08-29 Thread Pau Rodríguez Coloma
Hi, I'm developing an app and I want to put a separator between sections in the UI. Imagine a form, I want to make a visual separation between diferrent kinds of data. The designer idea is to put an horizontal discontinuous line. So I'm using a png file as a source of bitmap xml resource

Re: [android-developers] tileMode = repeat with stretching the image in order to get an exact number of repetitions.

2012-08-29 Thread Pau Rodríguez Coloma
Thanks Romain for your help. This is what I was thinking that at the end I have to do. The design idea is that the line fills the screen width except a left and right margin (about 40dp). So if I'm understanding well your response, I need to use an ImageView like this: ImageView

[android-developers] Re: tileMode = repeat with stretching the image in order to get an exact number of repetitions.

2012-08-29 Thread Pau Rodríguez Coloma
Thanks sparky, but what I want is to stretch only for round the final number of repetitions. I want a repetition of: small line - space - small line - space - … An effect like this: - - - - - - - - (with a custom designed line). The problem is with the last line, sometimes it appears

[android-developers] Re: Use of shapes for background

2012-08-28 Thread Pau Rodríguez Coloma
Please, help... El viernes, 24 de agosto de 2012 12:08:54 UTC+2, Pau Rodríguez Coloma escribió: Hi, I'm want to set the background of a RelativeLayout like the attached png. For the moment I'm using a bitmap definition xml named background_dark.xml like: ?xml version=1.0 encoding

Re: [android-developers] How can I calculate the BPM (Beats per minute) of a sound in a native android project?

2012-08-27 Thread Pau Rodríguez Coloma
Spooky's advice still stands. On Thursday, August 23, 2012 5:21:52 AM UTC-4, Pau Rodríguez Coloma wrote: Sorry, I made a mistake when I said that I'm developing a native app. What I mean is that I'm using the SDK, not PhoneGap or something similar. El jueves, 23 de agosto de 2012 00:33:36

[android-developers] Use of shapes for background

2012-08-24 Thread Pau Rodríguez Coloma
Hi, I'm want to set the background of a RelativeLayout like the attached png. For the moment I'm using a bitmap definition xml named background_dark.xml like: ?xml version=1.0 encoding=utf-8? bitmap xmlns:android=http://schemas.android.com/apk/res/android;

Re: [android-developers] How can I calculate the BPM (Beats per minute) of a sound in a native android project?

2012-08-23 Thread Pau Rodríguez Coloma
Sorry, I made a mistake when I said that I'm developing a native app. What I mean is that I'm using the SDK, not PhoneGap or something similar. El jueves, 23 de agosto de 2012 00:33:36 UTC+2, Spooky escribió: On Wed, Aug 22, 2012 at 03:56:44AM -0700, Pau Rodr??guez Coloma wrote: I'm

[android-developers] How can I calculate the BPM (Beats per minute) of a sound in a native android project?

2012-08-22 Thread Pau Rodríguez Coloma
Hi, I'm developing a native android app and I need to calculate de BPM of the user's music files. I've been researching in google and I've seen the echo nest API (http://the.echonest.com/) that can be used for this. But what I need is to be able to make this calculation in offline mode,