Criando controles compostos com atributos XML personalizados

Eu estou tentando combinar um TextView e um EditText em um controle composto que usa elementos xml personalizados para passar valores padrão para cada elemento individual. Eu estive olhando os tutoriais / documentos aqui:
Controles compostos de construção
Passando atributos personalizados

O que eu tenho até agora.

Attrs.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name="FreeText">
        <attr name="label" format="string" />
        <attr name="default" format="string" />
    </declare-styleable>
</resources>

Meu layout principal:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:myapp="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
    <com.example.misc.FreeText  
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content"
        myapp:label="label"
        myapp:default="default"
    />
</LinearLayout>

Meu controle composto, FreeText:

public class FreeText extends LinearLayout {

    TextView label;
    EditText value;

    public FreeText(Context context, AttributeSet attrs) {
        super(context, attrs);

        this.setOrientation(HORIZONTAL);

        LayoutParams lp = new LayoutParams(0, LayoutParams.WRAP_CONTENT);
        lp.weight = 1;

        label = new TextView(context);
        addView(label, lp);

        value = new EditText(context);
        addView(value, lp);

        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.FreeText);
        CharSequence s = a.getString(R.styleable.FreeText_label);
        if (s != null) { 
            label.setText(s);
        }

        a.recycle();
    }
}

Quando executo o programa, vejo as exibições OK, mas o valor do meu CharSequence, s, é sempre nulo. Alguém pode me dizer onde estou errado?

questionAnswers(1)

yourAnswerToTheQuestion